projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
verify: new macro 'assume'
[gnulib.git]
/
tests
/
test-rint.c
diff --git
a/tests/test-rint.c
b/tests/test-rint.c
index
0a8a010
..
c9379c1
100644
(file)
--- a/
tests/test-rint.c
+++ b/
tests/test-rint.c
@@
-1,5
+1,5
@@
/* Test of rint() function.
/* Test of rint() function.
- Copyright (C) 2010-201
1
Free Software Foundation, Inc.
+ Copyright (C) 2010-201
3
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
@@
-32,6
+32,18
@@
SIGNATURE_CHECK (rint, double, (double));
#include "nan.h"
#include "macros.h"
#include "nan.h"
#include "macros.h"
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE double
+#define ISNAN isnand
+#define INFINITY Infinityd ()
+#define NAN NaNd ()
+#define L_(literal) literal
+#define RINT rint
+#define RANDOM randomd
+#include "test-rint.h"
+
int
main ()
{
int
main ()
{
@@
-75,11
+87,8
@@
main ()
ASSERT (rint (-65536.0) == -65536.0);
ASSERT (rint (-65536.001) == -65536.0);
ASSERT (rint (-2.341e31) == -2.341e31);
ASSERT (rint (-65536.0) == -65536.0);
ASSERT (rint (-65536.001) == -65536.0);
ASSERT (rint (-2.341e31) == -2.341e31);
- /* Infinite numbers. */
- ASSERT (rint (Infinityd ()) == Infinityd ());
- ASSERT (rint (- Infinityd ()) == - Infinityd ());
- /* NaNs. */
- ASSERT (isnand (rint (NaNd ())));
+
+ test_function ();
return 0;
}
return 0;
}