Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mlz
kww
Commits
5ffcc300
Commit
5ffcc300
authored
Dec 17, 2019
by
Wuttke, Joachim
Browse files
simplify test output
parent
f796c0d4
Pipeline
#14247
failed with stage
in 11 minutes
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/kwwtest.c
View file @
5ffcc300
...
...
@@ -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
.
011
85130685163975767
);
// mode=2
test_one
(
&
fail
,
1e-14
,
kwwp
(
2e-2
,
.
459
),
0
.
0466
8285680895551543
);
// mode=1
printf
(
"
#####################################
\n
"
);
printf
(
"
\n
"
);
if
(
fail
)
{
printf
(
"IN TOTAL, FAILURE IN %i TESTS
\n
"
,
fail
);
return
1
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment