mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
cleanup: Refactor tests to use ast::Builder helpers
Change-Id: I5bf1dac217c9c6192c0637d98c4a38196d41cbe8 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/36382 Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
dbfe2de982
commit
1637cbb868
@@ -301,7 +301,6 @@ TEST_F(ValidatorTest, UsingUndefinedVariableInnerScope_Fail) {
|
||||
auto* var = Var("a", ast::StorageClass::kNone, ty.f32, Expr(2.0f),
|
||||
ast::VariableDecorationList{});
|
||||
|
||||
ast::type::Bool bool_type;
|
||||
auto* cond = Expr(true);
|
||||
auto* body = create<ast::BlockStatement>(ast::StatementList{
|
||||
create<ast::VariableDeclStatement>(var),
|
||||
@@ -336,7 +335,6 @@ TEST_F(ValidatorTest, UsingUndefinedVariableOuterScope_Pass) {
|
||||
auto* lhs = Expr("a");
|
||||
auto* rhs = Expr(3.14f);
|
||||
|
||||
ast::type::Bool bool_type;
|
||||
auto* cond = Expr(true);
|
||||
auto* body = create<ast::BlockStatement>(ast::StatementList{
|
||||
create<ast::AssignmentStatement>(Source{Source::Location{12, 34}}, lhs,
|
||||
@@ -476,7 +474,6 @@ TEST_F(ValidatorTest, RedeclaredIdentifierInnerScope_Pass) {
|
||||
auto* var = Var("a", ast::StorageClass::kNone, ty.f32, Expr(2.0f),
|
||||
ast::VariableDecorationList{});
|
||||
|
||||
ast::type::Bool bool_type;
|
||||
auto* cond = Expr(true);
|
||||
auto* body = create<ast::BlockStatement>(ast::StatementList{
|
||||
create<ast::VariableDeclStatement>(var),
|
||||
@@ -508,7 +505,6 @@ TEST_F(ValidatorTest, DISABLED_RedeclaredIdentifierInnerScope_False) {
|
||||
auto* var = Var("a", ast::StorageClass::kNone, ty.f32, Expr(2.0f),
|
||||
ast::VariableDecorationList{});
|
||||
|
||||
ast::type::Bool bool_type;
|
||||
auto* cond = Expr(true);
|
||||
auto* body = create<ast::BlockStatement>(ast::StatementList{
|
||||
create<ast::VariableDeclStatement>(Source{Source::Location{12, 34}}, var),
|
||||
|
||||
Reference in New Issue
Block a user