diff --git a/src/ast/array_accessor_expression_test.cc b/src/ast/array_accessor_expression_test.cc index 51b41e36cb..833e46f3c6 100644 --- a/src/ast/array_accessor_expression_test.cc +++ b/src/ast/array_accessor_expression_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { +namespace { using ArrayAccessorExpressionTest = testing::Test; @@ -101,5 +102,6 @@ TEST_F(ArrayAccessorExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/as_expression_test.cc b/src/ast/as_expression_test.cc index c49942d322..e41c0badc1 100644 --- a/src/ast/as_expression_test.cc +++ b/src/ast/as_expression_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using AsExpressionTest = testing::Test; @@ -94,5 +95,6 @@ TEST_F(AsExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/assignment_statement_test.cc b/src/ast/assignment_statement_test.cc index 132ee6f656..f8959e304a 100644 --- a/src/ast/assignment_statement_test.cc +++ b/src/ast/assignment_statement_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { +namespace { using AssignmentStatementTest = testing::Test; @@ -105,5 +106,6 @@ TEST_F(AssignmentStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/binding_decoration_test.cc b/src/ast/binding_decoration_test.cc index fffb329ea3..71fefdf572 100644 --- a/src/ast/binding_decoration_test.cc +++ b/src/ast/binding_decoration_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using BindingDecorationTest = testing::Test; @@ -42,5 +43,6 @@ TEST_F(BindingDecorationTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/bool_literal_test.cc b/src/ast/bool_literal_test.cc index af01daedb2..190a51b211 100644 --- a/src/ast/bool_literal_test.cc +++ b/src/ast/bool_literal_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using BoolLiteralTest = testing::Test; @@ -51,5 +52,6 @@ TEST_F(BoolLiteralTest, ToStr) { EXPECT_EQ(f.to_str(), "false"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/break_statement_test.cc b/src/ast/break_statement_test.cc index 34305a11d3..87ace59a07 100644 --- a/src/ast/break_statement_test.cc +++ b/src/ast/break_statement_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using BreakStatementTest = testing::Test; @@ -109,5 +110,6 @@ TEST_F(BreakStatementTest, ToStr_WithCondition) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/builtin_decoration_test.cc b/src/ast/builtin_decoration_test.cc index 266edc1aa1..114874b9db 100644 --- a/src/ast/builtin_decoration_test.cc +++ b/src/ast/builtin_decoration_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using BuiltinDecorationTest = testing::Test; @@ -42,5 +43,6 @@ TEST_F(BuiltinDecorationTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/call_expression_test.cc b/src/ast/call_expression_test.cc index b4dad2fd95..1425f062d7 100644 --- a/src/ast/call_expression_test.cc +++ b/src/ast/call_expression_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { +namespace { using CallExpressionTest = testing::Test; @@ -127,5 +128,6 @@ TEST_F(CallExpressionTest, ToStr_WithParams) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/case_statement_test.cc b/src/ast/case_statement_test.cc index 9395b52a3d..dc1f90bf88 100644 --- a/src/ast/case_statement_test.cc +++ b/src/ast/case_statement_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using CaseStatementTest = testing::Test; @@ -121,5 +122,6 @@ TEST_F(CaseStatementTest, ToStr_WithoutCondition) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/cast_expression_test.cc b/src/ast/cast_expression_test.cc index 711918ea94..d7f9498d39 100644 --- a/src/ast/cast_expression_test.cc +++ b/src/ast/cast_expression_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using CastExpressionTest = testing::Test; @@ -92,5 +93,6 @@ TEST_F(CastExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/const_initializer_expression_test.cc b/src/ast/const_initializer_expression_test.cc index 9098a0cb16..a823a33ca4 100644 --- a/src/ast/const_initializer_expression_test.cc +++ b/src/ast/const_initializer_expression_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { +namespace { using ConstInitializerExpressionTest = testing::Test; @@ -57,5 +58,6 @@ TEST_F(ConstInitializerExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/continue_statement_test.cc b/src/ast/continue_statement_test.cc index 366bb4df91..5f4a88c76c 100644 --- a/src/ast/continue_statement_test.cc +++ b/src/ast/continue_statement_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using ContinueStatementTest = testing::Test; @@ -109,5 +110,6 @@ TEST_F(ContinueStatementTest, ToStr_WithCondition) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/decorated_variable_test.cc b/src/ast/decorated_variable_test.cc index e2ed80010f..fd4ad6207c 100644 --- a/src/ast/decorated_variable_test.cc +++ b/src/ast/decorated_variable_test.cc @@ -25,6 +25,7 @@ namespace tint { namespace ast { +namespace { using DecoratedVariableTest = testing::Test; @@ -93,5 +94,6 @@ TEST_F(DecoratedVariableTest, to_str) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/else_statement_test.cc b/src/ast/else_statement_test.cc index b9c5f1b2c4..9675e0ba82 100644 --- a/src/ast/else_statement_test.cc +++ b/src/ast/else_statement_test.cc @@ -22,6 +22,7 @@ namespace tint { namespace ast { +namespace { using ElseStatementTest = testing::Test; @@ -135,5 +136,6 @@ TEST_F(ElseStatementTest, ToStr_NoCondition) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/entry_point_test.cc b/src/ast/entry_point_test.cc index 3d8a1b555b..2dfb0b82be 100644 --- a/src/ast/entry_point_test.cc +++ b/src/ast/entry_point_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using EntryPointTest = testing::Test; @@ -95,5 +96,6 @@ TEST_F(EntryPointTest, ToStr_NoName) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/fallthrough_statement_test.cc b/src/ast/fallthrough_statement_test.cc index 0d397d1f9e..632b9403e4 100644 --- a/src/ast/fallthrough_statement_test.cc +++ b/src/ast/fallthrough_statement_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using FallthroughStatementTest = testing::Test; @@ -52,5 +53,6 @@ TEST_F(FallthroughStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/float_literal_test.cc b/src/ast/float_literal_test.cc index 8274761b78..e9b3f4e6f0 100644 --- a/src/ast/float_literal_test.cc +++ b/src/ast/float_literal_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using FloatLiteralTest = testing::Test; @@ -41,5 +42,6 @@ TEST_F(FloatLiteralTest, ToStr) { EXPECT_EQ(f.to_str(), "42.1"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/function_test.cc b/src/ast/function_test.cc index e4506a54c5..0e9e2bf258 100644 --- a/src/ast/function_test.cc +++ b/src/ast/function_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace ast { +namespace { using FunctionTest = testing::Test; @@ -225,5 +226,6 @@ TEST_F(FunctionTest, TypeName_WithParams) { EXPECT_EQ(f.type_name(), "__func__void__i32__f32"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/identifier_expression_test.cc b/src/ast/identifier_expression_test.cc index ddbefd2bd5..3252ab305f 100644 --- a/src/ast/identifier_expression_test.cc +++ b/src/ast/identifier_expression_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using IdentifierExpressionTest = testing::Test; @@ -80,5 +81,6 @@ TEST_F(IdentifierExpressionTest, ToStr_WithNamespace) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/if_statement_test.cc b/src/ast/if_statement_test.cc index e9990af761..6d6abd47ec 100644 --- a/src/ast/if_statement_test.cc +++ b/src/ast/if_statement_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using IfStatementTest = testing::Test; @@ -361,5 +362,6 @@ TEST_F(IfStatementTest, ToStr_WithPremerge) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/import_test.cc b/src/ast/import_test.cc index 48f5a77bb7..0bde1028c4 100644 --- a/src/ast/import_test.cc +++ b/src/ast/import_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using ImportTest = testing::Test; @@ -87,5 +88,6 @@ TEST_F(ImportTest, IsValid_InvalidEndingCharacter) { EXPECT_FALSE(i.IsValid()); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/int_literal_test.cc b/src/ast/int_literal_test.cc index 7b7fe86458..8d35d5df41 100644 --- a/src/ast/int_literal_test.cc +++ b/src/ast/int_literal_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using IntLiteralTest = testing::Test; @@ -41,5 +42,6 @@ TEST_F(IntLiteralTest, ToStr) { EXPECT_EQ(i.to_str(), "-42"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/kill_statement_test.cc b/src/ast/kill_statement_test.cc index 63115c7857..e75988a0e0 100644 --- a/src/ast/kill_statement_test.cc +++ b/src/ast/kill_statement_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using KillStatementTest = testing::Test; @@ -53,5 +54,6 @@ TEST_F(KillStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/location_decoration_test.cc b/src/ast/location_decoration_test.cc index c68253ad0e..a5340e8673 100644 --- a/src/ast/location_decoration_test.cc +++ b/src/ast/location_decoration_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using LocationDecorationTest = testing::Test; @@ -44,5 +45,6 @@ TEST_F(LocationDecorationTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/loop_statement_test.cc b/src/ast/loop_statement_test.cc index 09455da0b4..37788d51c0 100644 --- a/src/ast/loop_statement_test.cc +++ b/src/ast/loop_statement_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace ast { +namespace { using LoopStatementTest = testing::Test; @@ -183,5 +184,6 @@ TEST_F(LoopStatementTest, ToStr_WithContinuing) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/member_accessor_expression_test.cc b/src/ast/member_accessor_expression_test.cc index 57e30be342..f42110b81f 100644 --- a/src/ast/member_accessor_expression_test.cc +++ b/src/ast/member_accessor_expression_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using MemberAccessorExpressionTest = testing::Test; @@ -105,5 +106,6 @@ TEST_F(MemberAccessorExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/module_test.cc b/src/ast/module_test.cc index 7fad54b5ab..2742bd4daf 100644 --- a/src/ast/module_test.cc +++ b/src/ast/module_test.cc @@ -26,6 +26,7 @@ namespace tint { namespace ast { +namespace { using ModuleTest = testing::Test; @@ -184,5 +185,6 @@ TEST_F(ModuleTest, IsValid_Invalid_Function) { EXPECT_FALSE(m.IsValid()); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/nop_statement_test.cc b/src/ast/nop_statement_test.cc index 7f47b28928..502622db83 100644 --- a/src/ast/nop_statement_test.cc +++ b/src/ast/nop_statement_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using NopStatementTest = testing::Test; @@ -53,5 +54,6 @@ TEST_F(NopStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/regardless_statement_test.cc b/src/ast/regardless_statement_test.cc index 4c34bdb372..cf15f1fdc5 100644 --- a/src/ast/regardless_statement_test.cc +++ b/src/ast/regardless_statement_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace ast { +namespace { using RegardlessStatementTest = testing::Test; @@ -122,5 +123,6 @@ TEST_F(RegardlessStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/relational_expression_test.cc b/src/ast/relational_expression_test.cc index ff410323d8..b014448ea1 100644 --- a/src/ast/relational_expression_test.cc +++ b/src/ast/relational_expression_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using RelationalExpressionTest = testing::Test; @@ -118,5 +119,6 @@ TEST_F(RelationalExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/return_statement_test.cc b/src/ast/return_statement_test.cc index ebbcaab678..3cd4a0497e 100644 --- a/src/ast/return_statement_test.cc +++ b/src/ast/return_statement_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using ReturnStatementTest = testing::Test; @@ -93,5 +94,6 @@ TEST_F(ReturnStatementTest, ToStr_WithoutValue) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/set_decoration_test.cc b/src/ast/set_decoration_test.cc index b257453eb4..9b70c4ef55 100644 --- a/src/ast/set_decoration_test.cc +++ b/src/ast/set_decoration_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using SetDecorationTest = testing::Test; @@ -42,5 +43,6 @@ TEST_F(SetDecorationTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/struct_member_offset_decoration_test.cc b/src/ast/struct_member_offset_decoration_test.cc index cd2e2b96a4..a73b36769d 100644 --- a/src/ast/struct_member_offset_decoration_test.cc +++ b/src/ast/struct_member_offset_decoration_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using StructMemberOffsetDecorationTest = testing::Test; @@ -31,5 +32,6 @@ TEST_F(StructMemberOffsetDecorationTest, Is) { EXPECT_TRUE(d.IsOffset()); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/struct_member_test.cc b/src/ast/struct_member_test.cc index cbe4ef9d44..c16495986a 100644 --- a/src/ast/struct_member_test.cc +++ b/src/ast/struct_member_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace ast { +namespace { using StructMemberTest = testing::Test; @@ -98,5 +99,6 @@ TEST_F(StructMemberTest, ToStrNoDecorations) { EXPECT_EQ(out.str(), " StructMember{a: __i32}\n"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/struct_test.cc b/src/ast/struct_test.cc index 35d608d096..b2145257dd 100644 --- a/src/ast/struct_test.cc +++ b/src/ast/struct_test.cc @@ -24,6 +24,7 @@ namespace tint { namespace ast { +namespace { using StructTest = testing::Test; @@ -97,5 +98,6 @@ TEST_F(StructTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/switch_statement_test.cc b/src/ast/switch_statement_test.cc index 209f7dad5f..1f065ec81f 100644 --- a/src/ast/switch_statement_test.cc +++ b/src/ast/switch_statement_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace ast { +namespace { using SwitchStatementTest = testing::Test; @@ -150,5 +151,6 @@ TEST_F(SwitchStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/type/alias_type_test.cc b/src/ast/type/alias_type_test.cc index e3c31269e3..38d05b6d42 100644 --- a/src/ast/type/alias_type_test.cc +++ b/src/ast/type/alias_type_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { namespace type { +namespace { using AliasTypeTest = testing::Test; @@ -53,6 +54,7 @@ TEST_F(AliasTypeTest, TypeName) { EXPECT_EQ(at.type_name(), "__alias_Particle__i32"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/array_type_test.cc b/src/ast/type/array_type_test.cc index 5495f5bb90..475164145b 100644 --- a/src/ast/type/array_type_test.cc +++ b/src/ast/type/array_type_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { namespace type { +namespace { using ArrayTypeTest = testing::Test; @@ -64,6 +65,7 @@ TEST_F(ArrayTypeTest, TypeName) { EXPECT_EQ(arr.type_name(), "__array__i32_3"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/bool_type_test.cc b/src/ast/type/bool_type_test.cc index 6aacfe88ba..55e406d83e 100644 --- a/src/ast/type/bool_type_test.cc +++ b/src/ast/type/bool_type_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { namespace type { +namespace { using BoolTypeTest = testing::Test; @@ -41,6 +42,7 @@ TEST_F(BoolTypeTest, TypeName) { EXPECT_EQ(b.type_name(), "__bool"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/f32_type_test.cc b/src/ast/type/f32_type_test.cc index a5287f0105..1717956ab8 100644 --- a/src/ast/type/f32_type_test.cc +++ b/src/ast/type/f32_type_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { namespace type { +namespace { using F32TypeTest = testing::Test; @@ -41,6 +42,7 @@ TEST_F(F32TypeTest, TypeName) { EXPECT_EQ(f.type_name(), "__f32"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/i32_type_test.cc b/src/ast/type/i32_type_test.cc index 67f2483f9a..7697fc7c62 100644 --- a/src/ast/type/i32_type_test.cc +++ b/src/ast/type/i32_type_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { namespace type { +namespace { using I32TypeTest = testing::Test; @@ -41,6 +42,7 @@ TEST_F(I32TypeTest, TypeName) { EXPECT_EQ(i.type_name(), "__i32"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/matrix_type_test.cc b/src/ast/type/matrix_type_test.cc index 0bdb7eadd2..1babb7dfcc 100644 --- a/src/ast/type/matrix_type_test.cc +++ b/src/ast/type/matrix_type_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { namespace type { +namespace { using MatrixTypeTest = testing::Test; @@ -52,6 +53,7 @@ TEST_F(MatrixTypeTest, TypeName) { EXPECT_EQ(m.type_name(), "__mat_2_3__i32"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/pointer_type_test.cc b/src/ast/type/pointer_type_test.cc index 52d167ff80..8889cb87b6 100644 --- a/src/ast/type/pointer_type_test.cc +++ b/src/ast/type/pointer_type_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { namespace type { +namespace { using PointerTypeTest = testing::Test; @@ -51,6 +52,7 @@ TEST_F(PointerTypeTest, TypeName) { EXPECT_EQ(p.type_name(), "__ptr_workgroup__i32"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/struct_type_test.cc b/src/ast/type/struct_type_test.cc index 1721079998..6492a15604 100644 --- a/src/ast/type/struct_type_test.cc +++ b/src/ast/type/struct_type_test.cc @@ -22,6 +22,7 @@ namespace tint { namespace ast { namespace type { +namespace { using StructTypeTest = testing::Test; @@ -54,6 +55,7 @@ TEST_F(StructTypeTest, TypeName) { EXPECT_EQ(s.type_name(), "__struct_my_struct"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/u32_type_test.cc b/src/ast/type/u32_type_test.cc index 5f4508e74f..eb875b40fb 100644 --- a/src/ast/type/u32_type_test.cc +++ b/src/ast/type/u32_type_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace ast { namespace type { +namespace { using U32TypeTest = testing::Test; @@ -41,6 +42,7 @@ TEST_F(U32TypeTest, TypeName) { EXPECT_EQ(u.type_name(), "__u32"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type/vector_type_test.cc b/src/ast/type/vector_type_test.cc index bc08383b09..cd2ce3aaba 100644 --- a/src/ast/type/vector_type_test.cc +++ b/src/ast/type/vector_type_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { namespace type { +namespace { using VectorTypeTest = testing::Test; @@ -51,6 +52,7 @@ TEST_F(VectorTypeTest, TypeName) { EXPECT_EQ(v.type_name(), "__vec_3__i32"); } +} // namespace } // namespace type } // namespace ast } // namespace tint diff --git a/src/ast/type_initializer_expression_test.cc b/src/ast/type_initializer_expression_test.cc index 96b8c30d03..80c5f98b30 100644 --- a/src/ast/type_initializer_expression_test.cc +++ b/src/ast/type_initializer_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace ast { +namespace { using TypeInitializerExpressionTest = testing::Test; @@ -119,5 +120,6 @@ TEST_F(TypeInitializerExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/uint_literal_test.cc b/src/ast/uint_literal_test.cc index 04628c37fd..137cded3c5 100644 --- a/src/ast/uint_literal_test.cc +++ b/src/ast/uint_literal_test.cc @@ -18,6 +18,7 @@ namespace tint { namespace ast { +namespace { using UintLiteralTest = testing::Test; @@ -41,5 +42,6 @@ TEST_F(UintLiteralTest, ToStr) { EXPECT_EQ(i.to_str(), "42"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/unary_derivative_expression_test.cc b/src/ast/unary_derivative_expression_test.cc index 17f43b381d..6a9d3661a3 100644 --- a/src/ast/unary_derivative_expression_test.cc +++ b/src/ast/unary_derivative_expression_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using UnaryDerivativeExpressionTest = testing::Test; @@ -84,5 +85,6 @@ TEST_F(UnaryDerivativeExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/unary_method_expression_test.cc b/src/ast/unary_method_expression_test.cc index 7f0b46dee9..2d51e63978 100644 --- a/src/ast/unary_method_expression_test.cc +++ b/src/ast/unary_method_expression_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using UnaryMethodExpressionTest = testing::Test; @@ -96,5 +97,6 @@ TEST_F(UnaryMethodExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/unary_op_expression_test.cc b/src/ast/unary_op_expression_test.cc index fef07d5ca3..93462bb481 100644 --- a/src/ast/unary_op_expression_test.cc +++ b/src/ast/unary_op_expression_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using UnaryOpExpressionTest = testing::Test; @@ -76,5 +77,6 @@ TEST_F(UnaryOpExpressionTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/unless_statement_test.cc b/src/ast/unless_statement_test.cc index d4f644fbab..5cb94433c0 100644 --- a/src/ast/unless_statement_test.cc +++ b/src/ast/unless_statement_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using UnlessStatementTest = testing::Test; @@ -120,5 +121,6 @@ TEST_F(UnlessStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/variable_statement_test.cc b/src/ast/variable_statement_test.cc index a7b56c1b85..5bc0eb7b98 100644 --- a/src/ast/variable_statement_test.cc +++ b/src/ast/variable_statement_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace ast { +namespace { using VariableStatementTest = testing::Test; @@ -83,5 +84,6 @@ TEST_F(VariableStatementTest, ToStr) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/ast/variable_test.cc b/src/ast/variable_test.cc index 26dc5152d6..1a33e3f12e 100644 --- a/src/ast/variable_test.cc +++ b/src/ast/variable_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace ast { +namespace { using VariableTest = testing::Test; @@ -113,5 +114,6 @@ TEST_F(VariableTest, to_str) { )"); } +} // namespace } // namespace ast } // namespace tint diff --git a/src/reader/spirv/parser_impl_test.cc b/src/reader/spirv/parser_impl_test.cc index 6a05413853..94e944e3be 100644 --- a/src/reader/spirv/parser_impl_test.cc +++ b/src/reader/spirv/parser_impl_test.cc @@ -24,7 +24,6 @@ namespace tint { namespace reader { namespace spirv { - namespace { using ::testing::HasSubstr; @@ -49,7 +48,6 @@ TEST_F(SpvParserTest, Impl_InvalidModuleFails) { // TODO(dneto): uint32 vec, valid SPIR-V } // namespace - } // namespace spirv } // namespace reader } // namespace tint diff --git a/src/reader/spirv/parser_test.cc b/src/reader/spirv/parser_test.cc index ea0f87dab9..a89390546b 100644 --- a/src/reader/spirv/parser_test.cc +++ b/src/reader/spirv/parser_test.cc @@ -23,8 +23,8 @@ namespace tint { namespace reader { namespace spirv { - namespace { + using ParserTest = testing::Test; TEST_F(ParserTest, Uint32VecEmpty) { @@ -39,7 +39,6 @@ TEST_F(ParserTest, Uint32VecEmpty) { // TODO(dneto): uint32 vec, invalid SPIR-V } // namespace - } // namespace spirv } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/lexer_test.cc b/src/reader/wgsl/lexer_test.cc index 17210ffefe..f1535649ea 100644 --- a/src/reader/wgsl/lexer_test.cc +++ b/src/reader/wgsl/lexer_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { using LexerTest = testing::Test; @@ -526,6 +527,7 @@ INSTANTIATE_TEST_SUITE_P(LexerTest, "u16", "u64")); +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_additive_expression_test.cc b/src/reader/wgsl/parser_impl_additive_expression_test.cc index 0b46cdb78f..14ca2c2648 100644 --- a/src/reader/wgsl/parser_impl_additive_expression_test.cc +++ b/src/reader/wgsl/parser_impl_additive_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, AdditiveExpression_Parses_Plus) { auto p = parser("a + true"); @@ -91,6 +92,7 @@ TEST_F(ParserImplTest, AdditiveExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_and_expression_test.cc b/src/reader/wgsl/parser_impl_and_expression_test.cc index 262611c4b3..dac8bc981e 100644 --- a/src/reader/wgsl/parser_impl_and_expression_test.cc +++ b/src/reader/wgsl/parser_impl_and_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, AndExpression_Parses) { auto p = parser("a & true"); @@ -69,6 +70,7 @@ TEST_F(ParserImplTest, AndExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_argument_expression_list_test.cc b/src/reader/wgsl/parser_impl_argument_expression_list_test.cc index 8b1e75af46..eac942acc2 100644 --- a/src/reader/wgsl/parser_impl_argument_expression_list_test.cc +++ b/src/reader/wgsl/parser_impl_argument_expression_list_test.cc @@ -26,6 +26,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ArgumentExpressionList_Parses) { auto p = parser("a"); @@ -61,6 +62,7 @@ TEST_F(ParserImplTest, ArgumentExpressionList_HandlesInvalidExpression) { EXPECT_EQ(p->error(), "1:1: unable to parse argument expression"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_assignment_stmt_test.cc b/src/reader/wgsl/parser_impl_assignment_stmt_test.cc index 45f6cdd03a..2ef65b0778 100644 --- a/src/reader/wgsl/parser_impl_assignment_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_assignment_stmt_test.cc @@ -26,6 +26,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, AssignmentStmt_Parses_ToVariable) { auto p = parser("a = 123"); @@ -130,6 +131,7 @@ TEST_F(ParserImplTest, AssignmentStmt_InvalidRHS) { EXPECT_EQ(p->error(), "1:14: unable to parse right side of assignment"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_body_stmt_test.cc b/src/reader/wgsl/parser_impl_body_stmt_test.cc index fb1e63558f..a92a001561 100644 --- a/src/reader/wgsl/parser_impl_body_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_body_stmt_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, BodyStmt) { auto p = parser(R"({ @@ -55,6 +56,7 @@ TEST_F(ParserImplTest, BodyStmt_MissingRightParen) { EXPECT_EQ(p->error(), "1:9: missing }"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_break_stmt_test.cc b/src/reader/wgsl/parser_impl_break_stmt_test.cc index bb1f67b5c4..df1b901543 100644 --- a/src/reader/wgsl/parser_impl_break_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_break_stmt_test.cc @@ -22,6 +22,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, BreakStmt) { auto p = parser("break"); @@ -71,6 +72,7 @@ TEST_F(ParserImplTest, BreakStmt_MissingRHS) { EXPECT_EQ(p->error(), "1:9: expected ("); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_builtin_decoration_test.cc b/src/reader/wgsl/parser_impl_builtin_decoration_test.cc index dbb2f4680f..d33b6d6a37 100644 --- a/src/reader/wgsl/parser_impl_builtin_decoration_test.cc +++ b/src/reader/wgsl/parser_impl_builtin_decoration_test.cc @@ -54,8 +54,6 @@ class BuiltinTest : public testing::TestWithParam { TypeManager tm_; }; -} // namespace - TEST_P(BuiltinTest, Parses) { auto params = GetParam(); auto p = parser(params.input); @@ -94,6 +92,7 @@ TEST_F(ParserImplTest, BuiltinDecoration_NoMatch) { EXPECT_EQ(t.to_str(), "not"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_case_body_test.cc b/src/reader/wgsl/parser_impl_case_body_test.cc index 56632ed0e0..98a9a91c52 100644 --- a/src/reader/wgsl/parser_impl_case_body_test.cc +++ b/src/reader/wgsl/parser_impl_case_body_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, CaseBody_Empty) { auto p = parser(""); @@ -63,6 +64,7 @@ TEST_F(ParserImplTest, CaseBody_Fallthrough_MissingSemicolon) { EXPECT_EQ(p->error(), "1:12: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_const_expr_test.cc b/src/reader/wgsl/parser_impl_const_expr_test.cc index cf4dad9278..f76ee53dfd 100644 --- a/src/reader/wgsl/parser_impl_const_expr_test.cc +++ b/src/reader/wgsl/parser_impl_const_expr_test.cc @@ -24,6 +24,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ConstExpr_TypeDecl) { auto p = parser("vec2(1., 2.)"); @@ -121,6 +122,7 @@ TEST_F(ParserImplTest, ConstExpr_ConstLiteral_Invalid) { EXPECT_EQ(p->error(), "1:1: unknown type alias 'invalid'"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_const_literal_test.cc b/src/reader/wgsl/parser_impl_const_literal_test.cc index aa5989eb02..ed474d9248 100644 --- a/src/reader/wgsl/parser_impl_const_literal_test.cc +++ b/src/reader/wgsl/parser_impl_const_literal_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ConstLiteral_Int) { auto p = parser("-234"); @@ -82,6 +83,7 @@ TEST_F(ParserImplTest, ConstLiteral_NoMatch) { ASSERT_EQ(c, nullptr); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_continue_stmt_test.cc b/src/reader/wgsl/parser_impl_continue_stmt_test.cc index ebcca067d8..db2171dd9d 100644 --- a/src/reader/wgsl/parser_impl_continue_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_continue_stmt_test.cc @@ -22,6 +22,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ContinueStmt) { auto p = parser("continue"); @@ -71,6 +72,7 @@ TEST_F(ParserImplTest, ContinueStmt_MissingRHS) { EXPECT_EQ(p->error(), "1:12: expected ("); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_continuing_stmt_test.cc b/src/reader/wgsl/parser_impl_continuing_stmt_test.cc index 650e4eace8..b83fcf8456 100644 --- a/src/reader/wgsl/parser_impl_continuing_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_continuing_stmt_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ContinuingStmt) { auto p = parser("continuing { nop; }"); @@ -36,6 +37,7 @@ TEST_F(ParserImplTest, ContinuingStmt_InvalidBody) { EXPECT_EQ(p->error(), "1:18: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_derivative_modifier_test.cc b/src/reader/wgsl/parser_impl_derivative_modifier_test.cc index 97322162b5..6c84dd59f1 100644 --- a/src/reader/wgsl/parser_impl_derivative_modifier_test.cc +++ b/src/reader/wgsl/parser_impl_derivative_modifier_test.cc @@ -56,8 +56,6 @@ class DerivativeModifierTest TypeManager tm_; }; -} // namespace - TEST_P(DerivativeModifierTest, Parses) { auto params = GetParam(); auto p = parser(params.input); @@ -86,6 +84,7 @@ TEST_F(ParserImplTest, DerivativeModifier_NoMatch) { EXPECT_EQ(t.to_str(), "not"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_else_stmt_test.cc b/src/reader/wgsl/parser_impl_else_stmt_test.cc index a83eec33af..6de216974a 100644 --- a/src/reader/wgsl/parser_impl_else_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_else_stmt_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ElseStmt) { auto p = parser("else { a = b; c = d; }"); @@ -47,6 +48,7 @@ TEST_F(ParserImplTest, ElseStmt_MissingBody) { EXPECT_EQ(p->error(), "1:5: missing {"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_elseif_stmt_test.cc b/src/reader/wgsl/parser_impl_elseif_stmt_test.cc index e554610cd2..e5b5f52563 100644 --- a/src/reader/wgsl/parser_impl_elseif_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_elseif_stmt_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ElseIfStmt) { auto p = parser("elseif (a == 4) { a = b; c = d; }"); @@ -64,6 +65,7 @@ TEST_F(ParserImplTest, ElseIfStmt_MissingBody) { EXPECT_EQ(p->error(), "1:14: missing {"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_entry_point_decl_test.cc b/src/reader/wgsl/parser_impl_entry_point_decl_test.cc index 22667771ec..774cc7fe9b 100644 --- a/src/reader/wgsl/parser_impl_entry_point_decl_test.cc +++ b/src/reader/wgsl/parser_impl_entry_point_decl_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, EntryPoint_Parses) { auto p = parser("entry_point fragment = main"); @@ -115,6 +116,7 @@ TEST_F(ParserImplTest, EntryPoint_InvalidStage) { EXPECT_EQ(p->error(), "1:13: missing pipeline stage for entry point"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_equality_expression_test.cc b/src/reader/wgsl/parser_impl_equality_expression_test.cc index 9dbc269813..a0ec16dd3a 100644 --- a/src/reader/wgsl/parser_impl_equality_expression_test.cc +++ b/src/reader/wgsl/parser_impl_equality_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, EqualityExpression_Parses_Equal) { auto p = parser("a == true"); @@ -91,6 +92,7 @@ TEST_F(ParserImplTest, EqualityExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_exclusive_or_expression_test.cc b/src/reader/wgsl/parser_impl_exclusive_or_expression_test.cc index 34f0cd6f09..66ef3013fd 100644 --- a/src/reader/wgsl/parser_impl_exclusive_or_expression_test.cc +++ b/src/reader/wgsl/parser_impl_exclusive_or_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ExclusiveOrExpression_Parses) { auto p = parser("a ^ true"); @@ -69,6 +70,7 @@ TEST_F(ParserImplTest, ExclusiveOrExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_function_decl_test.cc b/src/reader/wgsl/parser_impl_function_decl_test.cc index da430fcfb5..be9b2e082a 100644 --- a/src/reader/wgsl/parser_impl_function_decl_test.cc +++ b/src/reader/wgsl/parser_impl_function_decl_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, FunctionDecl) { auto p = parser("fn main(a : i32, b : f32) -> void { return; }"); @@ -59,6 +60,7 @@ TEST_F(ParserImplTest, FunctionDecl_InvalidBody) { EXPECT_EQ(p->error(), "1:28: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_function_header_test.cc b/src/reader/wgsl/parser_impl_function_header_test.cc index b412b25a2b..94b9886bae 100644 --- a/src/reader/wgsl/parser_impl_function_header_test.cc +++ b/src/reader/wgsl/parser_impl_function_header_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, FunctionHeader) { auto p = parser("fn main(a : i32, b: f32) -> void"); @@ -99,6 +100,7 @@ TEST_F(ParserImplTest, FunctionHeader_MissingReturnType) { EXPECT_EQ(p->error(), "1:13: unable to determine function return type"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_function_type_decl_test.cc b/src/reader/wgsl/parser_impl_function_type_decl_test.cc index 5f15068aed..7a9e7372b4 100644 --- a/src/reader/wgsl/parser_impl_function_type_decl_test.cc +++ b/src/reader/wgsl/parser_impl_function_type_decl_test.cc @@ -25,6 +25,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, FunctionTypeDecl_Void) { auto v = tm()->Get(std::make_unique()); @@ -53,6 +54,7 @@ TEST_F(ParserImplTest, FunctionTypeDecl_InvalidType) { EXPECT_EQ(p->error(), "1:6: unknown type alias 'invalid'"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_global_constant_decl_test.cc b/src/reader/wgsl/parser_impl_global_constant_decl_test.cc index 32789bb104..d0062977a5 100644 --- a/src/reader/wgsl/parser_impl_global_constant_decl_test.cc +++ b/src/reader/wgsl/parser_impl_global_constant_decl_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, GlobalConstantDecl) { auto p = parser("const a : f32 = 1."); @@ -69,6 +70,7 @@ TEST_F(ParserImplTest, GlobalConstantDecl_MissingExpression) { EXPECT_EQ(p->error(), "1:15: unable to parse const literal"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_global_decl_test.cc b/src/reader/wgsl/parser_impl_global_decl_test.cc index 3cb4eb58f9..188a658b4e 100644 --- a/src/reader/wgsl/parser_impl_global_decl_test.cc +++ b/src/reader/wgsl/parser_impl_global_decl_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, GlobalDecl_Semicolon) { auto p = parser(";"); @@ -172,6 +173,7 @@ TEST_F(ParserImplTest, GlobalDecl_Function_Invalid) { EXPECT_EQ(p->error(), "1:14: unable to determine function return type"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_global_variable_decl_test.cc b/src/reader/wgsl/parser_impl_global_variable_decl_test.cc index 3bd2d9510a..b65d697a7e 100644 --- a/src/reader/wgsl/parser_impl_global_variable_decl_test.cc +++ b/src/reader/wgsl/parser_impl_global_variable_decl_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, GlobalVariableDecl_WithoutInitializer) { auto p = parser("var a : f32"); @@ -100,6 +101,7 @@ TEST_F(ParserImplTest, GlobalVariableDecl_InvalidVariableDecl) { EXPECT_EQ(p->error(), "1:5: invalid storage class for variable decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_if_stmt_test.cc b/src/reader/wgsl/parser_impl_if_stmt_test.cc index fcca219c42..43dcecc1d5 100644 --- a/src/reader/wgsl/parser_impl_if_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_if_stmt_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, IfStmt) { auto p = parser("if (a == 4) { a = b; c = d; }"); @@ -137,6 +138,7 @@ TEST_F(ParserImplTest, IfStmt_InvalidPremerge) { EXPECT_EQ(p->error(), "1:30: missing }"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_import_decl_test.cc b/src/reader/wgsl/parser_impl_import_decl_test.cc index 9f124fb453..5fc4f04ed6 100644 --- a/src/reader/wgsl/parser_impl_import_decl_test.cc +++ b/src/reader/wgsl/parser_impl_import_decl_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ImportDecl_Import) { auto p = parser(R"(import "GLSL.std.450" as glsl)"); @@ -89,6 +90,7 @@ TEST_F(ParserImplTest, ImportDecl_Invalid_MissingAs) { EXPECT_EQ(p->error(), "1:23: missing 'as' for import"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_inclusive_or_expression_test.cc b/src/reader/wgsl/parser_impl_inclusive_or_expression_test.cc index bc03c80329..34ba2b0798 100644 --- a/src/reader/wgsl/parser_impl_inclusive_or_expression_test.cc +++ b/src/reader/wgsl/parser_impl_inclusive_or_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, InclusiveOrExpression_Parses) { auto p = parser("a | true"); @@ -69,6 +70,7 @@ TEST_F(ParserImplTest, InclusiveOrExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_logical_and_expression_test.cc b/src/reader/wgsl/parser_impl_logical_and_expression_test.cc index 3961a5e22c..4ae25104b3 100644 --- a/src/reader/wgsl/parser_impl_logical_and_expression_test.cc +++ b/src/reader/wgsl/parser_impl_logical_and_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, LogicalAndExpression_Parses) { auto p = parser("a && true"); @@ -69,6 +70,7 @@ TEST_F(ParserImplTest, LogicalAndExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_logical_or_expression_test.cc b/src/reader/wgsl/parser_impl_logical_or_expression_test.cc index 3de18d4139..c7e1468304 100644 --- a/src/reader/wgsl/parser_impl_logical_or_expression_test.cc +++ b/src/reader/wgsl/parser_impl_logical_or_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, LogicalOrExpression_Parses) { auto p = parser("a || true"); @@ -69,6 +70,7 @@ TEST_F(ParserImplTest, LogicalOrExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_loop_stmt_test.cc b/src/reader/wgsl/parser_impl_loop_stmt_test.cc index 7520c4fce0..434ace5acf 100644 --- a/src/reader/wgsl/parser_impl_loop_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_loop_stmt_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, LoopStmt_BodyNoContinuing) { auto p = parser("loop { nop; }"); @@ -96,6 +97,7 @@ TEST_F(ParserImplTest, LoopStmt_InvalidContinuing) { EXPECT_EQ(p->error(), "1:26: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_multiplicative_expression_test.cc b/src/reader/wgsl/parser_impl_multiplicative_expression_test.cc index 530806d65c..e46e47ffa0 100644 --- a/src/reader/wgsl/parser_impl_multiplicative_expression_test.cc +++ b/src/reader/wgsl/parser_impl_multiplicative_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, MultiplicativeExpression_Parses_Multiply) { auto p = parser("a * true"); @@ -113,6 +114,7 @@ TEST_F(ParserImplTest, MultiplicativeExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_param_list_test.cc b/src/reader/wgsl/parser_impl_param_list_test.cc index 0c7702b255..f337f65cf4 100644 --- a/src/reader/wgsl/parser_impl_param_list_test.cc +++ b/src/reader/wgsl/parser_impl_param_list_test.cc @@ -26,6 +26,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ParamList_Single) { auto i32 = tm()->Get(std::make_unique()); @@ -73,6 +74,7 @@ TEST_F(ParserImplTest, ParamList_HangingComma) { EXPECT_EQ(p->error(), "1:8: found , but no variable declaration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_paren_rhs_stmt_test.cc b/src/reader/wgsl/parser_impl_paren_rhs_stmt_test.cc index e19fe9633a..295581592e 100644 --- a/src/reader/wgsl/parser_impl_paren_rhs_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_paren_rhs_stmt_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ParenRhsStmt) { auto p = parser("(a + b)"); @@ -60,6 +61,7 @@ TEST_F(ParserImplTest, ParenRhsStmt_MissingExpression) { EXPECT_EQ(p->error(), "1:2: unable to parse expression"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_pipeline_stage_test.cc b/src/reader/wgsl/parser_impl_pipeline_stage_test.cc index 53ede15c9a..d36cb0ad84 100644 --- a/src/reader/wgsl/parser_impl_pipeline_stage_test.cc +++ b/src/reader/wgsl/parser_impl_pipeline_stage_test.cc @@ -54,8 +54,6 @@ class PipelineStageTest : public testing::TestWithParam { TypeManager tm_; }; -} // namespace - TEST_P(PipelineStageTest, Parses) { auto params = GetParam(); auto p = parser(params.input); @@ -85,6 +83,7 @@ TEST_F(ParserImplTest, PipelineStage_NoMatch) { EXPECT_EQ(t.to_str(), "not"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_postfix_expression_test.cc b/src/reader/wgsl/parser_impl_postfix_expression_test.cc index 47611b0adf..74dea91d9b 100644 --- a/src/reader/wgsl/parser_impl_postfix_expression_test.cc +++ b/src/reader/wgsl/parser_impl_postfix_expression_test.cc @@ -28,6 +28,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, PostfixExpression_Array_ConstantIndex) { auto p = parser("a[1]"); @@ -194,6 +195,7 @@ TEST_F(ParserImplTest, PostfixExpression_NonMatch_returnLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_premerge_stmt_test.cc b/src/reader/wgsl/parser_impl_premerge_stmt_test.cc index 9688c06c2f..377b74bace 100644 --- a/src/reader/wgsl/parser_impl_premerge_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_premerge_stmt_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, PremergeStmt) { auto p = parser("premerge { nop; }"); @@ -36,6 +37,7 @@ TEST_F(ParserImplTest, PremergeStmt_InvalidBody) { EXPECT_EQ(p->error(), "1:16: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_primary_expression_test.cc b/src/reader/wgsl/parser_impl_primary_expression_test.cc index 824fd2be4c..a6c24785f9 100644 --- a/src/reader/wgsl/parser_impl_primary_expression_test.cc +++ b/src/reader/wgsl/parser_impl_primary_expression_test.cc @@ -33,6 +33,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, PrimaryExpression_Ident) { auto p = parser("a"); @@ -323,6 +324,7 @@ TEST_F(ParserImplTest, PrimaryExpression_As_InvalidExpression) { EXPECT_EQ(p->error(), "1:9: unable to parse expression"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_regardless_stmt_test.cc b/src/reader/wgsl/parser_impl_regardless_stmt_test.cc index 92aa8c85cc..54933524e6 100644 --- a/src/reader/wgsl/parser_impl_regardless_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_regardless_stmt_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, RegardlessStmt) { auto p = parser("regardless (a) { kill; }"); @@ -56,6 +57,7 @@ TEST_F(ParserImplTest, RegardlessStmt_InvalidBody) { EXPECT_EQ(p->error(), "1:38: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_relational_expression_test.cc b/src/reader/wgsl/parser_impl_relational_expression_test.cc index 3b3a1486c9..b7a41d6fce 100644 --- a/src/reader/wgsl/parser_impl_relational_expression_test.cc +++ b/src/reader/wgsl/parser_impl_relational_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, RelationalExpression_Parses_LessThan) { auto p = parser("a < true"); @@ -135,6 +136,7 @@ TEST_F(ParserImplTest, RelationalExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_shift_expression_test.cc b/src/reader/wgsl/parser_impl_shift_expression_test.cc index e9d7273f22..0fd54b9457 100644 --- a/src/reader/wgsl/parser_impl_shift_expression_test.cc +++ b/src/reader/wgsl/parser_impl_shift_expression_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, ShiftExpression_Parses_ShiftLeft) { auto p = parser("a << true"); @@ -113,6 +114,7 @@ TEST_F(ParserImplTest, ShiftExpression_NoOr_ReturnsLHS) { ASSERT_TRUE(e->IsIdentifier()); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_statement_test.cc b/src/reader/wgsl/parser_impl_statement_test.cc index e5f8457ed9..3a4d846927 100644 --- a/src/reader/wgsl/parser_impl_statement_test.cc +++ b/src/reader/wgsl/parser_impl_statement_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, Statement) { auto p = parser("return;"); @@ -284,6 +285,7 @@ TEST_F(ParserImplTest, Statement_Nop_MissingSemicolon) { EXPECT_EQ(p->error(), "1:4: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_statements_test.cc b/src/reader/wgsl/parser_impl_statements_test.cc index 82492344d1..8a07abc05e 100644 --- a/src/reader/wgsl/parser_impl_statements_test.cc +++ b/src/reader/wgsl/parser_impl_statements_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, Statements) { auto p = parser("nop; kill; return;"); @@ -38,6 +39,7 @@ TEST_F(ParserImplTest, Statements_Empty) { ASSERT_EQ(e.size(), 0); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_storage_class_test.cc b/src/reader/wgsl/parser_impl_storage_class_test.cc index 7e233cb3ac..986b8ab860 100644 --- a/src/reader/wgsl/parser_impl_storage_class_test.cc +++ b/src/reader/wgsl/parser_impl_storage_class_test.cc @@ -54,8 +54,6 @@ class StorageClassTest : public testing::TestWithParam { TypeManager tm_; }; -} // namespace - TEST_P(StorageClassTest, Parses) { auto params = GetParam(); auto p = parser(params.input); @@ -93,6 +91,7 @@ TEST_F(ParserImplTest, StorageClass_NoMatch) { EXPECT_EQ(t.to_str(), "not"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_struct_body_decl_test.cc b/src/reader/wgsl/parser_impl_struct_body_decl_test.cc index e2f1cc5cb3..0bee981e21 100644 --- a/src/reader/wgsl/parser_impl_struct_body_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_body_decl_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, StructBodyDecl_Parses) { auto i32 = tm()->Get(std::make_unique()); @@ -71,6 +72,7 @@ TEST_F(ParserImplTest, StructBodyDecl_InvalidToken) { EXPECT_EQ(p->error(), "4:3: invalid identifier declaration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_struct_decl_test.cc b/src/reader/wgsl/parser_impl_struct_decl_test.cc index 1770384611..b4092899c6 100644 --- a/src/reader/wgsl/parser_impl_struct_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_decl_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, StructDecl_Parses) { auto p = parser(R"( @@ -89,6 +90,7 @@ TEST_F(ParserImplTest, StructDecl_MissingStruct) { EXPECT_EQ(p->error(), "1:11: missing struct declaration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc b/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc index 3af41dded1..a22bab09f5 100644 --- a/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_decoration_decl_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, StructDecorationDecl_Parses) { auto p = parser("[[block]]"); @@ -41,6 +42,7 @@ TEST_F(ParserImplTest, StructDecorationDecl_InvalidDecoration) { EXPECT_EQ(p->error(), "1:3: unknown struct decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_struct_decoration_test.cc b/src/reader/wgsl/parser_impl_struct_decoration_test.cc index d8fa67558d..ae2ff1c40c 100644 --- a/src/reader/wgsl/parser_impl_struct_decoration_test.cc +++ b/src/reader/wgsl/parser_impl_struct_decoration_test.cc @@ -55,8 +55,6 @@ class StructDecorationTest TypeManager tm_; }; -} // namespace - TEST_P(StructDecorationTest, Parses) { auto params = GetParam(); auto p = parser(params.input); @@ -83,6 +81,7 @@ TEST_F(ParserImplTest, StructDecoration_NoMatch) { EXPECT_EQ(t.to_str(), "not"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc b/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc index 7aed2c3c83..2fec9d664e 100644 --- a/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc +++ b/src/reader/wgsl/parser_impl_struct_member_decoration_decl_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, StructMemberDecorationDecl_EmptyStr) { auto p = parser(""); @@ -64,6 +65,7 @@ TEST_F(ParserImplTest, StructMemberDecorationDecl_MissingClose) { EXPECT_EQ(p->error(), "1:11: missing ]] for struct member decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_struct_member_decoration_test.cc b/src/reader/wgsl/parser_impl_struct_member_decoration_test.cc index 9f11c434aa..0bc2a92e45 100644 --- a/src/reader/wgsl/parser_impl_struct_member_decoration_test.cc +++ b/src/reader/wgsl/parser_impl_struct_member_decoration_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, StructMemberDecoration_Offset) { auto p = parser("offset 4"); @@ -48,6 +49,7 @@ TEST_F(ParserImplTest, StructMemberDecoration_Offset_MissingInvalid) { EXPECT_EQ(p->error(), "1:8: invalid value for offset decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_struct_member_test.cc b/src/reader/wgsl/parser_impl_struct_member_test.cc index 3e1c9afb8a..3f630ef192 100644 --- a/src/reader/wgsl/parser_impl_struct_member_test.cc +++ b/src/reader/wgsl/parser_impl_struct_member_test.cc @@ -22,6 +22,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, StructMember_Parses) { auto i32 = tm()->Get(std::make_unique()); @@ -75,6 +76,7 @@ TEST_F(ParserImplTest, StructMember_MissingSemicolon) { EXPECT_EQ(p->error(), "1:8: missing ; for struct member"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_switch_body_test.cc b/src/reader/wgsl/parser_impl_switch_body_test.cc index fdd4fbb05d..a6780ff43e 100644 --- a/src/reader/wgsl/parser_impl_switch_body_test.cc +++ b/src/reader/wgsl/parser_impl_switch_body_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, SwitchBody_Case) { auto p = parser("case 1: { a = 4; }"); @@ -123,6 +124,7 @@ TEST_F(ParserImplTest, SwitchBody_Default_InvalidCaseBody) { EXPECT_EQ(p->error(), "1:12: missing } for case statement"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_switch_stmt_test.cc b/src/reader/wgsl/parser_impl_switch_stmt_test.cc index 36da865c95..f9d9710816 100644 --- a/src/reader/wgsl/parser_impl_switch_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_switch_stmt_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, SwitchStmt_WithoutDefault) { auto p = parser(R"(switch(a) { @@ -104,6 +105,7 @@ TEST_F(ParserImplTest, SwitchStmt_InvalidBody) { EXPECT_EQ(p->error(), "2:7: unable to parse case conditional"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_test.cc b/src/reader/wgsl/parser_impl_test.cc index d2c18cc6cf..c4fa4420f1 100644 --- a/src/reader/wgsl/parser_impl_test.cc +++ b/src/reader/wgsl/parser_impl_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, Empty) { auto p = parser(""); @@ -74,6 +75,7 @@ TEST_F(ParserImplTest, GetUnregisteredType) { ASSERT_EQ(alias, nullptr); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_type_alias_test.cc b/src/reader/wgsl/parser_impl_type_alias_test.cc index 28ab134bb3..e0dbacd6d8 100644 --- a/src/reader/wgsl/parser_impl_type_alias_test.cc +++ b/src/reader/wgsl/parser_impl_type_alias_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, TypeDecl_ParsesType) { auto i32 = tm()->Get(std::make_unique()); @@ -87,6 +88,7 @@ TEST_F(ParserImplTest, TypeDecl_InvalidStruct) { EXPECT_EQ(p->error(), "1:20: missing struct declaration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_type_decl_test.cc b/src/reader/wgsl/parser_impl_type_decl_test.cc index 24be1b5911..13a465714b 100644 --- a/src/reader/wgsl/parser_impl_type_decl_test.cc +++ b/src/reader/wgsl/parser_impl_type_decl_test.cc @@ -30,6 +30,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, TypeDecl_Invalid) { auto p = parser("1234"); @@ -701,6 +702,7 @@ INSTANTIATE_TEST_SUITE_P(ParserImplTest, MatrixData{"mat4x3<>", 4, 3}, MatrixData{"mat4x4<>", 4, 4})); +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_unary_expression_test.cc b/src/reader/wgsl/parser_impl_unary_expression_test.cc index 614124389c..37ac9cf84b 100644 --- a/src/reader/wgsl/parser_impl_unary_expression_test.cc +++ b/src/reader/wgsl/parser_impl_unary_expression_test.cc @@ -26,6 +26,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, UnaryExpression_Postix) { auto p = parser("a[2]"); @@ -840,6 +841,8 @@ TEST_F(ParserImplTest, UnaryExpression_Fwidht_InvalidIdentifeir) { ASSERT_EQ(e, nullptr); EXPECT_EQ(p->error(), "1:16: missing identifier for derivative method"); } + +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_unless_stmt_test.cc b/src/reader/wgsl/parser_impl_unless_stmt_test.cc index c9c419ce49..25cb4ef16b 100644 --- a/src/reader/wgsl/parser_impl_unless_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_unless_stmt_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, UnlessStmt) { auto p = parser("unless (a) { kill; }"); @@ -56,6 +57,7 @@ TEST_F(ParserImplTest, UnlessStmt_InvalidBody) { EXPECT_EQ(p->error(), "1:34: missing ;"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_variable_decl_test.cc b/src/reader/wgsl/parser_impl_variable_decl_test.cc index a9220cbef9..a4ca5851e5 100644 --- a/src/reader/wgsl/parser_impl_variable_decl_test.cc +++ b/src/reader/wgsl/parser_impl_variable_decl_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, VariableDecl_Parses) { auto p = parser("var my_var : f32"); @@ -69,6 +70,7 @@ TEST_F(ParserImplTest, VariableDecl_InvalidStorageClass) { EXPECT_EQ(p->error(), "1:5: invalid storage class for variable decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc b/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc index 6adbd5d79f..8552e7d6a8 100644 --- a/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc +++ b/src/reader/wgsl/parser_impl_variable_decoration_list_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, VariableDecorationList_Parses) { auto p = parser(R"([[location 4, builtin position]])"); @@ -75,6 +76,7 @@ TEST_F(ParserImplTest, VariableDecorationList_InvalidBuiltin) { ASSERT_EQ(p->error(), "1:11: invalid value for builtin decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_variable_decoration_test.cc b/src/reader/wgsl/parser_impl_variable_decoration_test.cc index 5001f4a884..2a6a766ea5 100644 --- a/src/reader/wgsl/parser_impl_variable_decoration_test.cc +++ b/src/reader/wgsl/parser_impl_variable_decoration_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, VariableDecoration_Location) { auto p = parser("location 4"); @@ -132,6 +133,7 @@ TEST_F(ParserImplTest, VariableDecoration_Set_MissingInvalid) { EXPECT_EQ(p->error(), "1:5: invalid value for set decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc b/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc index 458390f0dd..a9f016623a 100644 --- a/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc +++ b/src/reader/wgsl/parser_impl_variable_ident_decl_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, VariableIdentDecl_Parses) { auto p = parser("my_var : f32"); @@ -78,6 +79,7 @@ TEST_F(ParserImplTest, VariableIdentDecl_InvalidType) { ASSERT_EQ(p->error(), "1:10: unknown type alias 'invalid'"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_variable_stmt_test.cc b/src/reader/wgsl/parser_impl_variable_stmt_test.cc index c090053c67..10b5728946 100644 --- a/src/reader/wgsl/parser_impl_variable_stmt_test.cc +++ b/src/reader/wgsl/parser_impl_variable_stmt_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { TEST_F(ParserImplTest, VariableStmt_VariableDecl) { auto p = parser("var a : i32;"); @@ -103,6 +104,7 @@ TEST_F(ParserImplTest, VariableStmt_Const_InvalidInitializer) { EXPECT_EQ(p->error(), "1:17: missing initializer for const declaration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_impl_variable_storage_decoration_test.cc b/src/reader/wgsl/parser_impl_variable_storage_decoration_test.cc index 845118c7e7..e82a44d7a5 100644 --- a/src/reader/wgsl/parser_impl_variable_storage_decoration_test.cc +++ b/src/reader/wgsl/parser_impl_variable_storage_decoration_test.cc @@ -54,8 +54,6 @@ class VariableStorageTest : public testing::TestWithParam { TypeManager tm_; }; -} // namespace - TEST_P(VariableStorageTest, Parses) { auto params = GetParam(); auto p = parser(std::string("<") + params.input + ">"); @@ -118,6 +116,7 @@ TEST_F(ParserImplTest, VariableStorageDecoration_MissingGreaterThan) { ASSERT_EQ(p->error(), "1:4: missing > for variable decoration"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/parser_test.cc b/src/reader/wgsl/parser_test.cc index 4788e09cf5..1d937209ec 100644 --- a/src/reader/wgsl/parser_test.cc +++ b/src/reader/wgsl/parser_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { using ParserTest = testing::Test; @@ -67,6 +68,7 @@ fn main() -> { # missing return type EXPECT_EQ(p.error(), "4:15: missing return type for function"); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/reader/wgsl/token_test.cc b/src/reader/wgsl/token_test.cc index d4fbc42081..c6dc9f5dd2 100644 --- a/src/reader/wgsl/token_test.cc +++ b/src/reader/wgsl/token_test.cc @@ -21,6 +21,7 @@ namespace tint { namespace reader { namespace wgsl { +namespace { using TokenTest = testing::Test; @@ -71,6 +72,7 @@ TEST_F(TokenTest, Source) { EXPECT_EQ(t.column(), 9); } +} // namespace } // namespace wgsl } // namespace reader } // namespace tint diff --git a/src/type_manager_test.cc b/src/type_manager_test.cc index 5a90dd1477..004450fd8e 100644 --- a/src/type_manager_test.cc +++ b/src/type_manager_test.cc @@ -19,6 +19,7 @@ #include "src/ast/type/u32_type.h" namespace tint { +namespace { using TypeManagerTest = testing::Test; @@ -51,4 +52,5 @@ TEST_F(TypeManagerTest, GetDifferentTypeReturnsDifferentPtr) { EXPECT_TRUE(t2->IsU32()); } +} // namespace } // namespace tint diff --git a/src/writer/spirv/binary_writer_test.cc b/src/writer/spirv/binary_writer_test.cc index 564bb066a3..2a574c4ffc 100644 --- a/src/writer/spirv/binary_writer_test.cc +++ b/src/writer/spirv/binary_writer_test.cc @@ -23,6 +23,7 @@ namespace tint { namespace writer { namespace spirv { +namespace { using BinaryWriterTest = testing::Test; @@ -126,6 +127,7 @@ TEST_F(BinaryWriterTest, TestInstructionWriter) { EXPECT_EQ(res[3], 4); } +} // namespace } // namespace spirv } // namespace writer } // namespace tint diff --git a/src/writer/spirv/builder_entry_point_test.cc b/src/writer/spirv/builder_entry_point_test.cc index 44213b42fe..c92df6f18e 100644 --- a/src/writer/spirv/builder_entry_point_test.cc +++ b/src/writer/spirv/builder_entry_point_test.cc @@ -25,6 +25,7 @@ namespace tint { namespace writer { namespace spirv { +namespace { using BuilderTest = testing::Test; @@ -101,6 +102,7 @@ INSTANTIATE_TEST_SUITE_P( // TODO(http://crbug.com/tint/28) TEST_F(BuilderTest, DISABLED_EntryPoint_WithInterfaceIds) {} +} // namespace } // namespace spirv } // namespace writer } // namespace tint diff --git a/src/writer/spirv/builder_function_test.cc b/src/writer/spirv/builder_function_test.cc index 891675da09..7022e0d15f 100644 --- a/src/writer/spirv/builder_function_test.cc +++ b/src/writer/spirv/builder_function_test.cc @@ -25,6 +25,7 @@ namespace tint { namespace writer { namespace spirv { +namespace { using BuilderTest = testing::Test; @@ -74,7 +75,7 @@ TEST_F(BuilderTest, FunctionType_DeDuplicate) { )"); } - +} // namespace } // namespace spirv } // namespace writer } // namespace tint diff --git a/src/writer/spirv/builder_test.cc b/src/writer/spirv/builder_test.cc index f92f62ea9b..de6fd7afb8 100644 --- a/src/writer/spirv/builder_test.cc +++ b/src/writer/spirv/builder_test.cc @@ -26,6 +26,7 @@ namespace tint { namespace writer { namespace spirv { +namespace { using BuilderTest = testing::Test; @@ -64,6 +65,7 @@ TEST_F(BuilderTest, TracksIdBounds) { EXPECT_EQ(6, b.id_bound()); } +} // namespace } // namespace spirv } // namespace writer } // namespace tint diff --git a/src/writer/spirv/builder_type_test.cc b/src/writer/spirv/builder_type_test.cc index 7dca01cd37..ccace3b695 100644 --- a/src/writer/spirv/builder_type_test.cc +++ b/src/writer/spirv/builder_type_test.cc @@ -35,6 +35,7 @@ namespace tint { namespace writer { namespace spirv { +namespace { using BuilderTest_Type = testing::Test; @@ -353,6 +354,7 @@ TEST_F(BuilderTest_Type, ReturnsGeneratedVoid) { ASSERT_FALSE(b.has_error()) << b.error(); } +} // namespace } // namespace spirv } // namespace writer } // namespace tint diff --git a/src/writer/spirv/instruction_test.cc b/src/writer/spirv/instruction_test.cc index 21b6e201c1..e147a4186e 100644 --- a/src/writer/spirv/instruction_test.cc +++ b/src/writer/spirv/instruction_test.cc @@ -20,6 +20,7 @@ namespace tint { namespace writer { namespace spirv { +namespace { using InstructionTest = testing::Test; @@ -46,6 +47,7 @@ TEST_F(InstructionTest, Length) { EXPECT_EQ(i.word_length(), 5); } +} // namespace } // namespace spirv } // namespace writer } // namespace tint diff --git a/src/writer/spirv/operand_test.cc b/src/writer/spirv/operand_test.cc index 04db16ffcd..681e8c4656 100644 --- a/src/writer/spirv/operand_test.cc +++ b/src/writer/spirv/operand_test.cc @@ -19,6 +19,7 @@ namespace tint { namespace writer { namespace spirv { +namespace { using OperandTest = testing::Test; @@ -60,6 +61,7 @@ TEST_F(OperandTest, Length_String_Empty) { EXPECT_EQ(o.length(), 1); } +} // namespace } // namespace spirv } // namespace writer } // namespace tint