Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
18208826
Commit
18208826
authored
Apr 27, 2020
by
Mikaël Salson
Browse files
testing.h: Use fabs rather than ab for TAP_TEST_APPROX
For some reason it was failing with my g++-5
parent
43c38d86
Pipeline
#140639
passed with stages
in 39 minutes and 36 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
algo/tests/unit-tests/testing.h
View file @
18208826
...
...
@@ -46,7 +46,7 @@ if (test_results[id] <= TAP_MAX_FAILED) { \
#define TAP_TEST_APPROX(test, expected, approx, id, msg) { test_nb_executions[id]++; \
if (test_results[id] <= TAP_MAX_FAILED) { \
if ((abs((test) - expected)) > approx) { \
if ((
f
abs((test) - expected)) > approx) { \
test_results[id]++; \
cerr << "Test " << #test << " failed (" << __FILE__ << ":" << __LINE__ << "): " \
<< " expected " << expected << " +/- " << approx << ", got " << (test) \
...
...
Write
Preview
Markdown
is supported
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