Mercurial > hg > octave-lojdl > gnulib-hg
diff tests/test-rintl.c @ 16563:446b5d1c7986
rint* tests: More tests.
* tests/test-rint.h: New file, partially extracted from
tests/test-rintl.c.
* tests/test-rint.c: Include test-rint.h.
(main): Invoke test_function.
* tests/test-rintf.c: Include test-rint.h.
(main): Invoke test_function.
* tests/test-rintl.c: Include test-rint.h.
(main): Invoke test_function.
* modules/rint-tests (Files): Add tests/test-rint.h, tests/randomd.c.
(Makefile.am): Add randomd.c to test_rint_SOURCES.
* modules/rintf-tests (Files): Add tests/test-rint.h, tests/randomf.c.
(Makefile.am): Add randomf.c to test_rintf_SOURCES.
* modules/rintl-tests (Files): Add tests/test-rint.h, tests/randoml.c.
(Makefile.am): Add randoml.c to test_rintl_SOURCES.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 03 Mar 2012 17:17:19 +0100 |
parents | 8250f2777afc |
children | c4a7dd5a1c2c |
line wrap: on
line diff
--- a/tests/test-rintl.c +++ b/tests/test-rintl.c @@ -33,6 +33,15 @@ #include "nan.h" #include "macros.h" +#define DOUBLE long double +#define ISNAN isnanl +#define INFINITY Infinityl () +#define NAN NaNl () +#define L_(literal) literal##L +#define RINT rintl +#define RANDOM randoml +#include "test-rint.h" + int main () { @@ -80,11 +89,8 @@ ASSERT (rintl (-65536.0L) == -65536.0L); ASSERT (rintl (-65536.001L) == -65536.0L); ASSERT (rintl (-2.341e31L) == -2.341e31L); - /* Infinite numbers. */ - ASSERT (rintl (Infinityl ()) == Infinityl ()); - ASSERT (rintl (- Infinityl ()) == - Infinityl ()); - /* NaNs. */ - ASSERT (isnanl (rintl (NaNl ()))); + + test_function (); return 0; }