projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: add signature checks
[gnulib.git]
/
tests
/
test-truncl.c
diff --git
a/tests/test-truncl.c
b/tests/test-truncl.c
index
aad677d
..
3b36ea7
100644
(file)
--- a/
tests/test-truncl.c
+++ b/
tests/test-truncl.c
@@
-20,23
+20,27
@@
#include <math.h>
#include <math.h>
+#include "signature.h"
+SIGNATURE_CHECK (truncl, long double, (long double));
+
#include <float.h>
#include <stdio.h>
#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
#include <float.h>
#include <stdio.h>
#include <stdlib.h>
#include "fpucw.h"
#include "isnanl-nolibm.h"
+#include "nan.h"
#define ASSERT(expr) \
#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
+ do
\
+ {
\
+ if (!(expr))
\
+ {
\
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
+ fflush (stderr);
\
+ abort ();
\
+ }
\
+ }
\
while (0)
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
while (0)
/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
@@
-89,7
+93,7
@@
main ()
ASSERT (truncl (1.0L / 0.0L) == 1.0L / 0.0L);
ASSERT (truncl (-1.0L / 0.0L) == -1.0L / 0.0L);
/* NaNs. */
ASSERT (truncl (1.0L / 0.0L) == 1.0L / 0.0L);
ASSERT (truncl (-1.0L / 0.0L) == -1.0L / 0.0L);
/* NaNs. */
- ASSERT (isnanl (truncl (
0.0L / 0.0L
)));
+ ASSERT (isnanl (truncl (
NaNl ()
)));
return 0;
}
return 0;
}