aboutsummaryrefslogtreecommitdiff
path: root/unittests/Support
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2013-01-22 04:02:41 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2013-01-22 04:02:41 +0000
commit93d61374f3a12251aa6cc24bea0e0829ad23cdd0 (patch)
tree0fe2ff0f059091ed5ed9dff8ba52076671b8b1c9 /unittests/Support
parent849209686f778e5d6fce675bea9a8300aa596d25 (diff)
ErrorOrTest.cpp: Check existence of EXPECT_DEBUG_DEATH. It is not always available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173123 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support')
-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