X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=tests%2Ftest-fabsf.c;h=ec28d5aaf7c61e71944fb2c561b6325ec306768b;hb=200969d8ebed76c9b82837406a87cc767fafac1b;hp=b78b801cffa0dfc5f1ae4f27f967d174356fdb53;hpb=50d22400ccb7fb2104b697216a3f4ac0f1991f46;p=gnulib.git diff --git a/tests/test-fabsf.c b/tests/test-fabsf.c index b78b801cf..ec28d5aaf 100644 --- a/tests/test-fabsf.c +++ b/tests/test-fabsf.c @@ -28,9 +28,12 @@ SIGNATURE_CHECK (fabsf, float, (float)); #include "macros.h" #include "minus-zero.h" -volatile float x; -float y; -float zero = 0.0f; +#define DOUBLE float +#define L_(literal) literal##f +#define MINUS_ZERO minus_zerof +#define FABS fabsf +#define RANDOM randomf +#include "test-fabs.h" int main () @@ -45,16 +48,7 @@ main () y = fabsf (x); ASSERT (y == 0.6f); - /* Signed zero. */ - x = 0.0f; - y = fabsf (x); - ASSERT (y == 0.0f); - ASSERT (memcmp (&y, &zero, sizeof y) == 0); - - x = minus_zerof; - y = fabsf (x); - ASSERT (y == 0.0f); - ASSERT (memcmp (&y, &zero, sizeof y) == 0); + test_function (); return 0; }