mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
Have TypesBuilder::i32() return ast::I32
Bug: tint:724 Change-Id: I2b4abc1f128a1489a4023bd3b82fc7234d70449f Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51485 Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
@@ -33,12 +33,12 @@ TEST_F(PointerTest, TypeName) {
|
||||
}
|
||||
|
||||
TEST_F(PointerTest, FriendlyNameWithStorageClass) {
|
||||
auto* r = create<Pointer>(ty.i32(), ast::StorageClass::kWorkgroup);
|
||||
auto* r = create<Pointer>(create<I32>(), ast::StorageClass::kWorkgroup);
|
||||
EXPECT_EQ(r->FriendlyName(Symbols()), "ptr<workgroup, i32>");
|
||||
}
|
||||
|
||||
TEST_F(PointerTest, FriendlyNameWithoutStorageClass) {
|
||||
auto* r = create<Pointer>(ty.i32(), ast::StorageClass::kNone);
|
||||
auto* r = create<Pointer>(create<I32>(), ast::StorageClass::kNone);
|
||||
EXPECT_EQ(r->FriendlyName(Symbols()), "ptr<i32>");
|
||||
}
|
||||
|
||||
|
||||
@@ -33,12 +33,12 @@ TEST_F(ReferenceTest, TypeName) {
|
||||
}
|
||||
|
||||
TEST_F(ReferenceTest, FriendlyNameWithStorageClass) {
|
||||
auto* r = create<Reference>(ty.i32(), ast::StorageClass::kWorkgroup);
|
||||
auto* r = create<Reference>(create<I32>(), ast::StorageClass::kWorkgroup);
|
||||
EXPECT_EQ(r->FriendlyName(Symbols()), "ref<workgroup, i32>");
|
||||
}
|
||||
|
||||
TEST_F(ReferenceTest, FriendlyNameWithoutStorageClass) {
|
||||
auto* r = create<Reference>(ty.i32(), ast::StorageClass::kNone);
|
||||
auto* r = create<Reference>(create<I32>(), ast::StorageClass::kNone);
|
||||
EXPECT_EQ(r->FriendlyName(Symbols()), "ref<i32>");
|
||||
}
|
||||
|
||||
|
||||
@@ -52,22 +52,22 @@ TEST_F(ArrayTest, TypeName) {
|
||||
}
|
||||
|
||||
TEST_F(ArrayTest, FriendlyNameRuntimeSized) {
|
||||
auto* arr = create<Array>(ty.i32(), 0, 0, 4, 4, true);
|
||||
auto* arr = create<Array>(create<I32>(), 0, 0, 4, 4, true);
|
||||
EXPECT_EQ(arr->FriendlyName(Symbols()), "array<i32>");
|
||||
}
|
||||
|
||||
TEST_F(ArrayTest, FriendlyNameStaticSized) {
|
||||
auto* arr = create<Array>(ty.i32(), 5, 4, 20, 4, true);
|
||||
auto* arr = create<Array>(create<I32>(), 5, 4, 20, 4, true);
|
||||
EXPECT_EQ(arr->FriendlyName(Symbols()), "array<i32, 5>");
|
||||
}
|
||||
|
||||
TEST_F(ArrayTest, FriendlyNameRuntimeSizedNonImplicitStride) {
|
||||
auto* arr = create<Array>(ty.i32(), 0, 0, 4, 4, false);
|
||||
auto* arr = create<Array>(create<I32>(), 0, 0, 4, 4, false);
|
||||
EXPECT_EQ(arr->FriendlyName(Symbols()), "[[stride(4)]] array<i32>");
|
||||
}
|
||||
|
||||
TEST_F(ArrayTest, FriendlyNameStaticSizedNonImplicitStride) {
|
||||
auto* arr = create<Array>(ty.i32(), 5, 4, 20, 4, false);
|
||||
auto* arr = create<Array>(create<I32>(), 5, 4, 20, 4, false);
|
||||
EXPECT_EQ(arr->FriendlyName(Symbols()), "[[stride(4)]] array<i32, 5>");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user