ProgramBuilder: Migrate vectors to typ::TypePair

Used as a stepping stone to emitting the ast::Types instead.

Bug: tint:724
Change-Id: I19d7df9ab684db598783235c1720586966a232e0
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/48683
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton
2021-04-22 14:24:43 +00:00
committed by Commit Bot service account
parent 43073d8aa3
commit e30ffeb02a
11 changed files with 44 additions and 33 deletions

View File

@@ -49,13 +49,14 @@ TEST_F(VectorTest, Is) {
}
TEST_F(VectorTest, TypeName) {
I32 i32;
Vector v{&i32, 3};
EXPECT_EQ(v.type_name(), "__vec_3__i32");
auto* i32 = create<I32>();
auto* v = create<Vector>(i32, 3);
EXPECT_EQ(v->type_name(), "__vec_3__i32");
}
TEST_F(VectorTest, FriendlyName) {
auto* v = ty.vec3<f32>();
auto* f32 = create<F32>();
auto* v = create<Vector>(f32, 3);
EXPECT_EQ(v->FriendlyName(Symbols()), "vec3<f32>");
}