bitrotate: Add 64-bit rotates.
[gnulib.git] / tests / test-truncl.c
index 8a97395..3ea856a 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of rounding towards zero.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008 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
       if (!(expr))                                                          \
         {                                                                   \
           fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+          fflush (stderr);                                                  \
           abort ();                                                         \
         }                                                                   \
     }                                                                       \
   while (0)
 
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0L.
+   So we use -zero instead.  */
+long double zero = 0.0L;
+
 int
 main ()
 {
@@ -46,7 +51,7 @@ main ()
 
   /* Zero.  */
   ASSERT (truncl (0.0L) == 0.0L);
-  ASSERT (truncl (-0.0L) == 0.0L);
+  ASSERT (truncl (-zero) == 0.0L);
   /* Positive numbers.  */
   ASSERT (truncl (0.3L) == 0.0L);
   ASSERT (truncl (0.7L) == 0.0L);