From d03ab99aa999544403652e0739c9bea3b8b7835e Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 10 Jun 2011 01:05:23 -0600 Subject: Test for NaNs in results. --- tests/EquationSystem-Vector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/EquationSystem-Vector.cpp') diff --git a/tests/EquationSystem-Vector.cpp b/tests/EquationSystem-Vector.cpp index b121026..6ac5ae9 100644 --- a/tests/EquationSystem-Vector.cpp +++ b/tests/EquationSystem-Vector.cpp @@ -60,7 +60,7 @@ main() << "Rejections: " << integrator.rejections() << std::endl; double error = norm(expected - actual)/norm(expected); - if (error > 4.0e-6) { + if (error > 4.0e-6 || !std::isfinite(error)) { std::cerr << "Error: " << 100.0*error << "%" << std::endl; return EXIT_FAILURE; } else { -- cgit v1.2.3