diff --git a/src/tint/lang/core/ir/transform/BUILD.bazel b/src/tint/lang/core/ir/transform/BUILD.bazel
index b75b761..467e451 100644
--- a/src/tint/lang/core/ir/transform/BUILD.bazel
+++ b/src/tint/lang/core/ir/transform/BUILD.bazel
@@ -151,6 +151,7 @@
     "//src/tint/lang/wgsl/program",
     "//src/tint/lang/wgsl/sem",
     "//src/tint/lang/wgsl/writer/ir_to_program",
+    "//src/tint/lang/wgsl/writer/raise",
     "//src/tint/utils/containers",
     "//src/tint/utils/diagnostic",
     "//src/tint/utils/ice",
diff --git a/src/tint/lang/core/ir/transform/BUILD.cmake b/src/tint/lang/core/ir/transform/BUILD.cmake
index 76a01e3..01120f4 100644
--- a/src/tint/lang/core/ir/transform/BUILD.cmake
+++ b/src/tint/lang/core/ir/transform/BUILD.cmake
@@ -141,6 +141,7 @@
   tint_lang_wgsl_program
   tint_lang_wgsl_sem
   tint_lang_wgsl_writer_ir_to_program
+  tint_lang_wgsl_writer_raise
   tint_utils_containers
   tint_utils_diagnostic
   tint_utils_ice
diff --git a/src/tint/lang/core/ir/transform/BUILD.gn b/src/tint/lang/core/ir/transform/BUILD.gn
index fbb325a..56910e6 100644
--- a/src/tint/lang/core/ir/transform/BUILD.gn
+++ b/src/tint/lang/core/ir/transform/BUILD.gn
@@ -143,6 +143,7 @@
       "${tint_src_dir}/lang/wgsl/program",
       "${tint_src_dir}/lang/wgsl/sem",
       "${tint_src_dir}/lang/wgsl/writer/ir_to_program",
+      "${tint_src_dir}/lang/wgsl/writer/raise",
       "${tint_src_dir}/utils/containers",
       "${tint_src_dir}/utils/diagnostic",
       "${tint_src_dir}/utils/ice",
diff --git a/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc b/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc
index 9f39916..49780b7 100644
--- a/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc
+++ b/src/tint/lang/core/ir/transform/direct_variable_access_wgsl_test.cc
@@ -36,6 +36,7 @@
 #include "src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h"
 #include "src/tint/lang/wgsl/reader/reader.h"
 #include "src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.h"
+#include "src/tint/lang/wgsl/writer/raise/raise.h"
 #include "src/tint/lang/wgsl/writer/writer.h"
 
 namespace tint::core::ir::transform {
@@ -62,12 +63,12 @@
         wgsl::reader::Options parser_options;
         parser_options.allowed_features = wgsl::AllowedFeatures::Everything();
         Source::File file{"test", in};
-        auto program = wgsl::reader::Parse(&file, parser_options);
-        if (!program.IsValid()) {
-            return "wgsl::reader::Parse() failed: \n" + program.Diagnostics().str();
+        auto program_in = wgsl::reader::Parse(&file, parser_options);
+        if (!program_in.IsValid()) {
+            return "wgsl::reader::Parse() failed: \n" + program_in.Diagnostics().str();
         }
 
-        auto module = wgsl::reader::ProgramToIR(program);
+        auto module = wgsl::reader::ProgramToIR(program_in);
         if (module != Success) {
             return "ProgramToIR() failed:\n" + module.Failure().reason.str();
         }
@@ -77,19 +78,27 @@
             return "DirectVariableAccess failed:\n" + res.Failure().reason.str();
         }
 
+        auto pre_raise = ir::Disassemble(module.Get());
+
+        if (auto raise = wgsl::writer::Raise(module.Get()); raise != Success) {
+            return "wgsl::writer::Raise failed:\n" + res.Failure().reason.str();
+        }
+
         wgsl::writer::ProgramOptions program_options;
         program_options.allowed_features.extensions.insert(
             wgsl::Extension::kChromiumExperimentalFullPtrParameters);
-        auto transformed = wgsl::writer::IRToProgram(module.Get(), program_options);
-        if (!transformed.IsValid()) {
-            return "wgsl::writer::IRToProgram() failed: \n" + transformed.Diagnostics().str() +
-                   "\n\nIR:\n" + ir::Disassemble(module.Get()) +  //
-                   "\n\nAST:\n" + Program::printer(transformed);
+        auto program_out = wgsl::writer::IRToProgram(module.Get(), program_options);
+        if (!program_out.IsValid()) {
+            return "wgsl::writer::IRToProgram() failed: \n" + program_out.Diagnostics().str() +
+                   "\n\nIR (pre):\n" + pre_raise +                       //
+                   "\n\nIR (post):\n" + ir::Disassemble(module.Get()) +  //
+                   "\n\nAST:\n" + Program::printer(program_out);
         }
 
-        auto output = wgsl::writer::Generate(transformed, wgsl::writer::Options{});
+        auto output = wgsl::writer::Generate(program_out, wgsl::writer::Options{});
         if (output != Success) {
-            return "wgsl::writer::Generate() failed: \n" + output.Failure().reason.str();
+            return "wgsl::writer::IRToProgram() failed: \n" + output.Failure().reason.str() +
+                   "\n\nIR:\n" + ir::Disassemble(module.Get());
         }
 
         return "\n" + output->wgsl;
diff --git a/src/tint/lang/wgsl/BUILD.bazel b/src/tint/lang/wgsl/BUILD.bazel
index f30a202..b945e60 100644
--- a/src/tint/lang/wgsl/BUILD.bazel
+++ b/src/tint/lang/wgsl/BUILD.bazel
@@ -94,12 +94,10 @@
     "//src/tint/lang/wgsl/ast",
     "//src/tint/lang/wgsl/common",
     "//src/tint/lang/wgsl/features",
-    "//src/tint/lang/wgsl/helpers:test",
     "//src/tint/lang/wgsl/program",
-    "//src/tint/lang/wgsl/reader/lower",
-    "//src/tint/lang/wgsl/resolver",
     "//src/tint/lang/wgsl/sem",
     "//src/tint/lang/wgsl/writer/ir_to_program",
+    "//src/tint/lang/wgsl/writer/raise",
     "//src/tint/utils/containers",
     "//src/tint/utils/diagnostic",
     "//src/tint/utils/ice",
diff --git a/src/tint/lang/wgsl/BUILD.cmake b/src/tint/lang/wgsl/BUILD.cmake
index 17f4d73..63b67a8 100644
--- a/src/tint/lang/wgsl/BUILD.cmake
+++ b/src/tint/lang/wgsl/BUILD.cmake
@@ -97,12 +97,10 @@
   tint_lang_wgsl_ast
   tint_lang_wgsl_common
   tint_lang_wgsl_features
-  tint_lang_wgsl_helpers_test
   tint_lang_wgsl_program
-  tint_lang_wgsl_reader_lower
-  tint_lang_wgsl_resolver
   tint_lang_wgsl_sem
   tint_lang_wgsl_writer_ir_to_program
+  tint_lang_wgsl_writer_raise
   tint_utils_containers
   tint_utils_diagnostic
   tint_utils_ice
diff --git a/src/tint/lang/wgsl/BUILD.gn b/src/tint/lang/wgsl/BUILD.gn
index 1b7590c..c63b21c 100644
--- a/src/tint/lang/wgsl/BUILD.gn
+++ b/src/tint/lang/wgsl/BUILD.gn
@@ -86,12 +86,10 @@
       "${tint_src_dir}/lang/wgsl/ast",
       "${tint_src_dir}/lang/wgsl/common",
       "${tint_src_dir}/lang/wgsl/features",
-      "${tint_src_dir}/lang/wgsl/helpers:unittests",
       "${tint_src_dir}/lang/wgsl/program",
-      "${tint_src_dir}/lang/wgsl/reader/lower",
-      "${tint_src_dir}/lang/wgsl/resolver",
       "${tint_src_dir}/lang/wgsl/sem",
       "${tint_src_dir}/lang/wgsl/writer/ir_to_program",
+      "${tint_src_dir}/lang/wgsl/writer/raise",
       "${tint_src_dir}/utils/containers",
       "${tint_src_dir}/utils/diagnostic",
       "${tint_src_dir}/utils/ice",
diff --git a/src/tint/lang/wgsl/ir_roundtrip_test.cc b/src/tint/lang/wgsl/ir_roundtrip_test.cc
index ab1b3d6..d3497d0 100644
--- a/src/tint/lang/wgsl/ir_roundtrip_test.cc
+++ b/src/tint/lang/wgsl/ir_roundtrip_test.cc
@@ -27,10 +27,13 @@
 
 // GEN_BUILD:CONDITION(tint_build_wgsl_reader && tint_build_wgsl_writer)
 
-#include "src/tint/lang/wgsl/helpers/ir_program_test.h"
+#include "gtest/gtest.h"
+
+#include "src/tint/lang/core/ir/disassembler.h"
 #include "src/tint/lang/wgsl/reader/program_to_ir/program_to_ir.h"
 #include "src/tint/lang/wgsl/reader/reader.h"
 #include "src/tint/lang/wgsl/writer/ir_to_program/ir_to_program.h"
+#include "src/tint/lang/wgsl/writer/raise/raise.h"
 #include "src/tint/lang/wgsl/writer/writer.h"
 #include "src/tint/utils/text/string.h"
 
@@ -39,60 +42,146 @@
 
 using namespace tint::core::number_suffixes;  // NOLINT
 
-class IRToProgramRoundtripTest : public helpers::IRProgramTest {
+class IRToProgramRoundtripTest : public testing::Test {
   public:
-    void Test(std::string_view input_wgsl, std::string_view expected_wgsl) {
+    struct Result {
+        /// The resulting WGSL
+        std::string wgsl;
+        /// The resulting AST
+        std::string ast;
+        /// The resulting IR before raising
+        std::string ir_pre_raise;
+        /// The resulting IR after raising
+        std::string ir_post_raise;
+        /// The resulting error
+        std::string err;
+        /// The expected WGSL
+        std::string expected;
+    };
+
+    /// @return the round-tripped string and the expected string
+    Result Run(std::string input_wgsl, std::string expected_wgsl) {
+        std::string input{tint::TrimSpace(input_wgsl)};
+
+        Result result;
+
         wgsl::reader::Options options;
         options.allowed_features = wgsl::AllowedFeatures::Everything();
-        auto input = tint::TrimSpace(input_wgsl);
         Source::File file("test.wgsl", std::string(input));
         auto ir_module = wgsl::reader::WgslToIR(&file, options);
-        ASSERT_EQ(ir_module, Success);
+        if (ir_module != Success) {
+            return result;
+        }
 
-        auto disassembly = tint::core::ir::Disassemble(ir_module.Get());
+        result.ir_pre_raise = core::ir::Disassemble(ir_module.Get());
+
+        if (auto res = tint::wgsl::writer::Raise(ir_module.Get()); res != Success) {
+            result.err = res.Failure().reason.str();
+            return result;
+        }
+
+        result.ir_post_raise = core::ir::Disassemble(ir_module.Get());
 
         writer::ProgramOptions program_options;
         program_options.allowed_features = AllowedFeatures::Everything();
-        auto output = wgsl::writer::WgslFromIR(ir_module.Get(), program_options);
-        if (output != Success) {
-            FAIL() << output.Failure() << std::endl  //
-                   << "IR:" << std::endl             //
-                   << disassembly << std::endl;
+        auto output_program = wgsl::writer::IRToProgram(ir_module.Get(), program_options);
+        if (!output_program.IsValid()) {
+            result.err = output_program.Diagnostics().str();
+            result.ast = Program::printer(output_program);
+            return result;
         }
 
-        auto expected = expected_wgsl.empty() ? input : tint::TrimSpace(expected_wgsl);
-        auto got = tint::TrimSpace(output->wgsl);
-        EXPECT_EQ(expected, got) << "IR:" << std::endl << disassembly;
+        auto output = wgsl::writer::Generate(output_program, {});
+        if (output != Success) {
+            std::stringstream ss;
+            ss << "wgsl::Generate() errored: " << output.Failure();
+            result.err = ss.str();
+            result.ast = Program::printer(output_program);
+            return result;
+        }
+
+        result.expected = expected_wgsl.empty() ? input : tint::TrimSpace(expected_wgsl);
+        if (!result.expected.empty()) {
+            result.expected = "\n" + result.expected + "\n";
+        }
+
+        result.wgsl = std::string(tint::TrimSpace(output->wgsl));
+        if (!result.wgsl.empty()) {
+            result.wgsl = "\n" + result.wgsl + "\n";
+        }
+
+        return result;
     }
 
-    void Test(std::string_view wgsl) { Test(wgsl, wgsl); }
+    Result Run(std::string wgsl) { return Run(wgsl, wgsl); }
 };
 
+std::ostream& operator<<(std::ostream& o, const IRToProgramRoundtripTest::Result& res) {
+    if (!res.err.empty()) {
+        o << "============================" << std::endl
+          << "== Error                  ==" << std::endl
+          << "============================" << std::endl
+          << res.err << std::endl
+          << std::endl;
+    }
+    if (!res.ir_pre_raise.empty()) {
+        o << "============================" << std::endl
+          << "== IR (pre-raise)         ==" << std::endl
+          << "============================" << std::endl
+          << res.ir_pre_raise << std::endl
+          << std::endl;
+    }
+    if (!res.ir_post_raise.empty()) {
+        o << "============================" << std::endl
+          << "== IR (post-raise)        ==" << std::endl
+          << "============================" << std::endl
+          << res.ir_post_raise << std::endl
+          << std::endl;
+    }
+    if (!res.ast.empty()) {
+        o << "============================" << std::endl
+          << "== AST                    ==" << std::endl
+          << "============================" << std::endl
+          << res.ast << std::endl
+          << std::endl;
+    }
+    return o;
+}
+
+#define RUN_TEST(...)                                       \
+    do {                                                    \
+        if (auto res = Run(__VA_ARGS__); res.err.empty()) { \
+            EXPECT_EQ(res.expected, res.wgsl) << res;       \
+        } else {                                            \
+            FAIL() << res;                                  \
+        }                                                   \
+    } while (false)
+
 TEST_F(IRToProgramRoundtripTest, EmptyModule) {
-    Test("");
+    RUN_TEST("");
 }
 
 TEST_F(IRToProgramRoundtripTest, SingleFunction_Empty) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
 }
 )");
 }
 
 TEST_F(IRToProgramRoundtripTest, SingleFunction_Return) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   return;
 }
 )",
-         R"(
+             R"(
 fn f() {
 }
 )");
 }
 
 TEST_F(IRToProgramRoundtripTest, SingleFunction_Return_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   return 42i;
 }
@@ -100,7 +189,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, SingleFunction_Parameters) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32, u : u32) -> i32 {
   return i;
 }
@@ -111,7 +200,7 @@
 // Struct declaration
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, StructDecl_Scalars) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   b : u32,
@@ -123,7 +212,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberAlign) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   @align(32u)
@@ -136,7 +225,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberSize) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   @size(32u)
@@ -149,7 +238,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberLocation) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   @location(1u)
@@ -162,7 +251,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberIndex) {
-    Test(R"(
+    RUN_TEST(R"(
 enable chromium_internal_dual_source_blending;
 
 struct S {
@@ -177,7 +266,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberBuiltin) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   @builtin(position)
@@ -190,7 +279,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberInterpolateType) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   @location(1u) @interpolate(flat)
@@ -203,7 +292,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberInterpolateTypeSampling) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   @location(1u) @interpolate(perspective, centroid)
@@ -216,7 +305,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, StructDecl_MemberInvariant) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   @builtin(position) @invariant
@@ -232,7 +321,7 @@
 // Function Call
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, FnCall_NoArgs_NoRet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -243,7 +332,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, FnCall_NoArgs_Ret_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() -> i32 {
   return 1i;
 }
@@ -255,7 +344,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, FnCall_3Args_NoRet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(x : i32, y : u32, z : f32) {
 }
 
@@ -266,7 +355,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, FnCall_3Args_Ret_f32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(x : i32, y : u32, z : f32) -> f32 {
   return z;
 }
@@ -278,7 +367,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, FnCall_PtrArgs) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> y : i32 = 2i;
 
 fn a(px : ptr<function, i32>, py : ptr<private, i32>) -> i32 {
@@ -296,7 +385,7 @@
 // Core Builtin Call
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, CoreBuiltinCall_Stmt) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   workgroupBarrier();
 }
@@ -304,7 +393,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CoreBuiltinCall_Expr) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) {
   var i : i32 = max(a, b);
 }
@@ -312,7 +401,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CoreBuiltinCall_PhonyAssignment) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) {
   _ = max(a, b);
 }
@@ -320,7 +409,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CoreBuiltinCall_UnusedLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) {
   let unused = max(a, b);
 }
@@ -328,7 +417,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CoreBuiltinCall_PtrArg) {
-    Test(R"(
+    RUN_TEST(R"(
 @group(0) @binding(0) var<storage, read> v : array<u32>;
 
 fn foo() -> u32 {
@@ -338,13 +427,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CoreBuiltinCall_DisableDerivativeUniformity) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(in : f32) {
   let x = dpdx(in);
   let y = dpdy(in);
 }
 )",
-         R"(
+             R"(
 diagnostic(off, derivative_uniformity);
 
 fn f(in : f32) {
@@ -358,7 +447,7 @@
 // Type Construct
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) {
   var v : i32 = i32(i);
 }
@@ -366,7 +455,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_u32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : u32) {
   var v : u32 = u32(i);
 }
@@ -374,7 +463,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_f32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : f32) {
   var v : f32 = f32(i);
 }
@@ -382,7 +471,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_bool) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : bool) {
   var v : bool = bool(i);
 }
@@ -390,7 +479,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_struct) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   b : u32,
@@ -404,7 +493,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_array) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) {
   var v : array<i32, 3u> = array<i32, 3u>(i, i, i);
 }
@@ -412,7 +501,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_vec3i_Splat) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) {
   var v : vec3<i32> = vec3<i32>(i);
 }
@@ -420,7 +509,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_vec3i_Scalars) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) {
   var v : vec3<i32> = vec3<i32>(i, i, i);
 }
@@ -428,7 +517,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_mat2x3f_Scalars) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : f32) {
   var v : mat2x3<f32> = mat2x3<f32>(i, i, i, i, i, i);
 }
@@ -436,7 +525,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConstruct_mat2x3f_Columns) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : f32) {
   var v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(i, i, i), vec3<f32>(i, i, i));
 }
@@ -447,7 +536,7 @@
 // Type Convert
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, TypeConvert_i32_to_u32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) {
   var v : u32 = u32(i);
 }
@@ -455,7 +544,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConvert_u32_to_f32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : u32) {
   var v : f32 = f32(i);
 }
@@ -463,7 +552,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConvert_f32_to_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : f32) {
   var v : i32 = i32(i);
 }
@@ -471,7 +560,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConvert_bool_to_u32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : bool) {
   var v : u32 = u32(i);
 }
@@ -479,7 +568,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConvert_vec3i_to_vec3u) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : vec3<i32>) {
   var v : vec3<u32> = vec3<u32>(i);
 }
@@ -487,7 +576,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConvert_vec3u_to_vec3f) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : vec3<u32>) {
   var v : vec3<f32> = vec3<f32>(i);
 }
@@ -495,7 +584,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, TypeConvert_mat2x3f_to_mat2x3h) {
-    Test(R"(
+    RUN_TEST(R"(
 enable f16;
 
 fn f(i : mat2x3<f32>) {
@@ -508,7 +597,7 @@
 // Bitcast
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Bitcast_i32_to_u32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) {
   var v : u32 = bitcast<u32>(i);
 }
@@ -516,7 +605,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Bitcast_u32_to_f32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : u32) {
   var v : f32 = bitcast<f32>(i);
 }
@@ -524,7 +613,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Bitcast_f32_to_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : f32) {
   var v : i32 = bitcast<i32>(i);
 }
@@ -535,7 +624,7 @@
 // Discard
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Discard) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   discard;
 }
@@ -546,12 +635,12 @@
 // Access
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Access_Value_vec3f_1) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>) -> f32 {
   return v[1];
 }
 )",
-         R"(
+             R"(
 fn f(v : vec3<f32>) -> f32 {
   return v.y;
 }
@@ -559,14 +648,14 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_vec3f_1) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> v : vec3<f32>;
 
 fn f() -> f32 {
   return v[1];
 }
 )",
-         R"(
+             R"(
 var<private> v : vec3<f32>;
 
 fn f() -> f32 {
@@ -576,7 +665,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_vec3f_z) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>) -> f32 {
   return v.z;
 }
@@ -584,7 +673,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_vec3f_z) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> v : vec3<f32>;
 
 fn f() -> f32 {
@@ -594,12 +683,12 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_vec3f_g) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>) -> f32 {
   return v.g;
 }
 )",
-         R"(
+             R"(
 fn f(v : vec3<f32>) -> f32 {
   return v.y;
 }
@@ -607,14 +696,14 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_vec3f_g) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> v : vec3<f32>;
 
 fn f() -> f32 {
   return v.g;
 }
 )",
-         R"(
+             R"(
 var<private> v : vec3<f32>;
 
 fn f() -> f32 {
@@ -624,7 +713,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_vec3f_i) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>, i : i32) -> f32 {
   return v[i];
 }
@@ -632,7 +721,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_vec3f_i) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> v : vec3<f32>;
 
 fn f(i : i32) -> f32 {
@@ -642,12 +731,12 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_mat3x2f_1_0) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(m : mat3x2<f32>) -> f32 {
   return m[1][0];
 }
 )",
-         R"(
+             R"(
 fn f(m : mat3x2<f32>) -> f32 {
   return m[1i].x;
 }
@@ -655,14 +744,14 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_mat3x2f_1_0) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> m : mat3x2<f32>;
 
 fn f() -> f32 {
   return m[1][0];
 }
 )",
-         R"(
+             R"(
 var<private> m : mat3x2<f32>;
 
 fn f() -> f32 {
@@ -672,12 +761,12 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_mat3x2f_u_0) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(m : mat3x2<f32>, u : u32) -> f32 {
   return m[u][0];
 }
 )",
-         R"(
+             R"(
 fn f(m : mat3x2<f32>, u : u32) -> f32 {
   return m[u].x;
 }
@@ -685,14 +774,14 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_mat3x2f_u_0) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> m : mat3x2<f32>;
 
 fn f(u : u32) -> f32 {
   return m[u][0];
 }
 )",
-         R"(
+             R"(
 var<private> m : mat3x2<f32>;
 
 fn f(u : u32) -> f32 {
@@ -702,7 +791,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_mat3x2f_u_i) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(m : mat3x2<f32>, u : u32, i : i32) -> f32 {
   return m[u][i];
 }
@@ -710,7 +799,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_mat3x2f_u_i) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> m : mat3x2<f32>;
 
 fn f(u : u32, i : i32) -> f32 {
@@ -720,7 +809,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_array_0u) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : array<i32, 4u>) -> i32 {
   return a[0u];
 }
@@ -728,7 +817,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_array_0u) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> a : array<i32, 4u>;
 
 fn f() -> i32 {
@@ -738,7 +827,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Value_array_i) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : array<i32, 4u>, i : i32) -> i32 {
   return a[i];
 }
@@ -746,7 +835,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Ref_array_i) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> a : array<i32, 4u>;
 
 fn f(i : i32) -> i32 {
@@ -756,7 +845,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ValueStruct) {
-    Test(R"(
+    RUN_TEST(R"(
 struct Y {
   a : i32,
   b : i32,
@@ -776,7 +865,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ReferenceStruct) {
-    Test(R"(
+    RUN_TEST(R"(
 struct Y {
   a : i32,
   b : i32,
@@ -797,7 +886,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfArrayOfArray_123) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -810,7 +899,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfArrayOfArray_213) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -824,7 +913,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfArrayOfArray_312) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -838,7 +927,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfArrayOfArray_321) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -853,7 +942,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfMat3x4f_123) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -865,7 +954,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfMat3x4f_213) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -879,7 +968,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfMat3x4f_312) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -893,7 +982,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_ArrayOfMat3x4f_321) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> i32 {
   return 1i;
 }
@@ -908,7 +997,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_UsePartialChains) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> a : array<array<array<i32, 4u>, 5u>, 6u>;
 
 fn f(i : i32) -> i32 {
@@ -927,7 +1016,7 @@
 // Swizzle
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Value_xy) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>) -> vec2<f32> {
   return v.xy;
 }
@@ -935,7 +1024,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Value_yz) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>) -> vec2<f32> {
   return v.yz;
 }
@@ -943,7 +1032,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Value_yzx) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>) -> vec3<f32> {
   return v.yzx;
 }
@@ -951,7 +1040,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Value_yzxy) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : vec3<f32>) -> vec4<f32> {
   return v.yzxy;
 }
@@ -959,7 +1048,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Pointer_xy) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : ptr<function, vec3<f32>>) -> vec2<f32> {
   return (*(v)).xy;
 }
@@ -967,7 +1056,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Pointer_yz) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : ptr<function, vec3<f32>>) -> vec2<f32> {
   return (*(v)).yz;
 }
@@ -975,7 +1064,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Pointer_yzx) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : ptr<function, vec3<f32>>) -> vec3<f32> {
   return (*(v)).yzx;
 }
@@ -983,7 +1072,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Access_Vec3_Pointer_yzxy) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(v : ptr<function, vec3<f32>>) -> vec4<f32> {
   return (*(v)).yzxy;
 }
@@ -994,7 +1083,7 @@
 // Unary ops
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, UnaryOp_Negate) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) -> i32 {
   return -(i);
 }
@@ -1002,7 +1091,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, UnaryOp_Complement) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : u32) -> u32 {
   return ~(i);
 }
@@ -1010,7 +1099,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, UnaryOp_Not) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(b : bool) -> bool {
   return !(b);
 }
@@ -1021,7 +1110,7 @@
 // Binary ops
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Add) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a + b);
 }
@@ -1029,7 +1118,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Subtract) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a - b);
 }
@@ -1037,7 +1126,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Multiply) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a * b);
 }
@@ -1045,7 +1134,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Divide) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a / b);
 }
@@ -1053,7 +1142,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Modulo) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a % b);
 }
@@ -1061,7 +1150,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_And) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a & b);
 }
@@ -1069,7 +1158,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Or) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a | b);
 }
@@ -1077,7 +1166,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Xor) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> i32 {
   return (a ^ b);
 }
@@ -1085,7 +1174,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_Equal) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> bool {
   return (a == b);
 }
@@ -1093,7 +1182,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_NotEqual) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> bool {
   return (a != b);
 }
@@ -1101,7 +1190,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_LessThan) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> bool {
   return (a < b);
 }
@@ -1109,7 +1198,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_GreaterThan) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> bool {
   return (a > b);
 }
@@ -1117,7 +1206,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_LessThanEqual) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> bool {
   return (a <= b);
 }
@@ -1125,7 +1214,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_GreaterThanEqual) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : i32) -> bool {
   return (a >= b);
 }
@@ -1133,7 +1222,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_ShiftLeft) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : u32) -> i32 {
   return (a << b);
 }
@@ -1141,7 +1230,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, BinaryOp_ShiftRight) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : i32, b : u32) -> i32 {
   return (a >> b);
 }
@@ -1152,7 +1241,7 @@
 // Short-circuiting binary ops
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Param_2) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool) -> bool {
   return (a && b);
 }
@@ -1160,7 +1249,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Param_3_ab_c) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   return ((a && b) && c);
 }
@@ -1168,7 +1257,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Param_3_a_bc) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   return ((a && b) && c);
 }
@@ -1176,7 +1265,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Let_2) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool) -> bool {
   let l = (a && b);
   return l;
@@ -1185,7 +1274,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Let_3_ab_c) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   let l = ((a && b) && c);
   return l;
@@ -1194,7 +1283,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Let_3_a_bc) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   let l = (a && (b && c));
   return l;
@@ -1203,7 +1292,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Call_2) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() -> bool {
   return true;
 }
@@ -1219,7 +1308,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Call_3_ab_c) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() -> bool {
   return true;
 }
@@ -1239,7 +1328,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_And_Call_3_a_bc) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() -> bool {
   return true;
 }
@@ -1259,7 +1348,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Param_2) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool) -> bool {
   return (a || b);
 }
@@ -1267,7 +1356,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Param_3_ab_c) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   return ((a || b) || c);
 }
@@ -1275,7 +1364,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Param_3_a_bc) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   return (a || (b || c));
 }
@@ -1283,7 +1372,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Let_2) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool) -> bool {
   let l = (a || b);
   return l;
@@ -1292,7 +1381,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Let_3_ab_c) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   let l = ((a || b) || c);
   return l;
@@ -1301,7 +1390,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Let_3_a_bc) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(a : bool, b : bool, c : bool) -> bool {
   let l = (a || (b || c));
   return l;
@@ -1310,7 +1399,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Call_2) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() -> bool {
   return true;
 }
@@ -1326,7 +1415,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Call_3_ab_c) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() -> bool {
   return true;
 }
@@ -1346,7 +1435,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Or_Call_3_a_bc) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() -> bool {
   return true;
 }
@@ -1366,7 +1455,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ShortCircuit_Mixed) {
-    Test(R"(
+    RUN_TEST(R"(
 fn b() -> bool {
   return true;
 }
@@ -1386,7 +1475,7 @@
 // Assignment
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Assign_ArrayOfArrayOfArrayAccess_123456) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1399,7 +1488,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Assign_ArrayOfArrayOfArrayAccess_261345) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1414,7 +1503,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Assign_ArrayOfArrayOfArrayAccess_532614) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1431,7 +1520,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Assign_ArrayOfMatrixAccess_123456) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1444,7 +1533,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Assign_ArrayOfMatrixAccess_261345) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1459,7 +1548,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Assign_ArrayOfMatrixAccess_532614) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1479,13 +1568,13 @@
 // Compound assignment
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_Increment) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var v : i32;
   v++;
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : i32;
   v = (v + 1i);
@@ -1494,13 +1583,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_Decrement) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var v : i32;
   v++;
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : i32;
   v = (v + 1i);
@@ -1509,13 +1598,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_Add) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var v : i32;
   v += 8i;
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : i32;
   v = (v + 8i);
@@ -1524,13 +1613,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_Subtract) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var v : i32;
   v -= 8i;
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : i32;
   v = (v - 8i);
@@ -1539,13 +1628,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_Multiply) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var v : i32;
   v *= 8i;
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : i32;
   v = (v * 8i);
@@ -1554,13 +1643,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_Divide) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var v : i32;
   v /= 8i;
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : i32;
   v = (v / 8i);
@@ -1569,13 +1658,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_Xor) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var v : i32;
   v ^= 8i;
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : i32;
   v = (v ^ 8i);
@@ -1584,7 +1673,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_ArrayOfArrayOfArrayAccess_123456) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1594,7 +1683,8 @@
   v[e(1i)][e(2i)][e(3i)] += v[e(4i)][e(5i)][e(6i)];
 }
 )",
-         R"(fn e(i : i32) -> i32 {
+             R"(
+fn e(i : i32) -> i32 {
   return i;
 }
 
@@ -1607,7 +1697,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_ArrayOfArrayOfArrayAccess_261345) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1619,7 +1709,8 @@
   v[e(1i)][v_2][e(3i)] += v[e(4i)][e(5i)][v_3];
 }
 )",
-         R"(fn e(i : i32) -> i32 {
+             R"(
+fn e(i : i32) -> i32 {
   return i;
 }
 
@@ -1634,7 +1725,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_ArrayOfArrayOfArrayAccess_532614) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1648,7 +1739,8 @@
   v[e(1i)][v_4][v_3] += v[e(4i)][v_2][v_5];
 }
 )",
-         R"(fn e(i : i32) -> i32 {
+             R"(
+fn e(i : i32) -> i32 {
   return i;
 }
 
@@ -1665,7 +1757,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_ArrayOfMatrixAccess_123456) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1675,7 +1767,8 @@
   v[e(1i)][e(2i)][e(3i)] += v[e(4i)][e(5i)][e(6i)];
 }
 )",
-         R"(fn e(i : i32) -> i32 {
+             R"(
+fn e(i : i32) -> i32 {
   return i;
 }
 
@@ -1689,7 +1782,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_ArrayOfMatrixAccess_261345) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1701,7 +1794,8 @@
   v[e(1i)][v_2][e(3i)] += v[e(4i)][e(5i)][v_3];
 }
 )",
-         R"(fn e(i : i32) -> i32 {
+             R"(
+fn e(i : i32) -> i32 {
   return i;
 }
 
@@ -1717,7 +1811,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, CompoundAssign_ArrayOfMatrixAccess_532614) {
-    Test(R"(
+    RUN_TEST(R"(
 fn e(i : i32) -> i32 {
   return i;
 }
@@ -1731,7 +1825,8 @@
   v[e(1i)][v_4][v_3] += v[e(4i)][v_2][v_5];
 }
 )",
-         R"(fn e(i : i32) -> i32 {
+             R"(
+fn e(i : i32) -> i32 {
   return i;
 }
 
@@ -1751,7 +1846,7 @@
 // Phony Assignment
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, PhonyAssign_PrivateVar) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> p : i32;
 
 fn f() {
@@ -1761,7 +1856,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, PhonyAssign_FunctionVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var i : i32;
   _ = i;
@@ -1770,13 +1865,13 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, PhonyAssign_FunctionLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   let i : i32 = 42i;
   _ = i;
 }
 )",
-         R"(
+             R"(
 fn f() {
   let i = 42i;
 }
@@ -1784,7 +1879,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, PhonyAssign_HandleVar) {
-    Test(R"(
+    RUN_TEST(R"(
 @group(0) @binding(0) var t : texture_2d<f32>;
 
 fn f() {
@@ -1794,19 +1889,19 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, PhonyAssign_Constant) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   _ = 42i;
 }
 )",
-         R"(
+             R"(
 fn f() {
 }
 )");
 }
 
 TEST_F(IRToProgramRoundtripTest, PhonyAssign_Call) {
-    Test(R"(
+    RUN_TEST(R"(
 fn v() -> i32 {
   return 42;
 }
@@ -1815,7 +1910,7 @@
   _ = v();
 }
 )",
-         R"(
+             R"(
 fn v() -> i32 {
   return 42i;
 }
@@ -1830,7 +1925,7 @@
 // let
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, LetUsedOnce) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : u32) -> u32 {
   let v = ~(i);
   return v;
@@ -1839,7 +1934,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, LetUsedTwice) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) -> i32 {
   let v = (i * 2i);
   return (v + v);
@@ -1851,19 +1946,25 @@
 // Module-scope var
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_i32) {
-    Test("var<private> v : i32 = 1i;");
+    RUN_TEST(R"(
+var<private> v : i32 = 1i;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_u32) {
-    Test("var<private> v : u32 = 1u;");
+    RUN_TEST(R"(
+var<private> v : u32 = 1u;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_f32) {
-    Test("var<private> v : f32 = 1.0f;");
+    RUN_TEST(R"(
+var<private> v : f32 = 1.0f;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_f16) {
-    Test(R"(
+    RUN_TEST(R"(
 enable f16;
 
 var<private> v : f16 = 1.0h;
@@ -1871,28 +1972,38 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_bool) {
-    Test("var<private> v : bool = true;");
+    RUN_TEST(R"(
+var<private> v : bool = true;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_array_NoArgs) {
-    Test("var<private> v : array<i32, 4u> = array<i32, 4u>();");
+    RUN_TEST(R"(
+var<private> v : array<i32, 4u> = array<i32, 4u>();
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_array_Zero) {
-    Test("var<private> v : array<i32, 4u> = array<i32, 4u>(0i, 0i, 0i, 0i);",
-         "var<private> v : array<i32, 4u> = array<i32, 4u>();");
+    RUN_TEST(R"(
+var<private> v : array<i32, 4u> = array<i32, 4u>(0i, 0i, 0i, 0i);
+var<private> v : array<i32, 4u> = array<i32, 4u>();
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_array_SameValue) {
-    Test("var<private> v : array<i32, 4u> = array<i32, 4u>(4i, 4i, 4i, 4i);");
+    RUN_TEST(R"(
+var<private> v : array<i32, 4u> = array<i32, 4u>(4i, 4i, 4i, 4i);
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_array_DifferentValues) {
-    Test("var<private> v : array<i32, 4u> = array<i32, 4u>(1i, 2i, 3i, 4i);");
+    RUN_TEST(R"(
+var<private> v : array<i32, 4u> = array<i32, 4u>(1i, 2i, 3i, 4i);
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_struct_NoArgs) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   i : i32,
   u : u32,
@@ -1904,7 +2015,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_struct_Zero) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   i : i32,
   u : u32,
@@ -1913,7 +2024,7 @@
 
 var<private> s : S = S(0i, 0u, 0f);
 )",
-         R"(
+             R"(
 struct S {
   i : i32,
   u : u32,
@@ -1925,7 +2036,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_struct_SameValue) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   b : i32,
@@ -1937,7 +2048,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_struct_DifferentValues) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   a : i32,
   b : i32,
@@ -1949,78 +2060,104 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_vec3f_NoArgs) {
-    Test("var<private> v : vec3<f32> = vec3<f32>();");
+    RUN_TEST(R"(
+var<private> v : vec3<f32> = vec3<f32>();
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_vec3f_Zero) {
-    Test("var<private> v : vec3<f32> = vec3<f32>(0f);",
-         "var<private> v : vec3<f32> = vec3<f32>();");
+    RUN_TEST(R"(
+var<private> v : vec3<f32> = vec3<f32>(0f);",
+             "var<private> v : vec3<f32> = vec3<f32>();
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_vec3f_Splat) {
-    Test("var<private> v : vec3<f32> = vec3<f32>(1.0f);");
+    RUN_TEST(R"(
+var<private> v : vec3<f32> = vec3<f32>(1.0f);
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_vec3f_Scalars) {
-    Test("var<private> v : vec3<f32> = vec3<f32>(1.0f, 2.0f, 3.0f);");
+    RUN_TEST(R"(
+var<private> v : vec3<f32> = vec3<f32>(1.0f, 2.0f, 3.0f);
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_mat2x3f_NoArgs) {
-    Test("var<private> v : mat2x3<f32> = mat2x3<f32>();");
+    RUN_TEST(R"(
+var<private> v : mat2x3<f32> = mat2x3<f32>();
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_mat2x3f_Scalars_SameValue) {
-    Test("var<private> v : mat2x3<f32> = mat2x3<f32>(4.0f, 4.0f, 4.0f, 4.0f, 4.0f, 4.0f);",
-         "var<private> v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(4.0f), vec3<f32>(4.0f));");
+    RUN_TEST(R"(
+var<private> v : mat2x3<f32> = mat2x3<f32>(4.0f, 4.0f, 4.0f, 4.0f, 4.0f, 4.0f);
+var<private> v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(4.0f), vec3<f32>(4.0f));
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_mat2x3f_Scalars) {
-    Test("var<private> v : mat2x3<f32> = mat2x3<f32>(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f);",
-         "var<private> v : mat2x3<f32> = "
-         "mat2x3<f32>(vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(4.0f, 5.0f, 6.0f));");
+    RUN_TEST(R"(
+var<private> v : mat2x3<f32> = mat2x3<f32>(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f);
+var<private> v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(4.0f, 5.0f, 6.0f));
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_mat2x3f_Columns) {
-    Test(
-        "var<private> v : mat2x3<f32> = "
-        "mat2x3<f32>(vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(4.0f, 5.0f, 6.0f));");
+    RUN_TEST(
+        R"(
+var<private> v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(1.0f, 2.0f, 3.0f), vec3<f32>(4.0f, 5.0f, 6.0f));
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Private_mat2x3f_Columns_SameValue) {
-    Test(
-        "var<private> v : mat2x3<f32> = "
-        "mat2x3<f32>(vec3<f32>(4.0f, 4.0f, 4.0f), vec3<f32>(4.0f, 4.0f, 4.0f));",
-        "var<private> v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(4.0f), vec3<f32>(4.0f));");
+    RUN_TEST(R"(
+var<private> v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(4.0f, 4.0f, 4.0f), vec3<f32>(4.0f, 4.0f, 4.0f));
+var<private> v : mat2x3<f32> = mat2x3<f32>(vec3<f32>(4.0f), vec3<f32>(4.0f));
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Uniform_vec4i) {
-    Test("@group(10) @binding(20) var<uniform> v : vec4<i32>;");
+    RUN_TEST(R"(
+@group(10) @binding(20) var<uniform> v : vec4<i32>;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_StorageRead_u32) {
-    Test("@group(10) @binding(20) var<storage, read> v : u32;");
+    RUN_TEST(R"(
+@group(10) @binding(20) var<storage, read> v : u32;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_StorageReadWrite_i32) {
-    Test("@group(10) @binding(20) var<storage, read_write> v : i32;");
+    RUN_TEST(R"(
+@group(10) @binding(20) var<storage, read_write> v : i32;
+)");
 }
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Handle_Texture2D) {
-    Test("@group(0) @binding(0) var t : texture_2d<f32>;");
+    RUN_TEST(R"(
+@group(0) @binding(0) var t : texture_2d<f32>;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Handle_Sampler) {
-    Test("@group(0) @binding(0) var s : sampler;");
+    RUN_TEST(R"(
+@group(0) @binding(0) var s : sampler;
+)");
 }
 
 TEST_F(IRToProgramRoundtripTest, ModuleScopeVar_Handle_SamplerCmp) {
-    Test("@group(0) @binding(0) var s : sampler_comparison;");
+    RUN_TEST(R"(
+@group(0) @binding(0) var s : sampler_comparison;
+)");
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 // Function-scope var
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, FunctionScopeVar_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var i : i32;
 }
@@ -2028,7 +2165,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, FunctionScopeVar_i32_InitLiteral) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var i : i32 = 42i;
 }
@@ -2036,7 +2173,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, FunctionScopeVar_Chained) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var a : i32 = 42i;
   var b : i32 = a;
@@ -2049,7 +2186,7 @@
 // Function-scope let
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, FunctionScopeLet_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(i : i32) -> i32 {
   let a = (42i + i);
   let b = (24i + i);
@@ -2060,7 +2197,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, FunctionScopeLet_ptr) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var a : array<i32, 3u>;
   let b = &(a[1i]);
@@ -2075,7 +2212,7 @@
     // If their constant values were inlined, then the initializer for 'c' would be treated as a
     // constant expression instead of the authored runtime expression. Evaluating '1 / 0' as a
     // constant expression is a WGSL validation error.
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   let a = 1i;
   let b = 0i;
@@ -2088,7 +2225,7 @@
 // If
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, If_CallFn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2101,7 +2238,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, If_Return) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(cond : bool) {
   if (cond) {
     return;
@@ -2111,7 +2248,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, If_Return_i32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var cond : bool = true;
   if (cond) {
@@ -2123,7 +2260,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, If_CallFn_Else_CallFn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2141,7 +2278,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, If_Return_f32_Else_Return_f32) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> f32 {
   var cond : bool = true;
   if (cond) {
@@ -2154,7 +2291,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, If_Return_u32_Else_CallFn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2175,7 +2312,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, If_CallFn_ElseIf_CallFn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2198,7 +2335,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, If_Else_Chain) {
-    Test(R"(
+    RUN_TEST(R"(
 fn x(i : i32) -> bool {
   return true;
 }
@@ -2221,7 +2358,7 @@
 // Switch
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Switch_Default) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2237,7 +2374,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Switch_3_Cases) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2265,7 +2402,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Switch_3_Cases_AllReturn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2285,7 +2422,7 @@
   a();
 }
 )",
-         R"(
+             R"(
 fn a() {
 }
 
@@ -2307,7 +2444,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Switch_Nested) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a() {
 }
 
@@ -2345,7 +2482,7 @@
 // For
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, For_Empty) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   for(var i : i32 = 0i; (i < 5i); i = (i + 1i)) {
   }
@@ -2354,7 +2491,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_Empty_NoInit) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var i : i32 = 0i;
   for(; (i < 5i); i = (i + 1i)) {
@@ -2364,14 +2501,14 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_Empty_NoCond) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   for(var i : i32 = 0i; ; i = (i + 1i)) {
     break;
   }
 }
 )",
-         R"(
+             R"(
 fn f() {
   {
     var i : i32 = 0i;
@@ -2388,7 +2525,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_Empty_NoCont) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   for(var i : i32 = 0i; (i < 5i); ) {
   }
@@ -2397,7 +2534,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_ComplexBody) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> bool {
   return (v == 1i);
 }
@@ -2416,7 +2553,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_ComplexBody_NoInit) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> bool {
   return (v == 1i);
 }
@@ -2436,7 +2573,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_ComplexBody_NoCond) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> bool {
   return (v == 1i);
 }
@@ -2451,7 +2588,7 @@
   }
 }
 )",
-         R"(
+             R"(
 fn a(v : i32) -> bool {
   return (v == 1i);
 }
@@ -2476,7 +2613,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_ComplexBody_NoCont) {
-    Test(R"(
+    RUN_TEST(R"(
 fn a(v : i32) -> bool {
   return (v == 1i);
 }
@@ -2495,7 +2632,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_CallInInitCondCont) {
-    Test(R"(
+    RUN_TEST(R"(
 fn n(v : i32) -> i32 {
   return (v + 1i);
 }
@@ -2508,7 +2645,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_AssignAsInit) {
-    Test(R"(
+    RUN_TEST(R"(
 fn n() {
 }
 
@@ -2521,7 +2658,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_CompoundAssignAsInit) {
-    Test(R"(
+    RUN_TEST(R"(
 fn n() {
 }
 
@@ -2531,7 +2668,7 @@
   }
 }
 )",
-         R"(
+             R"(
 fn n() {
 }
 
@@ -2544,7 +2681,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_IncrementAsInit) {
-    Test(R"(
+    RUN_TEST(R"(
 fn n() {
 }
 
@@ -2554,7 +2691,7 @@
   }
 }
 )",
-         R"(
+             R"(
 fn n() {
 }
 
@@ -2567,7 +2704,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_DecrementAsInit) {
-    Test(R"(
+    RUN_TEST(R"(
 fn n() {
 }
 
@@ -2577,7 +2714,7 @@
   }
 }
 )",
-         R"(
+             R"(
 fn n() {
 }
 
@@ -2590,7 +2727,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, For_CallAsInit) {
-    Test(R"(
+    RUN_TEST(R"(
 fn n() {
 }
 
@@ -2606,7 +2743,7 @@
 // While
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, While_Empty) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   while(true) {
   }
@@ -2615,7 +2752,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, While_Cond) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(cond : bool) {
   while(cond) {
   }
@@ -2624,7 +2761,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, While_Break) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   while(true) {
     break;
@@ -2634,7 +2771,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, While_IfBreak) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(cond : bool) {
   while(true) {
     if (cond) {
@@ -2646,7 +2783,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, While_IfReturn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(cond : bool) {
   while(true) {
     if (cond) {
@@ -2661,7 +2798,7 @@
 // Loop
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Loop_Break) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   loop {
     break;
@@ -2671,7 +2808,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_IfBreak) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(cond : bool) {
   loop {
     if (cond) {
@@ -2683,7 +2820,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_IfReturn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f(cond : bool) {
   loop {
     if (cond) {
@@ -2695,7 +2832,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_IfContinuing) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var cond : bool = false;
   loop {
@@ -2712,7 +2849,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_VarsDeclaredOutsideAndInside) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   var b : i32 = 1i;
   loop {
@@ -2730,7 +2867,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_BreakIf_EmptyBody) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   loop {
 
@@ -2743,7 +2880,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_BreakIf_NotFalse) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   loop {
     if (false) {
@@ -2757,7 +2894,7 @@
   }
 }
 )",
-         R"(
+             R"(
 fn f() {
   loop {
     if (!(false)) {
@@ -2773,7 +2910,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_BreakIf_NotTrue) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   loop {
     if (false) {
@@ -2787,7 +2924,7 @@
   }
 }
 )",
-         R"(
+             R"(
 fn f() {
   loop {
     if (!(false)) {
@@ -2803,7 +2940,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Loop_WithReturn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() {
   loop {
     let i = 42i;
@@ -2817,12 +2954,12 @@
 // Shadowing tests
 ////////////////////////////////////////////////////////////////////////////////
 TEST_F(IRToProgramRoundtripTest, Shadow_f32_With_Fn) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f32() {
   var v = mat4x4f();
 }
 )",
-         R"(
+             R"(
 fn f32_1() {
   var v : mat4x4<f32> = mat4x4<f32>();
 }
@@ -2830,7 +2967,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_f32_With_Struct) {
-    Test(R"(
+    RUN_TEST(R"(
 struct f32 {
   v : i32,
 }
@@ -2839,7 +2976,7 @@
   let f = vec2f(1.0f);
 }
 )",
-         R"(
+             R"(
 struct f32_1 {
   v : i32,
 }
@@ -2851,21 +2988,21 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_f32_With_ModVar) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> f32 : vec2f = vec2f(0.0f, 1.0f);
 )",
-         R"(
+             R"(
 var<private> f32_1 : vec2<f32> = vec2<f32>(0.0f, 1.0f);
 )");
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_f32_With_ModVar2) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> f32 : i32 = 1i;
 
 var<private> v = vec2(1.0).x;
 )",
-         R"(
+             R"(
 var<private> f32_1 : i32 = 1i;
 
 var<private> v : f32 = 1.0f;
@@ -2873,14 +3010,14 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_f32_With_Alias) {
-    Test(R"(
+    RUN_TEST(R"(
 alias f32 = i32;
 
 fn f() {
   var v = vec3(1.0f, 2.0f, 3.0f);
 }
 )",
-         R"(
+             R"(
 fn f() {
   var v : vec3<f32> = vec3<f32>(1.0f, 2.0f, 3.0f);
 }
@@ -2888,7 +3025,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_Struct_With_FnVar) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   i : i32,
 }
@@ -2901,7 +3038,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_Struct_With_Param) {
-    Test(R"(
+    RUN_TEST(R"(
 struct S {
   i : i32,
 }
@@ -2913,7 +3050,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_ModVar_With_FnVar) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> i : i32 = 1i;
 
 fn f() -> i32 {
@@ -2925,7 +3062,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_ModVar_With_FnLet) {
-    Test(R"(
+    RUN_TEST(R"(
 var<private> i : i32 = 1i;
 
 fn f() -> i32 {
@@ -2937,7 +3074,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_IfVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   if (true) {
@@ -2951,7 +3088,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_IfLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   if (true) {
@@ -2965,7 +3102,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_WhileVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   while((i < 4i)) {
@@ -2978,7 +3115,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_WhileLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   while((i < 4i)) {
@@ -2991,7 +3128,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_ForInitVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   for(var i : f32 = 0.0f; (i < 4.0f); ) {
@@ -3003,7 +3140,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_ForInitLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   for(let i = 0.0f; (i < 4.0f); ) {
@@ -3015,7 +3152,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_ForBodyVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   for(var x : i32 = 0i; (i < 4i); ) {
@@ -3028,7 +3165,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_ForBodyLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   for(var x : i32 = 0i; (i < 4i); ) {
@@ -3041,7 +3178,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_LoopBodyVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   loop {
@@ -3059,7 +3196,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_LoopBodyLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   loop {
@@ -3077,7 +3214,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_LoopContinuingVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   loop {
@@ -3096,7 +3233,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_LoopContinuingLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   loop {
@@ -3115,7 +3252,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_SwitchCaseVar) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   switch(i) {
@@ -3135,7 +3272,7 @@
 }
 
 TEST_F(IRToProgramRoundtripTest, Shadow_FnVar_With_SwitchCaseLet) {
-    Test(R"(
+    RUN_TEST(R"(
 fn f() -> i32 {
   var i : i32;
   switch(i) {
