projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
error: depend on stdio
[gnulib.git]
/
tests
/
test-isnand.h
diff --git
a/tests/test-isnand.h
b/tests/test-isnand.h
index
cf8cb5d
..
7ea72e9
100644
(file)
--- a/
tests/test-isnand.h
+++ b/
tests/test-isnand.h
@@
-1,5
+1,5
@@
/* Test of isnand() substitute.
/* Test of isnand() substitute.
- Copyright (C) 2007-20
08
Free Software Foundation, Inc.
+ Copyright (C) 2007-20
13
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-17,22
+17,11
@@
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
#include <limits.h>
/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
+#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
#include "nan.h"
-
-#define ASSERT(expr) \
- do \
- { \
- if (!(expr)) \
- { \
- fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
- fflush (stderr); \
- abort (); \
- } \
- } \
- while (0)
+#include "macros.h"
int
main ()
int
main ()
@@
-45,10
+34,10
@@
main ()
ASSERT (!isnand (-2.718e30));
ASSERT (!isnand (-2.718e-30));
ASSERT (!isnand (0.0));
ASSERT (!isnand (-2.718e30));
ASSERT (!isnand (-2.718e-30));
ASSERT (!isnand (0.0));
- ASSERT (!isnand (
-0.0
));
+ ASSERT (!isnand (
minus_zerod
));
/* Infinite values. */
/* Infinite values. */
- ASSERT (!isnand (
1.0 / 0.0
));
- ASSERT (!isnand (-
1.0 / 0.0
));
+ ASSERT (!isnand (
Infinityd ()
));
+ ASSERT (!isnand (-
Infinityd ()
));
/* Quiet NaN. */
ASSERT (isnand (NaNd ()));
#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
/* Quiet NaN. */
ASSERT (isnand (NaNd ()));
#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT