Replace EXPECT/ASSERT_DEATH with EXPECT_DEATH_IF_SUPPORTED.
This allows us to remove all the WIN32/MSVC ifdefs in the
various tests.
http://code.google.com/p/ceres-solver/issues/detail?id=55
Change-Id: Ida053e44ea84b6915758318403f3db05325f1226
diff --git a/internal/ceres/corrector_test.cc b/internal/ceres/corrector_test.cc
index b2ee9ab..55e7d6b 100644
--- a/internal/ceres/corrector_test.cc
+++ b/internal/ceres/corrector_test.cc
@@ -44,19 +44,15 @@
// If rho[1] is zero, the Corrector constructor should crash.
TEST(Corrector, ZeroGradientDeathTest) {
const double kRho[] = {0.0, 0.0, 0.0};
-#ifndef _WIN32
- ASSERT_DEATH({Corrector c(1.0, kRho);},
+ EXPECT_DEATH_IF_SUPPORTED({Corrector c(1.0, kRho);},
".*");
-#endif // _WIN32
}
// If rho[1] is negative, the Corrector constructor should crash.
TEST(Corrector, NegativeGradientDeathTest) {
const double kRho[] = {0.0, -0.1, 0.0};
-#ifndef _WIN32
- ASSERT_DEATH({Corrector c(1.0, kRho);},
+ EXPECT_DEATH_IF_SUPPORTED({Corrector c(1.0, kRho);},
".*");
-#endif // _WIN32
}
TEST(Corrector, ScalarCorrection) {