Wrap unit test death tests in GTEST_HAS_DEATH_TEST
[oota-llvm.git] / unittests / ADT / APIntTest.cpp
index 207c6337b8ccbdbcb5bc057f6d274ee92280de4d..dc8ba336359e0c7f98b3fb5e23f5dca460fee711 100644 (file)
@@ -172,6 +172,7 @@ TEST(APIntTest, fromString) {
   EXPECT_EQ(APInt(1, 1), APInt(1, "1", 16));
 }
 
+#ifdef GTEST_HAS_DEATH_TEST
 TEST(APIntTest, StringDeath) {
   EXPECT_DEATH(APInt(0, "", 0), "bitwidth too small");
   EXPECT_DEATH(APInt(32, "", 0), "Radix should be 2, 8, 10, or 16!");
@@ -182,5 +183,6 @@ TEST(APIntTest, StringDeath) {
   EXPECT_DEATH(APInt(32, StringRef("1\02", 3), 10), "Invalid character in digit string");
   EXPECT_DEATH(APInt(32, "1L", 10), "Invalid character in digit string");
 }
+#endif
 
 }