summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDavid Schneider <david.schneider@bivab.de>2013-03-25 13:26:02 +0100
committerDavid Schneider <david.schneider@bivab.de>2013-03-28 16:37:58 +0100
commit2fbdb0f231cafdb77b025d3cd8afe90cda99b3ba (patch)
treeff1f7d1e589e500c6739cc02636e0798515c0bc6 /testsuite
parentede96e4eb660bbf3e0fe048135efa8106f48af5d (diff)
downloadlibffi-2fbdb0f231cafdb77b025d3cd8afe90cda99b3ba.tar.gz
use the absolute value to check the test result against an epsilon
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/libffi.call/many.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/libffi.call/many.c b/testsuite/libffi.call/many.c
index 4869ba9..67a367f 100644
--- a/testsuite/libffi.call/many.c
+++ b/testsuite/libffi.call/many.c
@@ -7,7 +7,9 @@
/* { dg-do run } */
#include "ffitest.h"
+#include <stdlib.h>
#include <float.h>
+#include <math.h>
static float many(float f1,
float f2,
@@ -62,7 +64,7 @@ int main (void)
fa[8], fa[9],
fa[10],fa[11],fa[12]);
- if (f - ff < FLT_EPSILON)
+ if (fabs(f - ff) < FLT_EPSILON)
exit(0);
else
abort();