projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Support for MSVC compiler: Avoid division by a literal 0.
[gnulib.git]
/
tests
/
test-roundf1.c
diff --git
a/tests/test-roundf1.c
b/tests/test-roundf1.c
index
2ccbe29
..
8413e82
100644
(file)
--- a/
tests/test-roundf1.c
+++ b/
tests/test-roundf1.c
@@
-27,6
+27,7
@@
SIGNATURE_CHECK (roundf, float, (float));
#include "isnanf-nolibm.h"
#include "minus-zero.h"
#include "isnanf-nolibm.h"
#include "minus-zero.h"
+#include "infinity.h"
#include "nan.h"
#include "macros.h"
#include "nan.h"
#include "macros.h"
@@
-63,8
+64,8
@@
main ()
ASSERT (roundf (-65536.01f) == -65536.0f);
ASSERT (roundf (-2.341e31f) == -2.341e31f);
/* Infinite numbers. */
ASSERT (roundf (-65536.01f) == -65536.0f);
ASSERT (roundf (-2.341e31f) == -2.341e31f);
/* Infinite numbers. */
- ASSERT (roundf (
1.0 / 0.0f) == 1.0 / 0.0f
);
- ASSERT (roundf (-
1.0 / 0.0f) == -1.0 / 0.0f
);
+ ASSERT (roundf (
Infinityf ()) == Infinityf ()
);
+ ASSERT (roundf (-
Infinityf ()) == - Infinityf ()
);
/* NaNs. */
ASSERT (isnanf (roundf (NaNf ())));
/* NaNs. */
ASSERT (isnanf (roundf (NaNf ())));