projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Correct name of POSIX.1-2001.
[gnulib.git]
/
tests
/
test-fabsf.c
diff --git
a/tests/test-fabsf.c
b/tests/test-fabsf.c
index
b78b801
..
ec28d5a
100644
(file)
--- a/
tests/test-fabsf.c
+++ b/
tests/test-fabsf.c
@@
-28,9
+28,12
@@
SIGNATURE_CHECK (fabsf, float, (float));
#include "macros.h"
#include "minus-zero.h"
#include "macros.h"
#include "minus-zero.h"
-volatile float x;
-float y;
-float zero = 0.0f;
+#define DOUBLE float
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define FABS fabsf
+#define RANDOM randomf
+#include "test-fabs.h"
int
main ()
int
main ()
@@
-45,16
+48,7
@@
main ()
y = fabsf (x);
ASSERT (y == 0.6f);
y = fabsf (x);
ASSERT (y == 0.6f);
- /* Signed zero. */
- x = 0.0f;
- y = fabsf (x);
- ASSERT (y == 0.0f);
- ASSERT (memcmp (&y, &zero, sizeof y) == 0);
-
- x = minus_zerof;
- y = fabsf (x);
- ASSERT (y == 0.0f);
- ASSERT (memcmp (&y, &zero, sizeof y) == 0);
+ test_function ();
return 0;
}
return 0;
}