Skip to content

Commit 06cb79e

Browse files
committed
Update INFO string to match what CAPTURE would do if it worked well
1 parent d632644 commit 06cb79e

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

tests/test_hyp2f1.cpp

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,16 @@ TEST_CASE("hyp2f1 complex scipy.special cases", "[hyp2f1][complex][scipy-special
2626
);
2727
auto [a, b, c, z] = input;
2828
auto [desired, fallback] = output;
29-
auto actual = xsf::hyp2f1(a, b, c, z);
30-
auto error = xsf::extended_relative_error(actual, desired);
31-
INFO(
32-
"Inputs: " << std::setprecision(std::numeric_limits<double>::max_digits10) << '\n'
33-
<< "a: " << a << '\n'
34-
<< "b: " << b << '\n'
35-
<< "c: " << c << '\n'
36-
<< "z: " << z << '\n'
37-
<< "Output: \n"
38-
<< "desired: " << desired << '\n'
39-
<< "actual: " << actual << '\n'
40-
<< "error: " << error << '\n'
41-
<< "tolerance: " << tol << '\n'
42-
);
43-
REQUIRE(error <= 2 * tol);
29+
auto out = xsf::hyp2f1(a, b, c, z);
30+
auto error = xsf::extended_relative_error(out, desired);
31+
INFO("a := " << std::setprecision(std::numeric_limits<double>::max_digits10) << a << '\n'
32+
<< "b := " << b << '\n'
33+
<< "c := " << c << '\n'
34+
<< "z := " << z << '\n'
35+
<< "out := " << out << '\n'
36+
<< "desired := " << desired << '\n'
37+
<< "error := " << error << '\n'
38+
<< "tolerance := " << 2*tol << '\n'
39+
);
40+
REQUIRE(error < 2*tol);
4441
}

0 commit comments

Comments
 (0)