[tint] Use EXPECT_DEATH_IF_SUPPORTED()
Instead of EXPECT_DEATH(), as the latter is not supported on iOS.
Change-Id: Ib8f90aff93c8e998b512f43c67721f5989cac387
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/187681
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: James Price <jrprice@google.com>
diff --git a/src/tint/lang/core/ir/access_test.cc b/src/tint/lang/core/ir/access_test.cc
index aee7288..072a953 100644
--- a/src/tint/lang/core/ir/access_test.cc
+++ b/src/tint/lang/core/ir/access_test.cc
@@ -62,7 +62,7 @@
}
TEST_F(IR_AccessTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/bitcast_test.cc b/src/tint/lang/core/ir/bitcast_test.cc
index c585375..debb722 100644
--- a/src/tint/lang/core/ir/bitcast_test.cc
+++ b/src/tint/lang/core/ir/bitcast_test.cc
@@ -72,7 +72,7 @@
}
TEST_F(IR_BitcastTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/block_param_test.cc b/src/tint/lang/core/ir/block_param_test.cc
index 96a8e02..d5f14e2 100644
--- a/src/tint/lang/core/ir/block_param_test.cc
+++ b/src/tint/lang/core/ir/block_param_test.cc
@@ -37,7 +37,7 @@
using IR_BlockParamTest = IRTestHelper;
TEST_F(IR_BlockParamTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/break_if_test.cc b/src/tint/lang/core/ir/break_if_test.cc
index 0e14900..d472c47 100644
--- a/src/tint/lang/core/ir/break_if_test.cc
+++ b/src/tint/lang/core/ir/break_if_test.cc
@@ -60,7 +60,7 @@
}
TEST_F(IR_BreakIfTest, Fail_NullLoop) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/constant_test.cc b/src/tint/lang/core/ir/constant_test.cc
index c8b6ef1..e960936 100644
--- a/src/tint/lang/core/ir/constant_test.cc
+++ b/src/tint/lang/core/ir/constant_test.cc
@@ -112,11 +112,11 @@
}
TEST_F(IR_ConstantTest, Fail_NullValue) {
- EXPECT_DEATH({ Constant c(nullptr); }, "");
+ EXPECT_DEATH_IF_SUPPORTED({ Constant c(nullptr); }, "");
}
TEST_F(IR_ConstantTest, Fail_Builder_NullValue) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/construct_test.cc b/src/tint/lang/core/ir/construct_test.cc
index 6e4b005..d8cef8e 100644
--- a/src/tint/lang/core/ir/construct_test.cc
+++ b/src/tint/lang/core/ir/construct_test.cc
@@ -56,7 +56,7 @@
}
TEST_F(IR_ConstructTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/continue_test.cc b/src/tint/lang/core/ir/continue_test.cc
index 79875cf..d4d9c6b 100644
--- a/src/tint/lang/core/ir/continue_test.cc
+++ b/src/tint/lang/core/ir/continue_test.cc
@@ -58,7 +58,7 @@
}
TEST_F(IR_ContinueTest, Fail_NullLoop) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/convert_test.cc b/src/tint/lang/core/ir/convert_test.cc
index 73c3076..321809c 100644
--- a/src/tint/lang/core/ir/convert_test.cc
+++ b/src/tint/lang/core/ir/convert_test.cc
@@ -35,7 +35,7 @@
using IR_ConvertTest = IRTestHelper;
TEST_F(IR_ConvertTest, Fail_NullToType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/core_binary_test.cc b/src/tint/lang/core/ir/core_binary_test.cc
index 6fde891..6ce32d7 100644
--- a/src/tint/lang/core/ir/core_binary_test.cc
+++ b/src/tint/lang/core/ir/core_binary_test.cc
@@ -40,7 +40,7 @@
using IR_BinaryTest = IRTestHelper;
TEST_F(IR_BinaryTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/core_builtin_call_test.cc b/src/tint/lang/core/ir/core_builtin_call_test.cc
index 7897862..bfc897e 100644
--- a/src/tint/lang/core/ir/core_builtin_call_test.cc
+++ b/src/tint/lang/core/ir/core_builtin_call_test.cc
@@ -55,7 +55,7 @@
}
TEST_F(IR_CoreBuiltinCallTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -65,7 +65,7 @@
}
TEST_F(IR_CoreBuiltinCallTest, Fail_NoneFunction) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/core_unary_test.cc b/src/tint/lang/core/ir/core_unary_test.cc
index 88de1c1..26054a0 100644
--- a/src/tint/lang/core/ir/core_unary_test.cc
+++ b/src/tint/lang/core/ir/core_unary_test.cc
@@ -80,7 +80,7 @@
}
TEST_F(IR_UnaryTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/function_param_test.cc b/src/tint/lang/core/ir/function_param_test.cc
index 49bc373..80b150f 100644
--- a/src/tint/lang/core/ir/function_param_test.cc
+++ b/src/tint/lang/core/ir/function_param_test.cc
@@ -37,7 +37,7 @@
using IR_FunctionParamTest = IRTestHelper;
TEST_F(IR_FunctionParamTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -47,7 +47,7 @@
}
TEST_F(IR_FunctionParamTest, Fail_SetDuplicateBuiltin) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/function_test.cc b/src/tint/lang/core/ir/function_test.cc
index 19443f6..9f0161a 100644
--- a/src/tint/lang/core/ir/function_test.cc
+++ b/src/tint/lang/core/ir/function_test.cc
@@ -37,7 +37,7 @@
using IR_FunctionTest = IRTestHelper;
TEST_F(IR_FunctionTest, Fail_NullReturnType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -47,7 +47,7 @@
}
TEST_F(IR_FunctionTest, Fail_DoubleReturnBuiltin) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -59,7 +59,7 @@
}
TEST_F(IR_FunctionTest, Fail_NullParam) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -70,7 +70,7 @@
}
TEST_F(IR_FunctionTest, Fail_NullBlock) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/if_test.cc b/src/tint/lang/core/ir/if_test.cc
index cb02e52..236a47d 100644
--- a/src/tint/lang/core/ir/if_test.cc
+++ b/src/tint/lang/core/ir/if_test.cc
@@ -55,7 +55,7 @@
}
TEST_F(IR_IfTest, Fail_NullTrueBlock) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -65,7 +65,7 @@
}
TEST_F(IR_IfTest, Fail_NullFalseBlock) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/instruction_result_test.cc b/src/tint/lang/core/ir/instruction_result_test.cc
index 665f17c..01aff8d 100644
--- a/src/tint/lang/core/ir/instruction_result_test.cc
+++ b/src/tint/lang/core/ir/instruction_result_test.cc
@@ -37,7 +37,7 @@
using IR_InstructionResultTest = IRTestHelper;
TEST_F(IR_InstructionResultTest, Destroy_HasInstruction) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/instruction_test.cc b/src/tint/lang/core/ir/instruction_test.cc
index 09adeb9..3813711 100644
--- a/src/tint/lang/core/ir/instruction_test.cc
+++ b/src/tint/lang/core/ir/instruction_test.cc
@@ -48,7 +48,7 @@
}
TEST_F(IR_InstructionTest, Fail_InsertBeforeNullptr) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -60,7 +60,7 @@
}
TEST_F(IR_InstructionTest, Fail_InsertBeforeNotInserted) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -83,7 +83,7 @@
}
TEST_F(IR_InstructionTest, Fail_InsertAfterNullptr) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -95,7 +95,7 @@
}
TEST_F(IR_InstructionTest, Fail_InsertAfterNotInserted) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -119,7 +119,7 @@
}
TEST_F(IR_InstructionTest, Fail_ReplaceWithNullptr) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -133,7 +133,7 @@
}
TEST_F(IR_InstructionTest, Fail_ReplaceWithNotInserted) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -157,7 +157,7 @@
}
TEST_F(IR_InstructionTest, Fail_RemoveNotInserted) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/let_test.cc b/src/tint/lang/core/ir/let_test.cc
index 218bd1e..3d998d6 100644
--- a/src/tint/lang/core/ir/let_test.cc
+++ b/src/tint/lang/core/ir/let_test.cc
@@ -41,7 +41,7 @@
using IR_LetTest = IRTestHelper;
TEST_F(IR_LetTest, Fail_NullValue) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/loop_test.cc b/src/tint/lang/core/ir/loop_test.cc
index 0f522a0..6a7e214 100644
--- a/src/tint/lang/core/ir/loop_test.cc
+++ b/src/tint/lang/core/ir/loop_test.cc
@@ -47,7 +47,7 @@
}
TEST_F(IR_LoopTest, Fail_NullInitializerBlock) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -57,7 +57,7 @@
}
TEST_F(IR_LoopTest, Fail_NullBodyBlock) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -67,7 +67,7 @@
}
TEST_F(IR_LoopTest, Fail_NullContinuingBlock) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/multi_in_block_test.cc b/src/tint/lang/core/ir/multi_in_block_test.cc
index 5d4d459..583f544 100644
--- a/src/tint/lang/core/ir/multi_in_block_test.cc
+++ b/src/tint/lang/core/ir/multi_in_block_test.cc
@@ -36,7 +36,7 @@
using IR_MultiInBlockTest = IRTestHelper;
TEST_F(IR_MultiInBlockTest, Fail_NullInboundBranch) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/next_iteration_test.cc b/src/tint/lang/core/ir/next_iteration_test.cc
index e1554cb..89b4d40 100644
--- a/src/tint/lang/core/ir/next_iteration_test.cc
+++ b/src/tint/lang/core/ir/next_iteration_test.cc
@@ -35,7 +35,7 @@
using IR_NextIterationTest = IRTestHelper;
TEST_F(IR_NextIterationTest, Fail_NullLoop) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/swizzle_test.cc b/src/tint/lang/core/ir/swizzle_test.cc
index ba911f7..6d26ab0 100644
--- a/src/tint/lang/core/ir/swizzle_test.cc
+++ b/src/tint/lang/core/ir/swizzle_test.cc
@@ -54,7 +54,7 @@
}
TEST_F(IR_SwizzleTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -65,7 +65,7 @@
}
TEST_F(IR_SwizzleTest, Fail_EmptyIndices) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -76,7 +76,7 @@
}
TEST_F(IR_SwizzleTest, Fail_TooManyIndices) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
@@ -87,7 +87,7 @@
}
TEST_F(IR_SwizzleTest, Fail_IndexOutOfRange) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/user_call_test.cc b/src/tint/lang/core/ir/user_call_test.cc
index 768fea3..252375d 100644
--- a/src/tint/lang/core/ir/user_call_test.cc
+++ b/src/tint/lang/core/ir/user_call_test.cc
@@ -58,7 +58,7 @@
}
TEST_F(IR_UserCallTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/value_test.cc b/src/tint/lang/core/ir/value_test.cc
index 43fd900..c8b7954 100644
--- a/src/tint/lang/core/ir/value_test.cc
+++ b/src/tint/lang/core/ir/value_test.cc
@@ -66,7 +66,7 @@
}
TEST_F(IR_ValueTest, Destroy_HasSource) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/core/ir/var_test.cc b/src/tint/lang/core/ir/var_test.cc
index e1759d9..88a1c69 100644
--- a/src/tint/lang/core/ir/var_test.cc
+++ b/src/tint/lang/core/ir/var_test.cc
@@ -41,7 +41,7 @@
using IR_VarTest = IRTestHelper;
TEST_F(IR_VarTest, Fail_NullType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Module mod;
Builder b{mod};
diff --git a/src/tint/lang/spirv/reader/parser/struct_test.cc b/src/tint/lang/spirv/reader/parser/struct_test.cc
index 7c85914..f59236b 100644
--- a/src/tint/lang/spirv/reader/parser/struct_test.cc
+++ b/src/tint/lang/spirv/reader/parser/struct_test.cc
@@ -30,7 +30,7 @@
namespace tint::spirv::reader {
TEST_F(SpirvParserTest, Struct_Empty) {
- EXPECT_DEATH( //
+ EXPECT_DEATH_IF_SUPPORTED( //
{
auto assembly = Assemble(R"(
OpCapability Shader
diff --git a/src/tint/lang/spirv/writer/ast_printer/assign_test.cc b/src/tint/lang/spirv/writer/ast_printer/assign_test.cc
index 24ad65b..7da01f4 100644
--- a/src/tint/lang/spirv/writer/ast_printer/assign_test.cc
+++ b/src/tint/lang/spirv/writer/ast_printer/assign_test.cc
@@ -66,7 +66,7 @@
}
TEST_F(SpirvASTPrinterTest, Assign_Var_OutsideFunction_IsError) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder pb;
diff --git a/src/tint/lang/spirv/writer/ast_printer/ast_if_test.cc b/src/tint/lang/spirv/writer/ast_printer/ast_if_test.cc
index 2404561..f8caeaa 100644
--- a/src/tint/lang/spirv/writer/ast_printer/ast_if_test.cc
+++ b/src/tint/lang/spirv/writer/ast_printer/ast_if_test.cc
@@ -64,7 +64,7 @@
// if (true) {
// }
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder pb;
diff --git a/src/tint/lang/spirv/writer/ast_printer/builtin_texture_test.cc b/src/tint/lang/spirv/writer/ast_printer/builtin_texture_test.cc
index 4e6f84b..2105c9f 100644
--- a/src/tint/lang/spirv/writer/ast_printer/builtin_texture_test.cc
+++ b/src/tint/lang/spirv/writer/ast_printer/builtin_texture_test.cc
@@ -3774,9 +3774,8 @@
Validate(b);
}
-// TODO(dsinclair): This generates two fatal errors, but EXPECT_DEATH can only handle 1
-TEST_P(BuiltinTextureTest, DISABLED_OutsideFunction_IsError) {
- EXPECT_DEATH(
+TEST_P(BuiltinTextureTest, OutsideFunction_IsError) {
+ EXPECT_DEATH_IF_SUPPORTED(
{
auto param = GetParam();
diff --git a/src/tint/lang/spirv/writer/ast_printer/function_attribute_test.cc b/src/tint/lang/spirv/writer/ast_printer/function_attribute_test.cc
index 27e9a6e..7c5fdfb 100644
--- a/src/tint/lang/spirv/writer/ast_printer/function_attribute_test.cc
+++ b/src/tint/lang/spirv/writer/ast_printer/function_attribute_test.cc
@@ -165,7 +165,7 @@
}
TEST_F(SpirvASTPrinterTest, Decoration_ExecutionMode_WorkgroupSize_OverridableConst) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder pb;
pb.Override("width", pb.ty.i32(), pb.Call<i32>(2_i), pb.Id(7_u));
@@ -185,7 +185,7 @@
}
TEST_F(SpirvASTPrinterTest, Decoration_ExecutionMode_WorkgroupSize_LiteralAndConst) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder pb;
diff --git a/src/tint/lang/spirv/writer/ast_printer/ident_expression_test.cc b/src/tint/lang/spirv/writer/ast_printer/ident_expression_test.cc
index e65e8c9..54e18bb 100644
--- a/src/tint/lang/spirv/writer/ast_printer/ident_expression_test.cc
+++ b/src/tint/lang/spirv/writer/ast_printer/ident_expression_test.cc
@@ -37,7 +37,7 @@
using SpirvASTPrinterTest = TestHelper;
TEST_F(SpirvASTPrinterTest, IdentifierExpression_GlobalConst) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder pb;
diff --git a/src/tint/lang/wgsl/ast/assignment_statement_test.cc b/src/tint/lang/wgsl/ast/assignment_statement_test.cc
index 6c51920..7ba43d1 100644
--- a/src/tint/lang/wgsl/ast/assignment_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/assignment_statement_test.cc
@@ -64,7 +64,7 @@
}
TEST_F(AssignmentStatementTest, Assert_Null_LHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<AssignmentStatement>(nullptr, b.Expr(1_i));
@@ -73,7 +73,7 @@
}
TEST_F(AssignmentStatementTest, Assert_Null_RHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<AssignmentStatement>(b.Expr(1_i), nullptr);
@@ -82,7 +82,7 @@
}
TEST_F(AssignmentStatementTest, Assert_DifferentGenerationID_LHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -92,7 +92,7 @@
}
TEST_F(AssignmentStatementTest, Assert_DifferentGenerationID_RHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/binary_expression_test.cc b/src/tint/lang/wgsl/ast/binary_expression_test.cc
index 34e6e58..7dffd7b 100644
--- a/src/tint/lang/wgsl/ast/binary_expression_test.cc
+++ b/src/tint/lang/wgsl/ast/binary_expression_test.cc
@@ -62,7 +62,7 @@
}
TEST_F(BinaryExpressionTest, Assert_Null_LHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<BinaryExpression>(core::BinaryOp::kEqual, nullptr, b.Expr("rhs"));
@@ -71,7 +71,7 @@
}
TEST_F(BinaryExpressionTest, Assert_Null_RHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<BinaryExpression>(core::BinaryOp::kEqual, b.Expr("lhs"), nullptr);
@@ -80,7 +80,7 @@
}
TEST_F(BinaryExpressionTest, Assert_DifferentGenerationID_LHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -90,7 +90,7 @@
}
TEST_F(BinaryExpressionTest, Assert_DifferentGenerationID_RHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/block_statement_test.cc b/src/tint/lang/wgsl/ast/block_statement_test.cc
index 6e00eaa..8540432 100644
--- a/src/tint/lang/wgsl/ast/block_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/block_statement_test.cc
@@ -72,7 +72,7 @@
}
TEST_F(BlockStatementTest, Assert_Null_Statement) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<BlockStatement>(tint::Vector<const Statement*, 1>{nullptr}, tint::Empty);
@@ -81,7 +81,7 @@
}
TEST_F(BlockStatementTest, Assert_DifferentGenerationID_Statement) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/break_if_statement_test.cc b/src/tint/lang/wgsl/ast/break_if_statement_test.cc
index 4c59976..c5e3e4b 100644
--- a/src/tint/lang/wgsl/ast/break_if_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/break_if_statement_test.cc
@@ -48,7 +48,7 @@
}
TEST_F(BreakIfStatementTest, Assert_Null_Condition) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.BreakIf(nullptr);
@@ -57,7 +57,7 @@
}
TEST_F(BreakIfStatementTest, Assert_DifferentGenerationID_Cond) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/builtin_attribute_test.cc b/src/tint/lang/wgsl/ast/builtin_attribute_test.cc
index 4bd547b..6a56995 100644
--- a/src/tint/lang/wgsl/ast/builtin_attribute_test.cc
+++ b/src/tint/lang/wgsl/ast/builtin_attribute_test.cc
@@ -39,7 +39,7 @@
}
TEST_F(BuiltinAttributeTest, Assert_Null_Builtin) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Builtin(nullptr);
@@ -48,7 +48,7 @@
}
TEST_F(BuiltinAttributeTest, Assert_DifferentGenerationID_Builtin) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/call_expression_test.cc b/src/tint/lang/wgsl/ast/call_expression_test.cc
index 7e6cab8..90bbc34 100644
--- a/src/tint/lang/wgsl/ast/call_expression_test.cc
+++ b/src/tint/lang/wgsl/ast/call_expression_test.cc
@@ -91,7 +91,7 @@
}
TEST_F(CallExpressionTest, Assert_Null_Identifier) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Call(static_cast<Identifier*>(nullptr));
@@ -100,7 +100,7 @@
}
TEST_F(CallExpressionTest, Assert_Null_Param) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Call(b.Ident("func"), tint::Vector{
@@ -113,7 +113,7 @@
}
TEST_F(CallExpressionTest, Assert_DifferentGenerationID_Identifier) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -123,7 +123,7 @@
}
TEST_F(CallExpressionTest, Assert_DifferentGenerationID_Type) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -133,7 +133,7 @@
}
TEST_F(CallExpressionTest, Assert_DifferentGenerationID_Param) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/call_statement_test.cc b/src/tint/lang/wgsl/ast/call_statement_test.cc
index e9e8169..3c1a47f 100644
--- a/src/tint/lang/wgsl/ast/call_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/call_statement_test.cc
@@ -47,7 +47,7 @@
}
TEST_F(CallStatementTest, Assert_Null_Call) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.CallStmt(nullptr);
@@ -56,7 +56,7 @@
}
TEST_F(CallStatementTest, Assert_DifferentGenerationID_Call) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/case_statement_test.cc b/src/tint/lang/wgsl/ast/case_statement_test.cc
index 60df861..6425ac2 100644
--- a/src/tint/lang/wgsl/ast/case_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/case_statement_test.cc
@@ -99,7 +99,7 @@
}
TEST_F(CaseStatementTest, Assert_Null_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<CaseStatement>(tint::Vector{b.DefaultCaseSelector()}, nullptr);
@@ -108,7 +108,7 @@
}
TEST_F(CaseStatementTest, Assert_Null_Selector) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<CaseStatement>(tint::Vector<const ast::CaseSelector*, 1>{nullptr},
@@ -118,7 +118,7 @@
}
TEST_F(CaseStatementTest, Assert_DifferentGenerationID_Call) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -129,7 +129,7 @@
}
TEST_F(CaseStatementTest, Assert_DifferentGenerationID_Selector) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/clone_context_test.cc b/src/tint/lang/wgsl/ast/clone_context_test.cc
index 6bc1e6e..4d70dbc 100644
--- a/src/tint/lang/wgsl/ast/clone_context_test.cc
+++ b/src/tint/lang/wgsl/ast/clone_context_test.cc
@@ -1053,7 +1053,7 @@
TEST_F(ASTCloneContextTestNodeTest, CloneWithReplaceAll_SameTypeTwice) {
std::string Testnode_name = TypeInfo::Of<TestNode>().name;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1070,7 +1070,7 @@
std::string Testnode_name = TypeInfo::Of<TestNode>().name;
std::string replaceable_name = TypeInfo::Of<Replaceable>().name;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1087,7 +1087,7 @@
std::string Testnode_name = TypeInfo::Of<TestNode>().name;
std::string replaceable_name = TypeInfo::Of<Replaceable>().name;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1103,7 +1103,7 @@
using ASTCloneContextTest = ::testing::Test;
TEST_F(ASTCloneContextTest, CloneWithReplaceAll_SymbolsTwice) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1181,7 +1181,7 @@
}
TEST_F(ASTCloneContextTest, GenerationIDs_Clone_ObjectNotOwnedBySrc) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder dst;
Program src(ProgramBuilder{});
@@ -1194,7 +1194,7 @@
}
TEST_F(ASTCloneContextTest, GenerationIDs_Clone_ObjectNotOwnedByDst) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder dst;
Program src(ProgramBuilder{});
diff --git a/src/tint/lang/wgsl/ast/color_attribute_test.cc b/src/tint/lang/wgsl/ast/color_attribute_test.cc
index c8dd840..990ee41 100644
--- a/src/tint/lang/wgsl/ast/color_attribute_test.cc
+++ b/src/tint/lang/wgsl/ast/color_attribute_test.cc
@@ -42,7 +42,7 @@
}
TEST_F(ColorAttributeTest, Assert_Null_Builtin) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Color(nullptr);
@@ -51,7 +51,7 @@
}
TEST_F(ColorAttributeTest, Assert_DifferentGenerationID_Color) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/compound_assignment_statement_test.cc b/src/tint/lang/wgsl/ast/compound_assignment_statement_test.cc
index 36e302d..ee26804 100644
--- a/src/tint/lang/wgsl/ast/compound_assignment_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/compound_assignment_statement_test.cc
@@ -68,7 +68,7 @@
}
TEST_F(CompoundAssignmentStatementTest, Assert_Null_LHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<CompoundAssignmentStatement>(nullptr, b.Expr(1_i), core::BinaryOp::kAdd);
@@ -77,7 +77,7 @@
}
TEST_F(CompoundAssignmentStatementTest, Assert_Null_RHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<CompoundAssignmentStatement>(b.Expr(1_i), nullptr, core::BinaryOp::kAdd);
@@ -86,7 +86,7 @@
}
TEST_F(CompoundAssignmentStatementTest, Assert_DifferentGenerationID_LHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -97,7 +97,7 @@
}
TEST_F(CompoundAssignmentStatementTest, Assert_DifferentGenerationID_RHS) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/const_assert_test.cc b/src/tint/lang/wgsl/ast/const_assert_test.cc
index 70e9dfd..0f94a51 100644
--- a/src/tint/lang/wgsl/ast/const_assert_test.cc
+++ b/src/tint/lang/wgsl/ast/const_assert_test.cc
@@ -59,7 +59,7 @@
}
TEST_F(ConstAssertTest, Assert_Null_Condition) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.ConstAssert(nullptr);
@@ -68,7 +68,7 @@
}
TEST_F(ConstAssertTest, Assert_DifferentGenerationID_Condition) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/diagnostic_control_test.cc b/src/tint/lang/wgsl/ast/diagnostic_control_test.cc
index 514b9ef..9873fb7 100644
--- a/src/tint/lang/wgsl/ast/diagnostic_control_test.cc
+++ b/src/tint/lang/wgsl/ast/diagnostic_control_test.cc
@@ -37,7 +37,7 @@
using DiagnosticControlTest = TestHelper;
TEST_F(DiagnosticControlTest, Assert_RuleNotNull) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
DiagnosticControl control(wgsl::DiagnosticSeverity::kWarning, nullptr);
diff --git a/src/tint/lang/wgsl/ast/diagnostic_rule_name_test.cc b/src/tint/lang/wgsl/ast/diagnostic_rule_name_test.cc
index 94ccc9c..387792c 100644
--- a/src/tint/lang/wgsl/ast/diagnostic_rule_name_test.cc
+++ b/src/tint/lang/wgsl/ast/diagnostic_rule_name_test.cc
@@ -41,7 +41,7 @@
}
TEST_F(DiagnosticRuleNameTest, Assert_NameNotTemplated) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<ast::DiagnosticRuleName>(b.Ident("name", "a", "b", "c"));
@@ -50,7 +50,7 @@
}
TEST_F(DiagnosticRuleNameTest, Assert_CategoryNotTemplated) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<ast::DiagnosticRuleName>(b.Ident("name"), b.Ident("category", "a", "b", "c"));
diff --git a/src/tint/lang/wgsl/ast/for_loop_statement_test.cc b/src/tint/lang/wgsl/ast/for_loop_statement_test.cc
index a284597..d68ff74 100644
--- a/src/tint/lang/wgsl/ast/for_loop_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/for_loop_statement_test.cc
@@ -73,7 +73,7 @@
}
TEST_F(ForLoopStatementTest, Assert_Null_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.For(nullptr, nullptr, nullptr, nullptr);
@@ -82,7 +82,7 @@
}
TEST_F(ForLoopStatementTest, Assert_DifferentGenerationID_Initializer) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -92,7 +92,7 @@
}
TEST_F(ForLoopStatementTest, Assert_DifferentGenerationID_Condition) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -102,7 +102,7 @@
}
TEST_F(ForLoopStatementTest, Assert_DifferentGenerationID_Continuing) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -112,7 +112,7 @@
}
TEST_F(ForLoopStatementTest, Assert_DifferentGenerationID_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/function_test.cc b/src/tint/lang/wgsl/ast/function_test.cc
index 96f7aa5..316d814 100644
--- a/src/tint/lang/wgsl/ast/function_test.cc
+++ b/src/tint/lang/wgsl/ast/function_test.cc
@@ -113,7 +113,7 @@
}
TEST_F(FunctionTest, Assert_NullName) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Func(static_cast<Identifier*>(nullptr), tint::Empty, b.ty.void_(), tint::Empty);
@@ -122,7 +122,7 @@
}
TEST_F(FunctionTest, Assert_TemplatedName) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Func(b.Ident("a", "b"), tint::Empty, b.ty.void_(), tint::Empty);
@@ -132,7 +132,7 @@
TEST_F(FunctionTest, Assert_NullParam) {
using ParamList = tint::Vector<const Parameter*, 2>;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
ParamList params;
@@ -144,7 +144,7 @@
}
TEST_F(FunctionTest, Assert_DifferentGenerationID_Symbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -154,7 +154,7 @@
}
TEST_F(FunctionTest, Assert_DifferentGenerationID_Param) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -168,7 +168,7 @@
}
TEST_F(FunctionTest, Assert_DifferentGenerationID_Attr) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -181,7 +181,7 @@
}
TEST_F(FunctionTest, Assert_DifferentGenerationID_ReturnType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -191,7 +191,7 @@
}
TEST_F(FunctionTest, Assert_DifferentGenerationID_ReturnAttr) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/identifier_expression_test.cc b/src/tint/lang/wgsl/ast/identifier_expression_test.cc
index ebf1916..8d3641e 100644
--- a/src/tint/lang/wgsl/ast/identifier_expression_test.cc
+++ b/src/tint/lang/wgsl/ast/identifier_expression_test.cc
@@ -57,7 +57,7 @@
}
TEST_F(IdentifierExpressionTest, Assert_InvalidSymbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Expr("");
@@ -66,7 +66,7 @@
}
TEST_F(IdentifierExpressionTest, Assert_DifferentGenerationID_Symbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/identifier_test.cc b/src/tint/lang/wgsl/ast/identifier_test.cc
index 8f238e7..2a71304 100644
--- a/src/tint/lang/wgsl/ast/identifier_test.cc
+++ b/src/tint/lang/wgsl/ast/identifier_test.cc
@@ -52,7 +52,7 @@
}
TEST_F(IdentifierTest, Assert_InvalidSymbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Ident("");
@@ -61,7 +61,7 @@
}
TEST_F(IdentifierTest, Assert_DifferentGenerationID_Symbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/if_statement_test.cc b/src/tint/lang/wgsl/ast/if_statement_test.cc
index 4c738ad..7b37286 100644
--- a/src/tint/lang/wgsl/ast/if_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/if_statement_test.cc
@@ -59,7 +59,7 @@
}
TEST_F(IfStatementTest, Assert_Null_Condition) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.If(nullptr, b.Block());
@@ -68,7 +68,7 @@
}
TEST_F(IfStatementTest, Assert_Null_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.If(b.Expr(true), nullptr);
@@ -77,7 +77,7 @@
}
TEST_F(IfStatementTest, Assert_InvalidElse) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.If(b.Expr(true), b.Block(), b.Else(b.CallStmt(b.Call("foo"))));
@@ -86,7 +86,7 @@
}
TEST_F(IfStatementTest, Assert_DifferentGenerationID_Cond) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -96,7 +96,7 @@
}
TEST_F(IfStatementTest, Assert_DifferentGenerationID_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -106,7 +106,7 @@
}
TEST_F(IfStatementTest, Assert_DifferentGenerationID_ElseStatement) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/increment_decrement_statement_test.cc b/src/tint/lang/wgsl/ast/increment_decrement_statement_test.cc
index 869b522..70730d0 100644
--- a/src/tint/lang/wgsl/ast/increment_decrement_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/increment_decrement_statement_test.cc
@@ -66,7 +66,7 @@
}
TEST_F(IncrementDecrementStatementTest, Assert_DifferentGenerationID_Expr) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/index_accessor_expression_test.cc b/src/tint/lang/wgsl/ast/index_accessor_expression_test.cc
index ff96f2a..7c1527a 100644
--- a/src/tint/lang/wgsl/ast/index_accessor_expression_test.cc
+++ b/src/tint/lang/wgsl/ast/index_accessor_expression_test.cc
@@ -60,7 +60,7 @@
}
TEST_F(IndexAccessorExpressionTest, Assert_Null_Array) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.IndexAccessor(nullptr, b.Expr("idx"));
@@ -69,7 +69,7 @@
}
TEST_F(IndexAccessorExpressionTest, Assert_Null_Index) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.IndexAccessor(b.Expr("arr"), nullptr);
@@ -78,7 +78,7 @@
}
TEST_F(IndexAccessorExpressionTest, Assert_DifferentGenerationID_Array) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -88,7 +88,7 @@
}
TEST_F(IndexAccessorExpressionTest, Assert_DifferentGenerationID_Index) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/loop_statement_test.cc b/src/tint/lang/wgsl/ast/loop_statement_test.cc
index fc43b31..3afccfa 100644
--- a/src/tint/lang/wgsl/ast/loop_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/loop_statement_test.cc
@@ -93,7 +93,7 @@
}
TEST_F(LoopStatementTest, Assert_Null_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<LoopStatement>(nullptr, nullptr, tint::Empty);
@@ -102,7 +102,7 @@
}
TEST_F(LoopStatementTest, Assert_DifferentGenerationID_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -112,7 +112,7 @@
}
TEST_F(LoopStatementTest, Assert_DifferentGenerationID_Continuing) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/member_accessor_expression_test.cc b/src/tint/lang/wgsl/ast/member_accessor_expression_test.cc
index 22b1c38..28153d1 100644
--- a/src/tint/lang/wgsl/ast/member_accessor_expression_test.cc
+++ b/src/tint/lang/wgsl/ast/member_accessor_expression_test.cc
@@ -55,7 +55,7 @@
}
TEST_F(MemberAccessorExpressionTest, Assert_Null_Struct) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<MemberAccessorExpression>(nullptr, b.Ident("member"));
@@ -64,7 +64,7 @@
}
TEST_F(MemberAccessorExpressionTest, Assert_Null_Member) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<MemberAccessorExpression>(b.Expr("struct"), nullptr);
@@ -73,7 +73,7 @@
}
TEST_F(MemberAccessorExpressionTest, Assert_DifferentGenerationID_Struct) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -83,7 +83,7 @@
}
TEST_F(MemberAccessorExpressionTest, Assert_DifferentGenerationID_Member) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -93,7 +93,7 @@
}
TEST_F(MemberAccessorExpressionTest, Assert_MemberNotTemplated) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<MemberAccessorExpression>(b.Expr("structure"),
diff --git a/src/tint/lang/wgsl/ast/module_test.cc b/src/tint/lang/wgsl/ast/module_test.cc
index e5949a6..36773ed 100644
--- a/src/tint/lang/wgsl/ast/module_test.cc
+++ b/src/tint/lang/wgsl/ast/module_test.cc
@@ -52,7 +52,7 @@
}
TEST_F(ModuleTest, Assert_Null_GlobalVariable) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder builder;
builder.AST().AddGlobalVariable(nullptr);
@@ -61,7 +61,7 @@
}
TEST_F(ModuleTest, Assert_Null_TypeDecl) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder builder;
builder.AST().AddTypeDecl(nullptr);
@@ -70,7 +70,7 @@
}
TEST_F(ModuleTest, Assert_DifferentGenerationID_Function) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -81,7 +81,7 @@
}
TEST_F(ModuleTest, Assert_DifferentGenerationID_GlobalVariable) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -91,7 +91,7 @@
}
TEST_F(ModuleTest, Assert_Null_Function) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder builder;
builder.AST().AddFunction(nullptr);
diff --git a/src/tint/lang/wgsl/ast/return_statement_test.cc b/src/tint/lang/wgsl/ast/return_statement_test.cc
index ed7c9e0..138a46c 100644
--- a/src/tint/lang/wgsl/ast/return_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/return_statement_test.cc
@@ -65,7 +65,7 @@
}
TEST_F(ReturnStatementTest, Assert_DifferentGenerationID_Expr) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/struct_member_test.cc b/src/tint/lang/wgsl/ast/struct_member_test.cc
index c1e429b..8a76d9f 100644
--- a/src/tint/lang/wgsl/ast/struct_member_test.cc
+++ b/src/tint/lang/wgsl/ast/struct_member_test.cc
@@ -58,7 +58,7 @@
}
TEST_F(StructMemberTest, Assert_Null_Name) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Member(static_cast<Identifier*>(nullptr), b.ty.i32());
@@ -67,7 +67,7 @@
}
TEST_F(StructMemberTest, Assert_Null_Type) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Member("a", Type{});
@@ -76,7 +76,7 @@
}
TEST_F(StructMemberTest, Assert_Null_Attribute) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Member("a", b.ty.i32(), tint::Vector{b.MemberSize(4_a), nullptr});
@@ -85,7 +85,7 @@
}
TEST_F(StructMemberTest, Assert_DifferentGenerationID_Symbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -95,7 +95,7 @@
}
TEST_F(StructMemberTest, Assert_DifferentGenerationID_Attribute) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/struct_test.cc b/src/tint/lang/wgsl/ast/struct_test.cc
index d0e78de..b47e920 100644
--- a/src/tint/lang/wgsl/ast/struct_test.cc
+++ b/src/tint/lang/wgsl/ast/struct_test.cc
@@ -81,7 +81,7 @@
}
TEST_F(AstStructTest, Assert_Null_StructMember) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Structure(b.Sym("S"), tint::Vector{b.Member("a", b.ty.i32()), nullptr}, tint::Empty);
@@ -90,7 +90,7 @@
}
TEST_F(AstStructTest, Assert_Null_Attribute) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Structure(b.Sym("S"), tint::Vector{b.Member("a", b.ty.i32())},
@@ -100,7 +100,7 @@
}
TEST_F(AstStructTest, Assert_DifferentGenerationID_StructMember) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -110,7 +110,7 @@
}
TEST_F(AstStructTest, Assert_DifferentGenerationID_Attribute) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/switch_statement_test.cc b/src/tint/lang/wgsl/ast/switch_statement_test.cc
index fa1fc40..2105a6c 100644
--- a/src/tint/lang/wgsl/ast/switch_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/switch_statement_test.cc
@@ -88,7 +88,7 @@
TEST_F(SwitchStatementTest, Assert_Null_Condition) {
using CaseStatementList = tint::Vector<const CaseStatement*, 2>;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
CaseStatementList cases;
@@ -101,7 +101,7 @@
TEST_F(SwitchStatementTest, Assert_Null_CaseStatement) {
using CaseStatementList = tint::Vector<const CaseStatement*, 2>;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<SwitchStatement>(b.Expr(true), CaseStatementList{nullptr}, tint::Empty,
@@ -111,7 +111,7 @@
}
TEST_F(SwitchStatementTest, Assert_DifferentGenerationID_Condition) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -129,7 +129,7 @@
}
TEST_F(SwitchStatementTest, Assert_DifferentGenerationID_CaseStatement) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/templated_identifier_test.cc b/src/tint/lang/wgsl/ast/templated_identifier_test.cc
index ded0e81..a47a905 100644
--- a/src/tint/lang/wgsl/ast/templated_identifier_test.cc
+++ b/src/tint/lang/wgsl/ast/templated_identifier_test.cc
@@ -63,7 +63,7 @@
}
TEST_F(TemplatedIdentifierTest, Assert_InvalidSymbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Expr("");
@@ -72,7 +72,7 @@
}
TEST_F(TemplatedIdentifierTest, Assert_DifferentGenerationID_Symbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -82,7 +82,7 @@
}
TEST_F(TemplatedIdentifierTest, Assert_DifferentGenerationID_TemplateArg) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/unary_op_expression_test.cc b/src/tint/lang/wgsl/ast/unary_op_expression_test.cc
index 3ce46c9..45b2c52 100644
--- a/src/tint/lang/wgsl/ast/unary_op_expression_test.cc
+++ b/src/tint/lang/wgsl/ast/unary_op_expression_test.cc
@@ -58,7 +58,7 @@
}
TEST_F(UnaryOpExpressionTest, Assert_Null_Expression) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<UnaryOpExpression>(core::UnaryOp::kNot, nullptr);
@@ -67,7 +67,7 @@
}
TEST_F(UnaryOpExpressionTest, Assert_DifferentGenerationID_Expression) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/variable_decl_statement_test.cc b/src/tint/lang/wgsl/ast/variable_decl_statement_test.cc
index 1e3588d..3b4640c 100644
--- a/src/tint/lang/wgsl/ast/variable_decl_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/variable_decl_statement_test.cc
@@ -58,7 +58,7 @@
}
TEST_F(VariableDeclStatementTest, Assert_Null_Variable) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.create<VariableDeclStatement>(nullptr);
@@ -67,7 +67,7 @@
}
TEST_F(VariableDeclStatementTest, Assert_DifferentGenerationID_Variable) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/variable_test.cc b/src/tint/lang/wgsl/ast/variable_test.cc
index c85ec93..c24ab00 100644
--- a/src/tint/lang/wgsl/ast/variable_test.cc
+++ b/src/tint/lang/wgsl/ast/variable_test.cc
@@ -76,7 +76,7 @@
}
TEST_F(VariableTest, Assert_Null_Name) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Var(static_cast<Identifier*>(nullptr), b.ty.i32());
@@ -85,7 +85,7 @@
}
TEST_F(VariableTest, Assert_DifferentGenerationID_Symbol) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -95,7 +95,7 @@
}
TEST_F(VariableTest, Assert_DifferentGenerationID_Initializer) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/ast/while_statement_test.cc b/src/tint/lang/wgsl/ast/while_statement_test.cc
index e678d12..be9e07e 100644
--- a/src/tint/lang/wgsl/ast/while_statement_test.cc
+++ b/src/tint/lang/wgsl/ast/while_statement_test.cc
@@ -65,7 +65,7 @@
}
TEST_F(WhileStatementTest, Assert_Null_Cond) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
auto* body = b.Block();
@@ -75,7 +75,7 @@
}
TEST_F(WhileStatementTest, Assert_Null_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
auto* cond =
@@ -86,7 +86,7 @@
}
TEST_F(WhileStatementTest, Assert_DifferentGenerationID_Condition) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
@@ -96,7 +96,7 @@
}
TEST_F(WhileStatementTest, Assert_DifferentGenerationID_Body) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b1;
ProgramBuilder b2;
diff --git a/src/tint/lang/wgsl/program/clone_context_test.cc b/src/tint/lang/wgsl/program/clone_context_test.cc
index 936cb6b..527a6a2 100644
--- a/src/tint/lang/wgsl/program/clone_context_test.cc
+++ b/src/tint/lang/wgsl/program/clone_context_test.cc
@@ -1051,7 +1051,7 @@
TEST_F(ProgramCloneContextNodeTest, CloneWithReplaceAll_SameTypeTwice) {
std::string node_name = TypeInfo::Of<Node>().name;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1068,7 +1068,7 @@
std::string node_name = TypeInfo::Of<Node>().name;
std::string replaceable_name = TypeInfo::Of<Replaceable>().name;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1085,7 +1085,7 @@
std::string node_name = TypeInfo::Of<Node>().name;
std::string replaceable_name = TypeInfo::Of<Replaceable>().name;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1101,7 +1101,7 @@
using ProgramCloneContextTest = ::testing::Test;
TEST_F(ProgramCloneContextTest, CloneWithReplaceAll_SymbolsTwice) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder cloned;
Program original;
@@ -1207,7 +1207,7 @@
}
TEST_F(ProgramCloneContextTest, GenerationIDs_Clone_ObjectNotOwnedBySrc) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder dst;
Program src(ProgramBuilder{});
@@ -1220,7 +1220,7 @@
}
TEST_F(ProgramCloneContextTest, GenerationIDs_Clone_ObjectNotOwnedByDst) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder dst;
Program src(ProgramBuilder{});
diff --git a/src/tint/lang/wgsl/program/program_test.cc b/src/tint/lang/wgsl/program/program_test.cc
index dff5b23..4c91d2d 100644
--- a/src/tint/lang/wgsl/program/program_test.cc
+++ b/src/tint/lang/wgsl/program/program_test.cc
@@ -65,7 +65,7 @@
}
TEST_F(ProgramTest, Assert_NullGlobalVariable) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.AST().AddGlobalVariable(nullptr);
@@ -74,7 +74,7 @@
}
TEST_F(ProgramTest, Assert_NullTypeDecl) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.AST().AddTypeDecl(nullptr);
@@ -83,7 +83,7 @@
}
TEST_F(ProgramTest, Assert_Null_Function) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.AST().AddFunction(nullptr);
diff --git a/src/tint/lang/wgsl/resolver/resolver_test.cc b/src/tint/lang/wgsl/resolver/resolver_test.cc
index 152cbbe..c73a75b 100644
--- a/src/tint/lang/wgsl/resolver/resolver_test.cc
+++ b/src/tint/lang/wgsl/resolver/resolver_test.cc
@@ -2087,7 +2087,7 @@
}
TEST_F(ResolverTest, ASTNodeNotReached) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.Ident("ident");
@@ -2098,7 +2098,7 @@
}
TEST_F(ResolverTest, ASTNodeReachedTwice) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
auto* expr = b.Expr(1_i);
diff --git a/src/tint/lang/wgsl/resolver/validation_test.cc b/src/tint/lang/wgsl/resolver/validation_test.cc
index 5d0f51c..9c306f7 100644
--- a/src/tint/lang/wgsl/resolver/validation_test.cc
+++ b/src/tint/lang/wgsl/resolver/validation_test.cc
@@ -133,7 +133,7 @@
}
TEST_F(ResolverValidationTest, UnhandledStmt) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.WrapInFunction(b.create<FakeStmt>());
@@ -164,7 +164,7 @@
}
TEST_F(ResolverValidationTest, Expr_ErrUnknownExprType) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
ProgramBuilder b;
b.WrapInFunction(b.create<FakeExpr>());
diff --git a/src/tint/utils/containers/vector_test.cc b/src/tint/utils/containers/vector_test.cc
index f437ddb..c509cbb 100644
--- a/src/tint/utils/containers/vector_test.cc
+++ b/src/tint/utils/containers/vector_test.cc
@@ -2110,7 +2110,7 @@
}
TEST(TintVectorTest, AssertOOBs) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Vector vec{1};
[[maybe_unused]] int i = vec[1];
@@ -2121,7 +2121,7 @@
#if TINT_VECTOR_MUTATION_CHECKS_ENABLED
TEST(TintVectorTest, AssertPushWhileIterating) {
using V = Vector<int, 4>;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
V vec;
vec.Push(1);
@@ -2136,7 +2136,7 @@
TEST(TintVectorTest, AssertPopWhileIterating) {
using V = Vector<int, 4>;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
V vec;
vec.Push(1);
@@ -2151,7 +2151,7 @@
TEST(TintVectorTest, AssertClearWhileIterating) {
using V = Vector<int, 4>;
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
V vec;
vec.Push(1);
@@ -2446,7 +2446,7 @@
}
TEST(TintVectorRefTest, AssertOOBs) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Vector vec{1};
const VectorRef<int> vec_ref(vec);
diff --git a/src/tint/utils/ice/ice_test.cc b/src/tint/utils/ice/ice_test.cc
index 0afa5de..d0a992c 100644
--- a/src/tint/utils/ice/ice_test.cc
+++ b/src/tint/utils/ice/ice_test.cc
@@ -33,7 +33,7 @@
namespace {
TEST(ICETest_AssertTrue_Test, Unreachable) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
if ((true)) {
TINT_UNREACHABLE();
@@ -47,7 +47,7 @@
}
TEST(ICETest_AssertTrue_Test, AssertFalse) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
if ((true)) {
TINT_ASSERT(false);
diff --git a/src/tint/utils/rtti/switch_test.cc b/src/tint/utils/rtti/switch_test.cc
index 4ae0f95..e4241ff 100644
--- a/src/tint/utils/rtti/switch_test.cc
+++ b/src/tint/utils/rtti/switch_test.cc
@@ -230,7 +230,7 @@
}
TEST(Castable, SwitchMustMatch_NoMatchWithoutReturnValue) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
std::unique_ptr<Animal> frog = std::make_unique<Frog>();
Switch(
@@ -243,7 +243,7 @@
}
TEST(Castable, SwitchMustMatch_NoMatchWithReturnValue) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
std::unique_ptr<Animal> frog = std::make_unique<Frog>();
int res = Switch(
@@ -257,7 +257,7 @@
}
TEST(Castable, SwitchMustMatch_NullptrWithoutReturnValue) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
Switch(
static_cast<CastableBase*>(nullptr), //
@@ -269,7 +269,7 @@
}
TEST(Castable, SwitchMustMatch_NullptrWithReturnValue) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
int res = Switch(
static_cast<CastableBase*>(nullptr), //
diff --git a/src/tint/utils/symbol/symbol_table_test.cc b/src/tint/utils/symbol/symbol_table_test.cc
index 8421e1f..9328640 100644
--- a/src/tint/utils/symbol/symbol_table_test.cc
+++ b/src/tint/utils/symbol/symbol_table_test.cc
@@ -50,7 +50,7 @@
}
TEST_F(SymbolTableTest, AssertsForBlankString) {
- EXPECT_DEATH(
+ EXPECT_DEATH_IF_SUPPORTED(
{
auto generation_id = GenerationID::New();
SymbolTable s{generation_id};