aboutsummaryrefslogtreecommitdiff
path: root/unittests/Support/ErrorOrTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Support/ErrorOrTest.cpp')
-rw-r--r--unittests/Support/ErrorOrTest.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/unittests/Support/ErrorOrTest.cpp b/unittests/Support/ErrorOrTest.cpp
index 3181b4fc4b..b30895cdbd 100644
--- a/unittests/Support/ErrorOrTest.cpp
+++ b/unittests/Support/ErrorOrTest.cpp
@@ -28,7 +28,9 @@ TEST(ErrorOr, SimpleValue) {
a = t2();
EXPECT_FALSE(a);
EXPECT_EQ(errc::invalid_argument, a);
+#ifdef EXPECT_DEBUG_DEATH
EXPECT_DEBUG_DEATH(*a, "Cannot get value when an error exists");
+#endif
}
#if LLVM_HAS_CXX11_STDLIB