diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-06-12 12:41:25 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-06-12 12:41:25 +0000 |
commit | 94f2c076692a5a4beaa9a85eb10dbe4d891acb1e (patch) | |
tree | 48e2f584064a6ed75bfa90cdb66d2d6ce71924c7 /math/bug-nexttoward.c | |
parent | e0e50a0a31ff04c325513ade44197f8ae8dd324b (diff) | |
download | glibc-94f2c076692a5a4beaa9a85eb10dbe4d891acb1e.tar glibc-94f2c076692a5a4beaa9a85eb10dbe4d891acb1e.tar.gz glibc-94f2c076692a5a4beaa9a85eb10dbe4d891acb1e.tar.bz2 glibc-94f2c076692a5a4beaa9a85eb10dbe4d891acb1e.zip |
Make more libm tests condition exceptions tests with math-tests.h.
Diffstat (limited to 'math/bug-nexttoward.c')
-rw-r--r-- | math/bug-nexttoward.c | 49 |
1 files changed, 25 insertions, 24 deletions
diff --git a/math/bug-nexttoward.c b/math/bug-nexttoward.c index cedb7767b6..c42bc35767 100644 --- a/math/bug-nexttoward.c +++ b/math/bug-nexttoward.c @@ -3,6 +3,7 @@ #include <float.h> #include <stdlib.h> #include <stdio.h> +#include <math-tests.h> #if !defined(FE_OVERFLOW) && !defined(FE_UNDERFLOW) /* If there's no support for the exceptions this test is checking, @@ -27,7 +28,7 @@ main (void) puts ("nexttowardf+ failed"); ++result; } - if (fetestexcept (FE_OVERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_OVERFLOW) == 0) { puts ("nexttowardf+ did not overflow"); ++result; @@ -38,7 +39,7 @@ main (void) puts ("nexttowardf- failed"); ++result; } - if (fetestexcept (FE_OVERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_OVERFLOW) == 0) { puts ("nexttowardf- did not overflow"); ++result; @@ -53,7 +54,7 @@ main (void) puts ("nexttowardf+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardf+ did not underflow"); ++result; @@ -66,7 +67,7 @@ main (void) puts ("nexttowardf- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardf- did not underflow"); ++result; @@ -79,7 +80,7 @@ main (void) puts ("nexttowardf+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardf+ did not underflow"); ++result; @@ -90,7 +91,7 @@ main (void) puts ("nexttowardf+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardf+ did not underflow"); ++result; @@ -102,7 +103,7 @@ main (void) puts ("nexttowardf- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardf- did not underflow"); ++result; @@ -113,7 +114,7 @@ main (void) puts ("nexttowardf- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (float) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardf- did not underflow"); ++result; @@ -128,7 +129,7 @@ main (void) puts ("nexttoward+ failed"); ++result; } - if (fetestexcept (FE_OVERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_OVERFLOW) == 0) { puts ("nexttoward+ did not overflow"); ++result; @@ -139,7 +140,7 @@ main (void) puts ("nexttoward- failed"); ++result; } - if (fetestexcept (FE_OVERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_OVERFLOW) == 0) { puts ("nexttoward- did not overflow"); ++result; @@ -154,7 +155,7 @@ main (void) puts ("nexttoward+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttoward+ did not underflow"); ++result; @@ -167,7 +168,7 @@ main (void) puts ("nexttoward- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttoward- did not underflow"); ++result; @@ -180,7 +181,7 @@ main (void) puts ("nexttoward+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttoward+ did not underflow"); ++result; @@ -191,7 +192,7 @@ main (void) puts ("nexttoward+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttoward+ did not underflow"); ++result; @@ -203,7 +204,7 @@ main (void) puts ("nexttoward- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttoward- did not underflow"); ++result; @@ -214,7 +215,7 @@ main (void) puts ("nexttoward- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttoward- did not underflow"); ++result; @@ -229,7 +230,7 @@ main (void) puts ("nexttowardl+ failed"); ++result; } - if (fetestexcept (FE_OVERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_OVERFLOW) == 0) { puts ("nexttowardl+ did not overflow"); ++result; @@ -240,7 +241,7 @@ main (void) puts ("nexttowardl failed"); ++result; } - if (fetestexcept (FE_OVERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_OVERFLOW) == 0) { puts ("nexttowardl- did not overflow"); ++result; @@ -255,7 +256,7 @@ main (void) puts ("nexttowardl+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardl+ did not underflow"); ++result; @@ -268,7 +269,7 @@ main (void) puts ("nexttowardl- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardl- did not underflow"); ++result; @@ -281,7 +282,7 @@ main (void) puts ("nexttowardl+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardl+ did not underflow"); ++result; @@ -292,7 +293,7 @@ main (void) puts ("nexttowardl+ failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardl+ did not underflow"); ++result; @@ -304,7 +305,7 @@ main (void) puts ("nexttowardl- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardl- did not underflow"); ++result; @@ -315,7 +316,7 @@ main (void) puts ("nexttowardl- failed"); ++result; } - if (fetestexcept (FE_UNDERFLOW) == 0) + if (EXCEPTION_TESTS (long double) && fetestexcept (FE_UNDERFLOW) == 0) { puts ("nexttowardl- did not underflow"); ++result; |