/* Test of rintf() function.
- Copyright (C) 2010-2012 Free Software Foundation, Inc.
+ Copyright (C) 2010-2014 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
#include "nan.h"
#include "macros.h"
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define RINT rintf
+#define RANDOM randomf
+#include "test-rint.h"
+
int
main ()
{
ASSERT (rintf (-65536.0f) == -65536.0f);
ASSERT (rintf (-65536.01f) == -65536.0f);
ASSERT (rintf (-2.341e31f) == -2.341e31f);
- /* Infinite numbers. */
- ASSERT (rintf (Infinityf ()) == Infinityf ());
- ASSERT (rintf (- Infinityf ()) == - Infinityf ());
- /* NaNs. */
- ASSERT (isnanf (rintf (NaNf ())));
+
+ test_function ();
return 0;
}