comparison tests/test-ldexpl.c @ 12496:a48d3d749ca5

Refactor common macros used in tests.
author Bruno Haible <bruno@clisp.org>
date Thu, 24 Dec 2009 21:01:42 +0100
parents 33ab12a7cea2
children c2cbabec01dd
comparison
equal deleted inserted replaced
12495:16a0ada3a101 12496:a48d3d749ca5
22 22
23 #include "signature.h" 23 #include "signature.h"
24 SIGNATURE_CHECK (ldexpl, long double, (long double, int)); 24 SIGNATURE_CHECK (ldexpl, long double, (long double, int));
25 25
26 #include <float.h> 26 #include <float.h>
27 #include <stdio.h>
28 #include <stdlib.h>
29 27
30 #include "fpucw.h" 28 #include "fpucw.h"
31 #include "isnanl-nolibm.h" 29 #include "isnanl-nolibm.h"
32 #include "nan.h" 30 #include "nan.h"
33 31 #include "macros.h"
34 #define ASSERT(expr) \
35 do \
36 { \
37 if (!(expr)) \
38 { \
39 fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
40 fflush (stderr); \
41 abort (); \
42 } \
43 } \
44 while (0)
45 32
46 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L. 33 /* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
47 So we use minus_zero instead. 34 So we use minus_zero instead.
48 IRIX cc can't put -0.0L into .data, but can compute at runtime. 35 IRIX cc can't put -0.0L into .data, but can compute at runtime.
49 Note that the expression -LDBL_MIN * LDBL_MIN does not work on other 36 Note that the expression -LDBL_MIN * LDBL_MIN does not work on other