llvm.org GIT mirror llvm / 9d8d8ba
Merge 98701 from mainline. Fix death tests in -Assert builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_27@99906 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 9 years ago
3 changed file(s) with 10 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
373373 }
374374
375375 #ifdef GTEST_HAS_DEATH_TEST
376 #ifndef NDEBUG
376377 TEST(APFloatTest, SemanticsDeath) {
377378 EXPECT_DEATH(APFloat(APFloat::IEEEsingle, 0.0f).convertToDouble(), "Float semantics are not IEEEdouble");
378379 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, 0.0 ).convertToFloat(), "Float semantics are not IEEEsingle");
572573 EXPECT_DEATH(APFloat(APFloat::IEEEdouble, "-0x1.1p-"), "Exponent has no digits");
573574 }
574575 #endif
575
576 }
576 #endif
577
578 }
327327 }
328328
329329 #ifdef GTEST_HAS_DEATH_TEST
330 #ifndef NDEBUG
330331 TEST(APIntTest, StringDeath) {
331332 EXPECT_DEATH(APInt(0, "", 0), "Bitwidth too small");
332333 EXPECT_DEATH(APInt(32, "", 0), "Invalid string length");
339340 EXPECT_DEATH(APInt(32, "1L", 10), "Invalid character in digit string");
340341 }
341342 #endif
342
343 }
343 #endif
344
345 }
1414 namespace {
1515
1616 #ifdef GTEST_HAS_DEATH_TEST
17 #ifndef NDEBUG
1718 TEST(LeakDetector, Death1) {
1819 LeakDetector::addGarbageObject((void*) 1);
1920 LeakDetector::addGarbageObject((void*) 2);
2425 "Cache != o && \"Object already in set!\"");
2526 }
2627 #endif
28 #endif
2729
2830 }