Fix death tests in -Asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98701 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/ADT/APIntTest.cpp b/unittests/ADT/APIntTest.cpp
index 0b13aa4..d08e86a 100644
--- a/unittests/ADT/APIntTest.cpp
+++ b/unittests/ADT/APIntTest.cpp
@@ -328,6 +328,7 @@
}
#ifdef GTEST_HAS_DEATH_TEST
+#ifndef NDEBUG
TEST(APIntTest, StringDeath) {
EXPECT_DEATH(APInt(0, "", 0), "Bitwidth too small");
EXPECT_DEATH(APInt(32, "", 0), "Invalid string length");
@@ -340,5 +341,6 @@
EXPECT_DEATH(APInt(32, "1L", 10), "Invalid character in digit string");
}
#endif
+#endif
}