From 74168f65bad8a9916e8cd85d01082e311f11ced2 Mon Sep 17 00:00:00 2001 From: Ian Bell <ian.bell@nist.gov> Date: Fri, 27 May 2022 10:46:03 -0400 Subject: [PATCH] More helpful error messages for critical extrapolation test --- src/tests/catch_tests.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/catch_tests.cxx b/src/tests/catch_tests.cxx index f2f72b3..d888e8f 100644 --- a/src/tests/catch_tests.cxx +++ b/src/tests/catch_tests.cxx @@ -451,9 +451,9 @@ TEST_CASE("Test extrapolate from critical point", "") { auto errrhoL = SArhoL - rhosoln[0], errrhoV = SArhoV - rhosoln[1]; if (std::abs(errrhoL)/SArhoL > 1e-10) { - throw std::range_error("rhoL error > 1e-10"); } + throw std::range_error("rhoL error [" + std::to_string(errrhoL) + "] > 1e-10"); } if (std::abs(errrhoV)/SArhoV > 1e-10) { - throw std::range_error("rhoV error > 1e-10"); } + throw std::range_error("rhoV error [" + std::to_string(errrhoV) + "] > 1e-10"); } }; CHECK_NOTHROW(stepper(0.01)); CHECK_NOTHROW(stepper(0.1)); -- GitLab