[llvm-branch-commits] [llvm-branch] r99906 - in /llvm/branches/release_27/unittests: ADT/APFloatTest.cpp ADT/APIntTest.cpp Support/LeakDetectorTest.cpp
Tanya Lattner
tonic at nondot.org
Tue Mar 30 11:33:25 PDT 2010
Author: tbrethou
Date: Tue Mar 30 13:33:25 2010
New Revision: 99906
URL: http://llvm.org/viewvc/llvm-project?rev=99906&view=rev
Log:
Merge 98701 from mainline.
Fix death tests in -Assert builds.
Modified:
llvm/branches/release_27/unittests/ADT/APFloatTest.cpp
llvm/branches/release_27/unittests/ADT/APIntTest.cpp
llvm/branches/release_27/unittests/Support/LeakDetectorTest.cpp
Modified: llvm/branches/release_27/unittests/ADT/APFloatTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_27/unittests/ADT/APFloatTest.cpp?rev=99906&r1=99905&r2=99906&view=diff
==============================================================================
--- llvm/branches/release_27/unittests/ADT/APFloatTest.cpp (original)
+++ llvm/branches/release_27/unittests/ADT/APFloatTest.cpp Tue Mar 30 13:33:25 2010
@@ -374,6 +374,7 @@
}
#ifdef GTEST_HAS_DEATH_TEST
+#ifndef NDEBUG
TEST(APFloatTest, SemanticsDeath) {
EXPECT_DEATH(APFloat(APFloat::IEEEsingle, 0.0f).convertToDouble(), "Float semantics are not IEEEdouble");
EXPECT_DEATH(APFloat(APFloat::IEEEdouble, 0.0 ).convertToFloat(), "Float semantics are not IEEEsingle");
@@ -573,5 +574,6 @@
EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.1p-"), "Exponent has no digits");
}
#endif
+#endif
}
Modified: llvm/branches/release_27/unittests/ADT/APIntTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_27/unittests/ADT/APIntTest.cpp?rev=99906&r1=99905&r2=99906&view=diff
==============================================================================
--- llvm/branches/release_27/unittests/ADT/APIntTest.cpp (original)
+++ llvm/branches/release_27/unittests/ADT/APIntTest.cpp Tue Mar 30 13:33:25 2010
@@ -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
}
Modified: llvm/branches/release_27/unittests/Support/LeakDetectorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_27/unittests/Support/LeakDetectorTest.cpp?rev=99906&r1=99905&r2=99906&view=diff
==============================================================================
--- llvm/branches/release_27/unittests/Support/LeakDetectorTest.cpp (original)
+++ llvm/branches/release_27/unittests/Support/LeakDetectorTest.cpp Tue Mar 30 13:33:25 2010
@@ -15,6 +15,7 @@
namespace {
#ifdef GTEST_HAS_DEATH_TEST
+#ifndef NDEBUG
TEST(LeakDetector, Death1) {
LeakDetector::addGarbageObject((void*) 1);
LeakDetector::addGarbageObject((void*) 2);
@@ -25,5 +26,6 @@
"Cache != o && \"Object already in set!\"");
}
#endif
+#endif
}
More information about the llvm-branch-commits
mailing list