mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 23:56:16 +00:00
Add Symbol to struct type.
This CL adds a Symbol to the struct type along side the name. The name will be removed in a future CL when the symbol is used everywhere. Change-Id: I6c355908651ba0a155a1e0c9ed1192313a405568 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35620 Commit-Queue: dan sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: dan sinclair <dsinclair@chromium.org> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
2abecbba16
commit
24bbbbb25f
@@ -57,7 +57,7 @@ TEST_F(ValidatorTypeTest, RuntimeArrayIsLast_Pass) {
|
||||
ast::StructDecorationList decos;
|
||||
decos.push_back(create<ast::StructBlockDecoration>(Source{}));
|
||||
auto* st = create<ast::Struct>(Source{}, members, decos);
|
||||
ast::type::Struct struct_type("Foo", st);
|
||||
ast::type::Struct struct_type(mod()->RegisterSymbol("Foo"), "Foo", st);
|
||||
|
||||
mod()->AddConstructedType(&struct_type);
|
||||
EXPECT_TRUE(v()->ValidateConstructedTypes(mod()->constructed_types()));
|
||||
@@ -83,7 +83,7 @@ TEST_F(ValidatorTypeTest, RuntimeArrayIsLastNoBlock_Fail) {
|
||||
}
|
||||
ast::StructDecorationList decos;
|
||||
auto* st = create<ast::Struct>(Source{}, members, decos);
|
||||
ast::type::Struct struct_type("Foo", st);
|
||||
ast::type::Struct struct_type(mod()->RegisterSymbol("Foo"), "Foo", st);
|
||||
|
||||
mod()->AddConstructedType(&struct_type);
|
||||
EXPECT_FALSE(v()->ValidateConstructedTypes(mod()->constructed_types()));
|
||||
@@ -114,7 +114,7 @@ TEST_F(ValidatorTypeTest, RuntimeArrayIsNotLast_Fail) {
|
||||
ast::StructDecorationList decos;
|
||||
decos.push_back(create<ast::StructBlockDecoration>(Source{}));
|
||||
auto* st = create<ast::Struct>(Source{}, members, decos);
|
||||
ast::type::Struct struct_type("Foo", st);
|
||||
ast::type::Struct struct_type(mod()->RegisterSymbol("Foo"), "Foo", st);
|
||||
|
||||
mod()->AddConstructedType(&struct_type);
|
||||
EXPECT_FALSE(v()->ValidateConstructedTypes(mod()->constructed_types()));
|
||||
@@ -149,7 +149,7 @@ TEST_F(ValidatorTypeTest, AliasRuntimeArrayIsNotLast_Fail) {
|
||||
ast::StructDecorationList decos;
|
||||
decos.push_back(create<ast::StructBlockDecoration>(Source{}));
|
||||
auto* st = create<ast::Struct>(Source{}, members, decos);
|
||||
ast::type::Struct struct_type("s", st);
|
||||
ast::type::Struct struct_type(mod()->RegisterSymbol("s"), "s", st);
|
||||
mod()->AddConstructedType(&struct_type);
|
||||
EXPECT_FALSE(v()->ValidateConstructedTypes(mod()->constructed_types()));
|
||||
EXPECT_EQ(v()->error(),
|
||||
@@ -182,7 +182,7 @@ TEST_F(ValidatorTypeTest, AliasRuntimeArrayIsLast_Pass) {
|
||||
ast::StructDecorationList decos;
|
||||
decos.push_back(create<ast::StructBlockDecoration>(Source{}));
|
||||
auto* st = create<ast::Struct>(Source{}, members, decos);
|
||||
ast::type::Struct struct_type("s", st);
|
||||
ast::type::Struct struct_type(mod()->RegisterSymbol("s"), "s", st);
|
||||
mod()->AddConstructedType(&struct_type);
|
||||
EXPECT_TRUE(v()->ValidateConstructedTypes(mod()->constructed_types()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user