about summary refs log tree commit diff
path: root/absl/flags/flag_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'absl/flags/flag_test.cc')
-rw-r--r--absl/flags/flag_test.cc23
1 files changed, 13 insertions, 10 deletions
diff --git a/absl/flags/flag_test.cc b/absl/flags/flag_test.cc
index dbe94a2c3b62..6fa178f1f0b9 100644
--- a/absl/flags/flag_test.cc
+++ b/absl/flags/flag_test.cc
@@ -583,18 +583,21 @@ using FlagDeathTest = FlagTest;
 
 TEST_F(FlagDeathTest, TestTypeMismatchValidations) {
 #if !defined(NDEBUG)
-  EXPECT_DEATH(static_cast<void>(absl::GetFlag(FLAGS_mistyped_int_flag)),
-               "Flag 'mistyped_int_flag' is defined as one type and declared "
-               "as another");
-  EXPECT_DEATH(static_cast<void>(absl::GetFlag(FLAGS_mistyped_string_flag)),
-               "Flag 'mistyped_string_flag' is defined as one type and "
-               "declared as another");
+  EXPECT_DEATH_IF_SUPPORTED(
+      static_cast<void>(absl::GetFlag(FLAGS_mistyped_int_flag)),
+      "Flag 'mistyped_int_flag' is defined as one type and declared "
+      "as another");
+  EXPECT_DEATH_IF_SUPPORTED(
+      static_cast<void>(absl::GetFlag(FLAGS_mistyped_string_flag)),
+      "Flag 'mistyped_string_flag' is defined as one type and "
+      "declared as another");
 #endif
 
-  EXPECT_DEATH(absl::SetFlag(&FLAGS_mistyped_int_flag, 1),
-               "Flag 'mistyped_int_flag' is defined as one type and declared "
-               "as another");
-  EXPECT_DEATH(
+  EXPECT_DEATH_IF_SUPPORTED(
+      absl::SetFlag(&FLAGS_mistyped_int_flag, 1),
+      "Flag 'mistyped_int_flag' is defined as one type and declared "
+      "as another");
+  EXPECT_DEATH_IF_SUPPORTED(
       absl::SetFlag(&FLAGS_mistyped_string_flag, std::vector<std::string>{}),
       "Flag 'mistyped_string_flag' is defined as one type and declared as "
       "another");