diff options
author | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-12-16 20:36:40 +0100 |
---|---|---|
committer | Thomas Hindoe Paaboel Andersen <phomes@gmail.com> | 2014-12-16 20:38:03 +0100 |
commit | 30c873fbfb9bb291330d50aae8fb67d774a0e4f8 (patch) | |
tree | 086a1fa9681326ae1cbd6bb4eb83844fe16dcc4e /src/test | |
parent | b0ceb53a7ddb94269f70b2769bbc72870e574111 (diff) |
test-json: use fabs
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-json.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/test-json.c b/src/test/test-json.c index 8777cf7a40..00768358bf 100644 --- a/src/test/test-json.c +++ b/src/test/test-json.c @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <math.h> + #include "log.h" #include "util.h" #include "json.h" @@ -52,7 +54,7 @@ static void test_one(const char *data, ...) { double d; d = va_arg(ap, double); - assert_se(abs(d - v.real) < 0.001); + assert_se(fabs(d - v.real) < 0.001); } else if (t == JSON_INTEGER) { intmax_t i; |