Skip to content

Commit

Permalink
Do not use Approx again (deprecated)
Browse files Browse the repository at this point in the history
  • Loading branch information
alkino committed May 17, 2023
1 parent 7dd9257 commit 7549893
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/unit/newton/newton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "nmodl.hpp"

#include <catch2/catch_approx.hpp>
#include <catch2/catch_matchers_floating_point.hpp>

Check failure on line 10 in test/unit/newton/newton.cpp

View workflow job for this annotation

GitHub Actions / { "flag_warnings": "ON", "os": "ubuntu-22.04" }

catch2/catch_matchers_floating_point.hpp: No such file or directory
#include <catch2/catch_test_macros.hpp>

#include <cmath>
Expand Down Expand Up @@ -35,7 +35,7 @@ SCENARIO("Non-linear system to solve with Newton Numerical Diff Solver", "[numer
CAPTURE(iter_newton);
CAPTURE(X);
REQUIRE(iter_newton > 0);
REQUIRE(X[0] == Catch::Approx(1.0));
REQUIRE_THAT(X[0], Catch::WithinRel(1.0, 0.01));
REQUIRE(F.norm() < max_error_norm);
}
}
Expand All @@ -56,7 +56,7 @@ SCENARIO("Non-linear system to solve with Newton Numerical Diff Solver", "[numer
CAPTURE(iter_newton);
CAPTURE(X);
REQUIRE(iter_newton > 0);
REQUIRE(X[0] == Catch::Approx(2.19943987001206));
REQUIRE_THAT(X[0], Catch::WithinRel(2.19943987001206, 0.01));
REQUIRE(F.norm() < max_error_norm);
}
}
Expand Down Expand Up @@ -223,7 +223,7 @@ SCENARIO("Non-linear system to solve with Newton Solver", "[analytic][solver]")
CAPTURE(iter_newton);
CAPTURE(X);
REQUIRE(iter_newton > 0);
REQUIRE(X[0] == Catch::Approx(1.0));
REQUIRE_THAT(X[0], Catch::WithinRel(1.0, 0.01));
REQUIRE(F.norm() < max_error_norm);
}
}
Expand All @@ -247,7 +247,7 @@ SCENARIO("Non-linear system to solve with Newton Solver", "[analytic][solver]")
CAPTURE(iter_newton);
CAPTURE(X);
REQUIRE(iter_newton > 0);
REQUIRE(X[0] == Catch::Approx(2.19943987001206));
REQUIRE_THAT(X[0], Catch::WithinRel(2.19943987001206, 0.01));
REQUIRE(F.norm() < max_error_norm);
}
}
Expand Down

0 comments on commit 7549893

Please sign in to comment.