Match the expected failure in the Corrector death tests The death tests pass for any failure. Match the violated precondition. Change-Id: I32fae591802bf204d7ff8119504f1ede7b963001
diff --git a/internal/ceres/corrector_test.cc b/internal/ceres/corrector_test.cc index 0548336..e042481 100644 --- a/internal/ceres/corrector_test.cc +++ b/internal/ceres/corrector_test.cc
@@ -42,15 +42,15 @@ namespace internal { // If rho[1] is zero, the Corrector constructor should crash. -TEST(Corrector, ZeroGradientDeathTest) { +TEST(CorrectorDeathTest, ZeroGradient) { const double kRho[] = {0.0, 0.0, 1.0}; - EXPECT_DEATH_IF_SUPPORTED({ Corrector c(1.0, kRho); }, ".*"); + EXPECT_DEATH_IF_SUPPORTED({ Corrector c(1.0, kRho); }, "rho\\[1\\] > 0"); } // If rho[1] is negative, the Corrector constructor should crash. -TEST(Corrector, NegativeGradientDeathTest) { +TEST(CorrectorDeathTest, NegativeGradient) { const double kRho[] = {0.0, -0.1, 1.0}; - EXPECT_DEATH_IF_SUPPORTED({ Corrector c(1.0, kRho); }, ".*"); + EXPECT_DEATH_IF_SUPPORTED({ Corrector c(1.0, kRho); }, "rho\\[1\\] > 0"); } TEST(Corrector, ScalarCorrection) {