maint: update all copyright year number ranges
[gnulib.git] / tests / test-fabs.c
index 4533441..6293d70 100644 (file)
@@ -1,5 +1,5 @@
 /* Test of fabs() function.
-   Copyright (C) 2010-2012 Free Software Foundation, Inc.
+   Copyright (C) 2010-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
@@ -28,9 +28,12 @@ SIGNATURE_CHECK (fabs, double, (double));
 #include "macros.h"
 #include "minus-zero.h"
 
-volatile double x;
-double y;
-double zero = 0.0;
+#define DOUBLE double
+#define L_(literal) literal
+#define MINUS_ZERO minus_zerod
+#define FABS fabs
+#define RANDOM randomd
+#include "test-fabs.h"
 
 int
 main ()
@@ -45,16 +48,7 @@ main ()
   y = fabs (x);
   ASSERT (y == 0.6);
 
-  /* Signed zero.  */
-  x = 0.0;
-  y = fabs (x);
-  ASSERT (y == 0.0);
-  ASSERT (memcmp (&y, &zero, sizeof y) == 0);
-
-  x = minus_zerod;
-  y = fabs (x);
-  ASSERT (y == 0.0);
-  ASSERT (memcmp (&y, &zero, sizeof y) == 0);
+  test_function ();
 
   return 0;
 }