Commit 18208826 authored by Mikaël Salson's avatar Mikaël Salson

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
......@@ -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 ((fabs((test) - expected)) > approx) { \
test_results[id]++; \
cerr << "Test " << #test << " failed (" << __FILE__ << ":" << __LINE__ << "): " \
<< " expected " << expected << " +/- " << approx << ", got " << (test) \
......
Markdown is supported
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