[tint] Move 'using namespace' into anonymous namespace
This avoids ambiguous overloads when system headers define something
with the same name as the imported namespace.
Change-Id: Icb32783ab89e7aa1076a4e292c6a6ef74b5529e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/137062
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/src/tint/ast/builtin_texture_helper_test.cc b/src/tint/ast/builtin_texture_helper_test.cc
index 7f1e91a..5c548db9 100644
--- a/src/tint/ast/builtin_texture_helper_test.cc
+++ b/src/tint/ast/builtin_texture_helper_test.cc
@@ -20,12 +20,12 @@
#include "src/tint/type/sampled_texture.h"
#include "src/tint/type/texture_dimension.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::ast::test {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
utils::StringStream& operator<<(utils::StringStream& out, const TextureKind& kind) {
switch (kind) {
case TextureKind::kRegular:
diff --git a/src/tint/ast/transform/calculate_array_length.cc b/src/tint/ast/transform/calculate_array_length.cc
index 4a1c0c8..9ce16da 100644
--- a/src/tint/ast/transform/calculate_array_length.cc
+++ b/src/tint/ast/transform/calculate_array_length.cc
@@ -35,13 +35,12 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::CalculateArrayLength);
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::CalculateArrayLength::BufferSizeIntrinsic);
+namespace tint::ast::transform {
+namespace {
+
using namespace tint::builtin::fluent_types; // NOLINT
using namespace tint::number_suffixes; // NOLINT
-namespace tint::ast::transform {
-
-namespace {
-
bool ShouldRun(const Program* program) {
for (auto* fn : program->AST().Functions()) {
if (auto* sem_fn = program->Sem().Get(fn)) {
diff --git a/src/tint/ast/transform/decompose_strided_matrix_test.cc b/src/tint/ast/transform/decompose_strided_matrix_test.cc
index bc1d416..f1646ff 100644
--- a/src/tint/ast/transform/decompose_strided_matrix_test.cc
+++ b/src/tint/ast/transform/decompose_strided_matrix_test.cc
@@ -24,12 +24,12 @@
#include "src/tint/ast/transform/unshadow.h"
#include "src/tint/program_builder.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::ast::transform {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using DecomposeStridedMatrixTest = TransformTest;
TEST_F(DecomposeStridedMatrixTest, ShouldRunEmptyModule) {
diff --git a/src/tint/ast/transform/multiplanar_external_texture.cc b/src/tint/ast/transform/multiplanar_external_texture.cc
index 9c4c62c..db1ae5a 100644
--- a/src/tint/ast/transform/multiplanar_external_texture.cc
+++ b/src/tint/ast/transform/multiplanar_external_texture.cc
@@ -27,12 +27,12 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::MultiplanarExternalTexture);
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::MultiplanarExternalTexture::NewBindingPoints);
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::ast::transform {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
bool ShouldRun(const Program* program) {
auto ext = program->Types().Find<type::ExternalTexture>();
return ext != nullptr;
diff --git a/src/tint/ast/transform/preserve_padding.cc b/src/tint/ast/transform/preserve_padding.cc
index 69e6d25..3f51fa4 100644
--- a/src/tint/ast/transform/preserve_padding.cc
+++ b/src/tint/ast/transform/preserve_padding.cc
@@ -26,11 +26,11 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::PreservePadding);
+namespace tint::ast::transform {
+
using namespace tint::builtin::fluent_types; // NOLINT
using namespace tint::number_suffixes; // NOLINT
-namespace tint::ast::transform {
-
PreservePadding::PreservePadding() = default;
PreservePadding::~PreservePadding() = default;
diff --git a/src/tint/ast/transform/robustness.cc b/src/tint/ast/transform/robustness.cc
index e0be9e5..e0cb752 100644
--- a/src/tint/ast/transform/robustness.cc
+++ b/src/tint/ast/transform/robustness.cc
@@ -35,11 +35,11 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::Robustness);
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::Robustness::Config);
+namespace tint::ast::transform {
+
using namespace tint::builtin::fluent_types; // NOLINT
using namespace tint::number_suffixes; // NOLINT
-namespace tint::ast::transform {
-
/// PIMPL state for the transform
struct Robustness::State {
/// Constructor
diff --git a/src/tint/ast/transform/vertex_pulling.cc b/src/tint/ast/transform/vertex_pulling.cc
index 375bfc3..54cb8c0 100644
--- a/src/tint/ast/transform/vertex_pulling.cc
+++ b/src/tint/ast/transform/vertex_pulling.cc
@@ -32,11 +32,11 @@
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::VertexPulling);
TINT_INSTANTIATE_TYPEINFO(tint::ast::transform::VertexPulling::Config);
+namespace tint::ast::transform {
+
using namespace tint::builtin::fluent_types; // NOLINT
using namespace tint::number_suffixes; // NOLINT
-namespace tint::ast::transform {
-
namespace {
/// The base WGSL type of a component.
diff --git a/src/tint/ir/transform/block_decorated_structs_test.cc b/src/tint/ir/transform/block_decorated_structs_test.cc
index a333894..16d9ca2 100644
--- a/src/tint/ir/transform/block_decorated_structs_test.cc
+++ b/src/tint/ir/transform/block_decorated_structs_test.cc
@@ -21,12 +21,12 @@
#include "src/tint/type/pointer.h"
#include "src/tint/type/struct.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::ir::transform {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using IR_BlockDecoratedStructsTest = TransformTest;
TEST_F(IR_BlockDecoratedStructsTest, NoRootBlock) {
diff --git a/src/tint/ir/transform/var_for_dynamic_index_test.cc b/src/tint/ir/transform/var_for_dynamic_index_test.cc
index d9b7b8c..a8112b1 100644
--- a/src/tint/ir/transform/var_for_dynamic_index_test.cc
+++ b/src/tint/ir/transform/var_for_dynamic_index_test.cc
@@ -21,12 +21,12 @@
#include "src/tint/type/matrix.h"
#include "src/tint/type/struct.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::ir::transform {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using IR_VarForDynamicIndexTest = TransformTest;
TEST_F(IR_VarForDynamicIndexTest, NoModify_ConstantIndex_ArrayValue) {
diff --git a/src/tint/ir/validate_test.cc b/src/tint/ir/validate_test.cc
index b24843e..2f0bdbe 100644
--- a/src/tint/ir/validate_test.cc
+++ b/src/tint/ir/validate_test.cc
@@ -22,12 +22,12 @@
#include "src/tint/type/pointer.h"
#include "src/tint/type/struct.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::ir {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using IR_ValidateTest = IRTestHelper;
TEST_F(IR_ValidateTest, RootBlock_Var) {
diff --git a/src/tint/resolver/alias_analysis_test.cc b/src/tint/resolver/alias_analysis_test.cc
index 21d8758..1145304 100644
--- a/src/tint/resolver/alias_analysis_test.cc
+++ b/src/tint/resolver/alias_analysis_test.cc
@@ -18,12 +18,12 @@
#include "gmock/gmock.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
struct ResolverAliasAnalysisTest : public resolver::TestHelper, public testing::Test {};
// Base test harness for tests that pass two pointers to a function.
diff --git a/src/tint/resolver/array_accessor_test.cc b/src/tint/resolver/array_accessor_test.cc
index f9bc250..3b12afd 100644
--- a/src/tint/resolver/array_accessor_test.cc
+++ b/src/tint/resolver/array_accessor_test.cc
@@ -19,12 +19,12 @@
#include "src/tint/sem/index_accessor_expression.h"
#include "src/tint/type/reference.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using ResolverIndexAccessorTest = ResolverTest;
TEST_F(ResolverIndexAccessorTest, Matrix_Dynamic_F32) {
diff --git a/src/tint/resolver/attribute_validation_test.cc b/src/tint/resolver/attribute_validation_test.cc
index 741641e..5997b71 100644
--- a/src/tint/resolver/attribute_validation_test.cc
+++ b/src/tint/resolver/attribute_validation_test.cc
@@ -22,11 +22,11 @@
#include "gmock/gmock.h"
+namespace tint::resolver {
+
using namespace tint::builtin::fluent_types; // NOLINT
using namespace tint::number_suffixes; // NOLINT
-namespace tint::resolver {
-
// Helpers and typedefs
template <typename T>
using DataType = builder::DataType<T>;
diff --git a/src/tint/resolver/builtin_test.cc b/src/tint/resolver/builtin_test.cc
index 5d23b39..07abb21 100644
--- a/src/tint/resolver/builtin_test.cc
+++ b/src/tint/resolver/builtin_test.cc
@@ -43,12 +43,12 @@
using ::testing::ElementsAre;
using ::testing::HasSubstr;
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using ExpressionList = utils::Vector<const ast::Expression*, 8>;
using ResolverBuiltinTest = ResolverTest;
diff --git a/src/tint/resolver/builtin_validation_test.cc b/src/tint/resolver/builtin_validation_test.cc
index f24fc4b..3996aa9 100644
--- a/src/tint/resolver/builtin_validation_test.cc
+++ b/src/tint/resolver/builtin_validation_test.cc
@@ -19,12 +19,12 @@
#include "src/tint/sem/value_constructor.h"
#include "src/tint/utils/string_stream.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using ResolverBuiltinValidationTest = ResolverTest;
TEST_F(ResolverBuiltinValidationTest, FunctionTypeMustMatchReturnStatementType_void_fail) {
diff --git a/src/tint/resolver/call_validation_test.cc b/src/tint/resolver/call_validation_test.cc
index 571dd07..100e9c4 100644
--- a/src/tint/resolver/call_validation_test.cc
+++ b/src/tint/resolver/call_validation_test.cc
@@ -18,12 +18,12 @@
#include "src/tint/ast/call_statement.h"
#include "src/tint/resolver/resolver_test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using ResolverCallValidationTest = ResolverTest;
TEST_F(ResolverCallValidationTest, TooFewArgs) {
diff --git a/src/tint/resolver/const_eval_conversion_test.cc b/src/tint/resolver/const_eval_conversion_test.cc
index 582ce19..57d6c43 100644
--- a/src/tint/resolver/const_eval_conversion_test.cc
+++ b/src/tint/resolver/const_eval_conversion_test.cc
@@ -16,12 +16,12 @@
#include "src/tint/resolver/const_eval_test.h"
#include "src/tint/sem/materialize.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
enum class Kind {
kScalar,
kVector,
diff --git a/src/tint/resolver/const_eval_indexing_test.cc b/src/tint/resolver/const_eval_indexing_test.cc
index 0358d5a..a67843b 100644
--- a/src/tint/resolver/const_eval_indexing_test.cc
+++ b/src/tint/resolver/const_eval_indexing_test.cc
@@ -14,12 +14,12 @@
#include "src/tint/resolver/const_eval_test.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
TEST_F(ResolverConstEvalTest, Vec3_Index) {
auto* expr = IndexAccessor(Call<vec3<i32>>(1_i, 2_i, 3_i), 2_i);
WrapInFunction(expr);
diff --git a/src/tint/resolver/const_eval_member_access_test.cc b/src/tint/resolver/const_eval_member_access_test.cc
index 49b8e8c..3eb9644 100644
--- a/src/tint/resolver/const_eval_member_access_test.cc
+++ b/src/tint/resolver/const_eval_member_access_test.cc
@@ -14,12 +14,12 @@
#include "src/tint/resolver/const_eval_test.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
TEST_F(ResolverConstEvalTest, StructMemberAccess) {
Structure("Inner", utils::Vector{
Member("i1", ty.i32()),
diff --git a/src/tint/resolver/dependency_graph_test.cc b/src/tint/resolver/dependency_graph_test.cc
index 49856fd..88bdc13 100644
--- a/src/tint/resolver/dependency_graph_test.cc
+++ b/src/tint/resolver/dependency_graph_test.cc
@@ -23,13 +23,12 @@
#include "src/tint/type/texture_dimension.h"
#include "src/tint/utils/transform.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
using ::testing::ElementsAre;
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
template <typename T>
class ResolverDependencyGraphTestWithParam : public ResolverTestWithParam<T> {
diff --git a/src/tint/resolver/function_validation_test.cc b/src/tint/resolver/function_validation_test.cc
index cc5f746..1ea121d 100644
--- a/src/tint/resolver/function_validation_test.cc
+++ b/src/tint/resolver/function_validation_test.cc
@@ -22,12 +22,12 @@
#include "gmock/gmock.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
class ResolverFunctionValidationTest : public TestHelper, public testing::Test {};
TEST_F(ResolverFunctionValidationTest, DuplicateParameterName) {
diff --git a/src/tint/resolver/type_validation_test.cc b/src/tint/resolver/type_validation_test.cc
index cd6a66d..117b2ad 100644
--- a/src/tint/resolver/type_validation_test.cc
+++ b/src/tint/resolver/type_validation_test.cc
@@ -23,12 +23,12 @@
#include "gmock/gmock.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
// Helpers and typedefs
template <typename T>
using DataType = builder::DataType<T>;
diff --git a/src/tint/resolver/uniformity_test.cc b/src/tint/resolver/uniformity_test.cc
index 5bf5fda..1cb9142 100644
--- a/src/tint/resolver/uniformity_test.cc
+++ b/src/tint/resolver/uniformity_test.cc
@@ -25,12 +25,12 @@
#include "gmock/gmock.h"
#include "gtest/gtest.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
class UniformityAnalysisTestBase {
protected:
/// Build and resolve a program from a ProgramBuilder object.
diff --git a/src/tint/resolver/validation_test.cc b/src/tint/resolver/validation_test.cc
index 238120f..23fb56a 100644
--- a/src/tint/resolver/validation_test.cc
+++ b/src/tint/resolver/validation_test.cc
@@ -40,15 +40,14 @@
#include "src/tint/type/sampled_texture.h"
#include "src/tint/type/texture_dimension.h"
-using ::testing::ElementsAre;
-using ::testing::HasSubstr;
-
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using ::testing::ElementsAre;
+using ::testing::HasSubstr;
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using ResolverValidationTest = ResolverTest;
class FakeStmt final : public utils::Castable<FakeStmt, ast::Statement> {
diff --git a/src/tint/resolver/variable_validation_test.cc b/src/tint/resolver/variable_validation_test.cc
index d29f8b0..44cc973 100644
--- a/src/tint/resolver/variable_validation_test.cc
+++ b/src/tint/resolver/variable_validation_test.cc
@@ -17,12 +17,12 @@
#include "src/tint/resolver/resolver_test_helper.h"
#include "src/tint/type/texture_dimension.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::resolver {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
struct ResolverVariableValidationTest : public resolver::TestHelper, public testing::Test {};
TEST_F(ResolverVariableValidationTest, VarNoInitializerNoType) {
diff --git a/src/tint/writer/glsl/generator_impl_builtin_test.cc b/src/tint/writer/glsl/generator_impl_builtin_test.cc
index 18fa324..78765ef 100644
--- a/src/tint/writer/glsl/generator_impl_builtin_test.cc
+++ b/src/tint/writer/glsl/generator_impl_builtin_test.cc
@@ -19,14 +19,13 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/glsl/test_helper.h"
-using ::testing::HasSubstr;
-
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::glsl {
namespace {
+using ::testing::HasSubstr;
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using GlslGeneratorImplTest_Builtin = TestHelper;
enum class CallParamType {
diff --git a/src/tint/writer/glsl/generator_impl_cast_test.cc b/src/tint/writer/glsl/generator_impl_cast_test.cc
index b39bc2e..870e46e 100644
--- a/src/tint/writer/glsl/generator_impl_cast_test.cc
+++ b/src/tint/writer/glsl/generator_impl_cast_test.cc
@@ -17,12 +17,12 @@
#include "gmock/gmock.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::glsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using GlslGeneratorImplTest_Cast = TestHelper;
TEST_F(GlslGeneratorImplTest_Cast, EmitExpression_Cast_Scalar) {
diff --git a/src/tint/writer/glsl/generator_impl_constructor_test.cc b/src/tint/writer/glsl/generator_impl_constructor_test.cc
index d0fc0bc..8a18dc7 100644
--- a/src/tint/writer/glsl/generator_impl_constructor_test.cc
+++ b/src/tint/writer/glsl/generator_impl_constructor_test.cc
@@ -15,13 +15,12 @@
#include "gmock/gmock.h"
#include "src/tint/writer/glsl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::glsl {
namespace {
using ::testing::HasSubstr;
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
using GlslGeneratorImplTest_Constructor = TestHelper;
diff --git a/src/tint/writer/hlsl/generator_impl_binary_test.cc b/src/tint/writer/hlsl/generator_impl_binary_test.cc
index f851976..5269dca 100644
--- a/src/tint/writer/hlsl/generator_impl_binary_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_binary_test.cc
@@ -17,12 +17,12 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/hlsl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::hlsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using HlslGeneratorImplTest_Binary = TestHelper;
struct BinaryData {
diff --git a/src/tint/writer/hlsl/generator_impl_builtin_test.cc b/src/tint/writer/hlsl/generator_impl_builtin_test.cc
index 415917a..16dfcea 100644
--- a/src/tint/writer/hlsl/generator_impl_builtin_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_builtin_test.cc
@@ -19,14 +19,13 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/hlsl/test_helper.h"
-using ::testing::HasSubstr;
-
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::hlsl {
namespace {
+using ::testing::HasSubstr;
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using HlslGeneratorImplTest_Builtin = TestHelper;
enum class CallParamType {
diff --git a/src/tint/writer/hlsl/generator_impl_cast_test.cc b/src/tint/writer/hlsl/generator_impl_cast_test.cc
index ac269c8..6484974 100644
--- a/src/tint/writer/hlsl/generator_impl_cast_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_cast_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/hlsl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::hlsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using HlslGeneratorImplTest_Cast = TestHelper;
TEST_F(HlslGeneratorImplTest_Cast, EmitExpression_Cast_Scalar) {
diff --git a/src/tint/writer/hlsl/generator_impl_constructor_test.cc b/src/tint/writer/hlsl/generator_impl_constructor_test.cc
index 38a333d..bdb05ba 100644
--- a/src/tint/writer/hlsl/generator_impl_constructor_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_constructor_test.cc
@@ -15,13 +15,12 @@
#include "gmock/gmock.h"
#include "src/tint/writer/hlsl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::hlsl {
namespace {
using ::testing::HasSubstr;
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
using HlslGeneratorImplTest_Constructor = TestHelper;
diff --git a/src/tint/writer/hlsl/generator_impl_import_test.cc b/src/tint/writer/hlsl/generator_impl_import_test.cc
index 17efb89..1b78943 100644
--- a/src/tint/writer/hlsl/generator_impl_import_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_import_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/hlsl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::hlsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using HlslGeneratorImplTest_Import = TestHelper;
struct HlslImportData {
diff --git a/src/tint/writer/hlsl/generator_impl_module_constant_test.cc b/src/tint/writer/hlsl/generator_impl_module_constant_test.cc
index 009b85a..c4e4e01 100644
--- a/src/tint/writer/hlsl/generator_impl_module_constant_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_module_constant_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/ast/id_attribute.h"
#include "src/tint/writer/hlsl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::hlsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using HlslGeneratorImplTest_ModuleConstant = TestHelper;
TEST_F(HlslGeneratorImplTest_ModuleConstant, Emit_GlobalConst_AInt) {
diff --git a/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc b/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc
index 473e623..0d5ed73 100644
--- a/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc
+++ b/src/tint/writer/hlsl/generator_impl_sanitizer_test.cc
@@ -17,12 +17,12 @@
#include "src/tint/ast/variable_decl_statement.h"
#include "src/tint/writer/hlsl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::hlsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using HlslSanitizerTest = TestHelper;
TEST_F(HlslSanitizerTest, Call_ArrayLength) {
diff --git a/src/tint/writer/msl/generator_impl_builtin_test.cc b/src/tint/writer/msl/generator_impl_builtin_test.cc
index aae56b1..bb117b1 100644
--- a/src/tint/writer/msl/generator_impl_builtin_test.cc
+++ b/src/tint/writer/msl/generator_impl_builtin_test.cc
@@ -17,12 +17,12 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/msl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::msl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using MslGeneratorImplTest = TestHelper;
enum class CallParamType {
diff --git a/src/tint/writer/msl/generator_impl_cast_test.cc b/src/tint/writer/msl/generator_impl_cast_test.cc
index 77d2119..3895559 100644
--- a/src/tint/writer/msl/generator_impl_cast_test.cc
+++ b/src/tint/writer/msl/generator_impl_cast_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/msl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::msl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using MslGeneratorImplTest = TestHelper;
TEST_F(MslGeneratorImplTest, EmitExpression_Cast_Scalar) {
diff --git a/src/tint/writer/msl/generator_impl_constructor_test.cc b/src/tint/writer/msl/generator_impl_constructor_test.cc
index 22b7d5e..64c2629 100644
--- a/src/tint/writer/msl/generator_impl_constructor_test.cc
+++ b/src/tint/writer/msl/generator_impl_constructor_test.cc
@@ -15,13 +15,12 @@
#include "gmock/gmock.h"
#include "src/tint/writer/msl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::msl {
namespace {
using ::testing::HasSubstr;
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
using MslGeneratorImplTest_Constructor = TestHelper;
diff --git a/src/tint/writer/msl/generator_impl_function_test.cc b/src/tint/writer/msl/generator_impl_function_test.cc
index 1fbffe2..c8020f5 100644
--- a/src/tint/writer/msl/generator_impl_function_test.cc
+++ b/src/tint/writer/msl/generator_impl_function_test.cc
@@ -16,12 +16,12 @@
#include "src/tint/ast/variable_decl_statement.h"
#include "src/tint/writer/msl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::msl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using MslGeneratorImplTest = TestHelper;
TEST_F(MslGeneratorImplTest, Emit_Function) {
diff --git a/src/tint/writer/msl/generator_impl_import_test.cc b/src/tint/writer/msl/generator_impl_import_test.cc
index bab2b71..8b4a877 100644
--- a/src/tint/writer/msl/generator_impl_import_test.cc
+++ b/src/tint/writer/msl/generator_impl_import_test.cc
@@ -16,12 +16,12 @@
#include "src/tint/utils/string_stream.h"
#include "src/tint/writer/msl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::msl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using MslGeneratorImplTest = TestHelper;
struct MslImportData {
diff --git a/src/tint/writer/msl/generator_impl_module_constant_test.cc b/src/tint/writer/msl/generator_impl_module_constant_test.cc
index e3b8f86..4f99b31 100644
--- a/src/tint/writer/msl/generator_impl_module_constant_test.cc
+++ b/src/tint/writer/msl/generator_impl_module_constant_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/ast/id_attribute.h"
#include "src/tint/writer/msl/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::msl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using MslGeneratorImplTest = TestHelper;
TEST_F(MslGeneratorImplTest, Emit_GlobalConst_AInt) {
diff --git a/src/tint/writer/spirv/builder_accessor_expression_test.cc b/src/tint/writer/spirv/builder_accessor_expression_test.cc
index e14a79a..f42da66 100644
--- a/src/tint/writer/spirv/builder_accessor_expression_test.cc
+++ b/src/tint/writer/spirv/builder_accessor_expression_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
TEST_F(BuilderTest, Let_IndexAccessor_Vector) {
diff --git a/src/tint/writer/spirv/builder_assign_test.cc b/src/tint/writer/spirv/builder_assign_test.cc
index 11ae7940..d6d9d35 100644
--- a/src/tint/writer/spirv/builder_assign_test.cc
+++ b/src/tint/writer/spirv/builder_assign_test.cc
@@ -17,12 +17,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
TEST_F(BuilderTest, Assign_Var) {
diff --git a/src/tint/writer/spirv/builder_binary_expression_test.cc b/src/tint/writer/spirv/builder_binary_expression_test.cc
index 0a4c963..70dc106 100644
--- a/src/tint/writer/spirv/builder_binary_expression_test.cc
+++ b/src/tint/writer/spirv/builder_binary_expression_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
struct BinaryData {
diff --git a/src/tint/writer/spirv/builder_builtin_test.cc b/src/tint/writer/spirv/builder_builtin_test.cc
index a60dfd2..dd76407 100644
--- a/src/tint/writer/spirv/builder_builtin_test.cc
+++ b/src/tint/writer/spirv/builder_builtin_test.cc
@@ -20,12 +20,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuiltinBuilderTest = TestHelper;
template <typename T>
diff --git a/src/tint/writer/spirv/builder_constructor_expression_test.cc b/src/tint/writer/spirv/builder_constructor_expression_test.cc
index ea449cb..b1eb366 100644
--- a/src/tint/writer/spirv/builder_constructor_expression_test.cc
+++ b/src/tint/writer/spirv/builder_constructor_expression_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using SpvBuilderConstructorTest = TestHelper;
TEST_F(SpvBuilderConstructorTest, Const) {
diff --git a/src/tint/writer/spirv/builder_entry_point_test.cc b/src/tint/writer/spirv/builder_entry_point_test.cc
index b13eb1d..46ffb2d 100644
--- a/src/tint/writer/spirv/builder_entry_point_test.cc
+++ b/src/tint/writer/spirv/builder_entry_point_test.cc
@@ -29,12 +29,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
TEST_F(BuilderTest, EntryPoint_Parameters) {
diff --git a/src/tint/writer/spirv/builder_function_variable_test.cc b/src/tint/writer/spirv/builder_function_variable_test.cc
index c83def6..d85a761 100644
--- a/src/tint/writer/spirv/builder_function_variable_test.cc
+++ b/src/tint/writer/spirv/builder_function_variable_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
TEST_F(BuilderTest, FunctionVar_NoAddressSpace) {
diff --git a/src/tint/writer/spirv/builder_global_variable_test.cc b/src/tint/writer/spirv/builder_global_variable_test.cc
index b921d07..0640ec7 100644
--- a/src/tint/writer/spirv/builder_global_variable_test.cc
+++ b/src/tint/writer/spirv/builder_global_variable_test.cc
@@ -18,12 +18,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
TEST_F(BuilderTest, GlobalVar_WithAddressSpace) {
diff --git a/src/tint/writer/spirv/builder_ident_expression_test.cc b/src/tint/writer/spirv/builder_ident_expression_test.cc
index 55a24c4..1278cfc 100644
--- a/src/tint/writer/spirv/builder_ident_expression_test.cc
+++ b/src/tint/writer/spirv/builder_ident_expression_test.cc
@@ -16,12 +16,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
TEST_F(BuilderTest, IdentifierExpression_GlobalConst) {
diff --git a/src/tint/writer/spirv/builder_return_test.cc b/src/tint/writer/spirv/builder_return_test.cc
index a93a276..041092f 100644
--- a/src/tint/writer/spirv/builder_return_test.cc
+++ b/src/tint/writer/spirv/builder_return_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/writer/spirv/spv_dump.h"
#include "src/tint/writer/spirv/test_helper.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using BuilderTest = TestHelper;
TEST_F(BuilderTest, Return) {
diff --git a/src/tint/writer/spirv/ir/generator_impl_ir_access_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_access_test.cc
index 13a526f..36c1540 100644
--- a/src/tint/writer/spirv/ir/generator_impl_ir_access_test.cc
+++ b/src/tint/writer/spirv/ir/generator_impl_ir_access_test.cc
@@ -14,12 +14,12 @@
#include "src/tint/writer/spirv/ir/test_helper_ir.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using SpvGeneratorImplTest_Access = SpvGeneratorImplTest;
TEST_F(SpvGeneratorImplTest_Access, Array_Value_ConstantIndex) {
diff --git a/src/tint/writer/spirv/ir/generator_impl_ir_var_test.cc b/src/tint/writer/spirv/ir/generator_impl_ir_var_test.cc
index deff321..cc79eb3 100644
--- a/src/tint/writer/spirv/ir/generator_impl_ir_var_test.cc
+++ b/src/tint/writer/spirv/ir/generator_impl_ir_var_test.cc
@@ -15,12 +15,12 @@
#include "src/tint/type/pointer.h"
#include "src/tint/writer/spirv/ir/test_helper_ir.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::spirv {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
TEST_F(SpvGeneratorImplTest, FunctionVar_NoInit) {
auto* func = b.Function("foo", ty.void_());
diff --git a/src/tint/writer/wgsl/generator_impl_cast_test.cc b/src/tint/writer/wgsl/generator_impl_cast_test.cc
index 27c4546..16c20e0 100644
--- a/src/tint/writer/wgsl/generator_impl_cast_test.cc
+++ b/src/tint/writer/wgsl/generator_impl_cast_test.cc
@@ -17,12 +17,12 @@
#include "gmock/gmock.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::wgsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using WgslGeneratorImplTest = TestHelper;
TEST_F(WgslGeneratorImplTest, EmitExpression_Cast_Scalar_F32_From_I32) {
diff --git a/src/tint/writer/wgsl/generator_impl_type_test.cc b/src/tint/writer/wgsl/generator_impl_type_test.cc
index 835f353..22d7bf0 100644
--- a/src/tint/writer/wgsl/generator_impl_type_test.cc
+++ b/src/tint/writer/wgsl/generator_impl_type_test.cc
@@ -22,12 +22,12 @@
#include "gmock/gmock.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::wgsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using WgslGeneratorImplTest = TestHelper;
TEST_F(WgslGeneratorImplTest, EmitType_Alias) {
diff --git a/src/tint/writer/wgsl/generator_impl_variable_decl_statement_test.cc b/src/tint/writer/wgsl/generator_impl_variable_decl_statement_test.cc
index 78a4e3c..f4c271b 100644
--- a/src/tint/writer/wgsl/generator_impl_variable_decl_statement_test.cc
+++ b/src/tint/writer/wgsl/generator_impl_variable_decl_statement_test.cc
@@ -17,12 +17,12 @@
#include "gmock/gmock.h"
-using namespace tint::builtin::fluent_types; // NOLINT
-using namespace tint::number_suffixes; // NOLINT
-
namespace tint::writer::wgsl {
namespace {
+using namespace tint::builtin::fluent_types; // NOLINT
+using namespace tint::number_suffixes; // NOLINT
+
using WgslGeneratorImplTest = TestHelper;
TEST_F(WgslGeneratorImplTest, Emit_VariableDeclStatement) {