From d4fa2a022e137eae64d5a89808cecc23d2830ace Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Mon, 3 Oct 2022 20:19:40 +0000 Subject: [PATCH] Enable DISABLED const evaluation tests. This CL enables a couple const evaluation tests since the operators are implemented. Bug: tint:1581 Change-Id: Id4fe1221fed495a8c98d7120f7fd49a0455ac100 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104465 Commit-Queue: Dan Sinclair Reviewed-by: Ben Clayton --- src/tint/resolver/variable_test.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/tint/resolver/variable_test.cc b/src/tint/resolver/variable_test.cc index ebc6584886..e2d3a775ac 100644 --- a/src/tint/resolver/variable_test.cc +++ b/src/tint/resolver/variable_test.cc @@ -1014,9 +1014,8 @@ TEST_F(ResolverVariableTest, LocalConst_PropagateConstValue) { EXPECT_EQ(Sem().Get(c)->ConstantValue()->As(), 42_i); } -// Enable when we have @const operators implemented -TEST_F(ResolverVariableTest, DISABLED_LocalConst_ConstEval) { - auto* c = Const("c", Div(Mul(Add(1_i, 2_i), 3_i), 2_i)); +TEST_F(ResolverVariableTest, LocalConst_ConstEval) { + auto* c = Const("c", Div(Mul(Add(1_i, 2_i), 3_i), 3_i)); WrapInFunction(c); @@ -1182,9 +1181,8 @@ TEST_F(ResolverVariableTest, GlobalConst_PropagateConstValue) { EXPECT_EQ(Sem().Get(c)->ConstantValue()->As(), 42_i); } -// Enable when we have @const operators implemented -TEST_F(ResolverVariableTest, DISABLED_GlobalConst_ConstEval) { - auto* c = GlobalConst("c", Div(Mul(Add(1_i, 2_i), 3_i), 2_i)); +TEST_F(ResolverVariableTest, GlobalConst_ConstEval) { + auto* c = GlobalConst("c", Div(Mul(Add(1_i, 2_i), 3_i), 3_i)); ASSERT_TRUE(r()->Resolve()) << r()->error();