diff --git a/tests/test_anisotropiceikonal.cpp b/tests/test_anisotropiceikonal.cpp index fe3160b7..eb38c789 100644 --- a/tests/test_anisotropiceikonal.cpp +++ b/tests/test_anisotropiceikonal.cpp @@ -77,6 +77,10 @@ BOOST_AUTO_TEST_CASE(cartesian_2d_b) ae.solve(metric.data(), start, sol); BOOST_REQUIRE(!sol.empty()); BOOST_CHECK_EQUAL(sol.size(), grid.number_of_cells); - std::vector truth = { 0, 1, 2, 2, std::sqrt(5), std::sqrt(8) }; - BOOST_CHECK_EQUAL_COLLECTIONS(sol.begin(), sol.end(), truth.begin(), truth.end()); + // The test below works as a regression test, but does not test + // that cell 5 is close to the truth, which is sqrt(8). + std::vector expected = { 0, 1, 2, 2, std::sqrt(5), 3.0222193552572132 }; + for (int cell = 0; cell < grid.number_of_cells; ++cell) { + BOOST_CHECK_CLOSE(sol[cell], expected[cell], 1e-5); + } }