From 1222c151725eb30d5ffdbb8b17fcbbb416b885d9 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Tue, 16 Mar 2021 21:58:23 +0000 Subject: [PATCH] Fix CMake build warnings / errors Fixed: tint:651 Change-Id: I6d4119f4acecbea1555a85c53b4f3e905be2c556 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/44866 Commit-Queue: Ben Clayton Commit-Queue: Antonio Maiorano Auto-Submit: Ben Clayton Reviewed-by: Antonio Maiorano --- src/resolver/resolver_test.cc | 67 +++++++++++++++-------------------- 1 file changed, 29 insertions(+), 38 deletions(-) diff --git a/src/resolver/resolver_test.cc b/src/resolver/resolver_test.cc index 7ce593f268..b85dcb8a73 100644 --- a/src/resolver/resolver_test.cc +++ b/src/resolver/resolver_test.cc @@ -46,6 +46,35 @@ namespace tint { namespace resolver { namespace { +// Helpers and typedefs +using i32 = ProgramBuilder::i32; +using u32 = ProgramBuilder::u32; +using f32 = ProgramBuilder::f32; +using Op = ast::BinaryOp; + +type::Type* ty_bool_(const ProgramBuilder::TypesBuilder& ty) { + return ty.bool_(); +} +type::Type* ty_i32(const ProgramBuilder::TypesBuilder& ty) { + return ty.i32(); +} +type::Type* ty_u32(const ProgramBuilder::TypesBuilder& ty) { + return ty.u32(); +} +type::Type* ty_f32(const ProgramBuilder::TypesBuilder& ty) { + return ty.f32(); +} + +template +type::Type* ty_vec3(const ProgramBuilder::TypesBuilder& ty) { + return ty.vec3(); +} + +template +type::Type* ty_mat3x3(const ProgramBuilder::TypesBuilder& ty) { + return ty.mat3x3(); +} + TEST_F(ResolverTest, Stmt_Assign) { auto* lhs = Expr(2); auto* rhs = Expr(2.3f); @@ -985,36 +1014,6 @@ struct Params { create_type_func_ptr create_result_type; }; -// Helpers and typedefs to make building the table below more succinct - -using i32 = ProgramBuilder::i32; -using u32 = ProgramBuilder::u32; -using f32 = ProgramBuilder::f32; -using Op = ast::BinaryOp; - -type::Type* ty_bool_(const ProgramBuilder::TypesBuilder& ty) { - return ty.bool_(); -} -type::Type* ty_i32(const ProgramBuilder::TypesBuilder& ty) { - return ty.i32(); -} -type::Type* ty_u32(const ProgramBuilder::TypesBuilder& ty) { - return ty.u32(); -} -type::Type* ty_f32(const ProgramBuilder::TypesBuilder& ty) { - return ty.f32(); -} - -template -type::Type* ty_vec3(const ProgramBuilder::TypesBuilder& ty) { - return ty.vec3(); -} - -template -type::Type* ty_mat3x3(const ProgramBuilder::TypesBuilder& ty) { - return ty.mat3x3(); -} - static constexpr create_type_func_ptr all_create_type_funcs[] = { ty_bool_, ty_u32, ty_i32, ty_f32, ty_vec3, ty_vec3, ty_vec3, ty_vec3, @@ -1174,10 +1173,6 @@ TEST_P(Expr_Binary_Test_Valid, All) { auto* rhs_type = params.create_rhs_type(ty); auto* result_type = params.create_result_type(ty); - SCOPED_TRACE(testing::Message() - << lhs_type->FriendlyName(Symbols()) << " " << params.op << " " - << rhs_type->FriendlyName(Symbols())); - Global("lhs", lhs_type, ast::StorageClass::kNone); Global("rhs", rhs_type, ast::StorageClass::kNone); @@ -1221,10 +1216,6 @@ TEST_P(Expr_Binary_Test_Invalid, All) { return; } - SCOPED_TRACE(testing::Message() - << lhs_type->FriendlyName(Symbols()) << " " << params.op << " " - << rhs_type->FriendlyName(Symbols())); - Global("lhs", lhs_type, ast::StorageClass::kNone); Global("rhs", rhs_type, ast::StorageClass::kNone);