Commit 5ffcc300 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

simplify test output

parent f796c0d4
Pipeline #14247 failed with stage
in 11 minutes
......@@ -32,9 +32,11 @@ void test_one(int* fail, double limit, double a, double b)
{
static int num = 0;
double re = relerr(a,b);
if (re==0)
return;
int ok = re<=limit;
printf(ok ? " " : "ERR");
printf(" test case %i: found=%g, expected=%g, relerr=%g", num, a, b, re);
printf(" test case %i: found=%g, expected=%g, relerr=%g\n", num, a, b, re);
++num;
if (!ok)
++(*fail);
......@@ -78,7 +80,7 @@ int main(void) {
test_one(&fail, 1e-14, kwwp(5e-3, .459), 0.01185130685163975767); // mode=2
test_one(&fail, 1e-14, kwwp(2e-2, .459), 0.04668285680895551543); // mode=1
printf("#####################################\n");
printf("\n");
if (fail) {
printf("IN TOTAL, FAILURE IN %i TESTS\n", fail);
return 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment