X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-ldexpf.c;h=e8094820b4c15b31972c5ca08fbc1377072afa83;hb=c9451e3bdc651a742f06b46a450497e59bb5e006;hp=12fc4d22f896dec669557c2389b918b19e104853;hpb=9b3b16cb188cfbd0b4db7a833877665c05f258cd;p=gnulib.git
diff --git a/tests/test-ldexpf.c b/tests/test-ldexpf.c
index 12fc4d22f..e8094820b 100644
--- a/tests/test-ldexpf.c
+++ b/tests/test-ldexpf.c
@@ -1,5 +1,5 @@
/* Test of ldexpf() function.
- Copyright (C) 2010-2011 Free Software Foundation, Inc.
+ Copyright (C) 2007-2013 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
@@ -14,7 +14,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see . */
-/* Written by Bruno Haible , 2010. */
+/* Written by Bruno Haible , 2007, 2010. */
#include
@@ -23,26 +23,33 @@
#include "signature.h"
SIGNATURE_CHECK (ldexpf, float, (float, int));
+#include
+
+#include "isnanf-nolibm.h"
+#include "minus-zero.h"
+#include "infinity.h"
+#include "nan.h"
#include "macros.h"
-volatile float x;
-float y;
+#undef INFINITY
+#undef NAN
+
+#define DOUBLE float
+#define ISNAN isnanf
+#define INFINITY Infinityf ()
+#define NAN NaNf ()
+#define L_(literal) literal##f
+#define MINUS_ZERO minus_zerof
+#define MIN_EXP FLT_MIN_EXP
+#define MAX_EXP FLT_MAX_EXP
+#define LDEXP ldexpf
+#define RANDOM randomf
+#include "test-ldexp.h"
int
main ()
{
- /* A particular value. */
- x = 0.6f;
- y = ldexp (x, 0);
- ASSERT (y >= 0.59999999f && y <= 0.60000001f);
-
- x = 0.6f;
- y = ldexp (x, 1);
- ASSERT (y >= 1.1999999f && y <= 1.2000001f);
-
- x = 0.6f;
- y = ldexp (x, -1);
- ASSERT (y >= 0.29999999f && y <= 0.30000001f);
+ test_function ();
return 0;
}