mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 07:06:11 +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
@@ -169,9 +169,7 @@ TEST_F(ValidateControlBlockTest,
|
||||
// case -1: {}
|
||||
// default: {}
|
||||
// }
|
||||
auto* var = Var("a", ast::StorageClass::kNone, ty.u32,
|
||||
create<ast::ScalarConstructorExpression>(
|
||||
create<ast::UintLiteral>(ty.u32, 2)),
|
||||
auto* var = Var("a", ast::StorageClass::kNone, ty.u32, Expr(2u),
|
||||
ast::VariableDecorationList{});
|
||||
|
||||
ast::CaseStatementList switch_body;
|
||||
@@ -203,9 +201,7 @@ TEST_F(ValidateControlBlockTest, NonUniqueCaseSelectorValueUint_Fail) {
|
||||
// case 2, 2: {}
|
||||
// default: {}
|
||||
// }
|
||||
auto* var = Var("a", ast::StorageClass::kNone, ty.u32,
|
||||
create<ast::ScalarConstructorExpression>(
|
||||
create<ast::UintLiteral>(ty.u32, 3)),
|
||||
auto* var = Var("a", ast::StorageClass::kNone, ty.u32, Expr(3u),
|
||||
ast::VariableDecorationList{});
|
||||
|
||||
ast::CaseStatementList switch_body;
|
||||
|
||||
Reference in New Issue
Block a user