mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-12 06:45:16 +00:00
Implement type inference
Bug: tint:672 Change-Id: I3f586ee867f75427c4e8c309f72fb468643c23c0 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53182 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
7697c31e84
commit
9834fefa7f
@@ -55,15 +55,6 @@ TEST_F(ModuleTest, Assert_Null_GlobalVariable) {
|
||||
"internal compiler error");
|
||||
}
|
||||
|
||||
TEST_F(ModuleTest, Assert_Invalid_GlobalVariable) {
|
||||
EXPECT_FATAL_FAILURE(
|
||||
{
|
||||
ProgramBuilder builder;
|
||||
builder.Global("var", nullptr, StorageClass::kInput);
|
||||
},
|
||||
"internal compiler error");
|
||||
}
|
||||
|
||||
TEST_F(ModuleTest, Assert_Null_ConstructedType) {
|
||||
EXPECT_FATAL_FAILURE(
|
||||
{
|
||||
|
||||
@@ -40,8 +40,6 @@ Variable::Variable(ProgramID program_id,
|
||||
declared_storage_class_(declared_storage_class) {
|
||||
TINT_ASSERT(symbol_.IsValid());
|
||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(symbol_, program_id);
|
||||
// no type means we must have a constructor to infer it
|
||||
TINT_ASSERT(type_ || constructor);
|
||||
TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(constructor, program_id);
|
||||
}
|
||||
|
||||
|
||||
@@ -71,15 +71,6 @@ TEST_F(VariableTest, Assert_MissingSymbol) {
|
||||
"internal compiler error");
|
||||
}
|
||||
|
||||
TEST_F(VariableTest, Assert_Null_Type) {
|
||||
EXPECT_FATAL_FAILURE(
|
||||
{
|
||||
ProgramBuilder b;
|
||||
b.Var("x", nullptr, StorageClass::kNone);
|
||||
},
|
||||
"internal compiler error");
|
||||
}
|
||||
|
||||
TEST_F(VariableTest, Assert_DifferentProgramID_Symbol) {
|
||||
EXPECT_FATAL_FAILURE(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user