diff --git a/internal/ceres/tiny_solver_test.cc b/internal/ceres/tiny_solver_test.cc index 747e20d05..f92b186fa 100644 --- a/internal/ceres/tiny_solver_test.cc +++ b/internal/ceres/tiny_solver_test.cc @@ -146,13 +146,11 @@ void TestHelper(const Function& f, const Vector& x0) { Vector x = x0; Vec2 residuals; f(x.data(), residuals.data(), NULL); - EXPECT_GT(residuals.norm(), 1e-10); + EXPECT_GT(residuals.squaredNorm() / 2.0, 1e-10); TinySolver solver; solver.Solve(f, &x); - - f(x.data(), residuals.data(), NULL); - EXPECT_NEAR(0.0, residuals.norm(), 1e-10); + EXPECT_NEAR(0.0, solver.summary.final_cost, 1e-10); } // A test case for when the cost function is statically sized.