diff options
author | mike <mike@FreeBSD.org> | 2003-02-08 20:45:48 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2003-02-08 20:45:48 +0000 |
commit | d5b741d9d986620ea5efe8dd0007693173aec0a6 (patch) | |
tree | 651bae02eb6255435f43a064e2f33cf5e8086df6 /tools/regression/lib | |
parent | 1a1b8ed8d550526fdeab5db76b644d17c7efb98b (diff) | |
download | FreeBSD-src-d5b741d9d986620ea5efe8dd0007693173aec0a6.zip FreeBSD-src-d5b741d9d986620ea5efe8dd0007693173aec0a6.tar.gz |
Add more tests. Specifically, infinity cast from other types should
always be classified as infinity.
Diffstat (limited to 'tools/regression/lib')
-rw-r--r-- | tools/regression/lib/libc/gen/test-fpclassify.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/regression/lib/libc/gen/test-fpclassify.c b/tools/regression/lib/libc/gen/test-fpclassify.c index cb9046f..cf20c84 100644 --- a/tools/regression/lib/libc/gen/test-fpclassify.c +++ b/tools/regression/lib/libc/gen/test-fpclassify.c @@ -42,6 +42,8 @@ main(void) assert(fpclassify(0x1.2p-150f) == FP_SUBNORMAL); #endif assert(fpclassify(HUGE_VALF) == FP_INFINITE); + assert(fpclassify((float)HUGE_VAL) == FP_INFINITE); + assert(fpclassify((float)HUGE_VALL) == FP_INFINITE); assert(fpclassify(NAN) == FP_NAN); assert(fpclassify((double)0) == FP_ZERO); @@ -52,6 +54,8 @@ main(void) assert(fpclassify(0x1.2p-1075) == FP_SUBNORMAL); #endif assert(fpclassify(HUGE_VAL) == FP_INFINITE); + assert(fpclassify((double)HUGE_VALF) == FP_INFINITE); + assert(fpclassify((double)HUGE_VALL) == FP_INFINITE); assert(fpclassify((double)NAN) == FP_NAN); assert(fpclassify((long double)0) == FP_ZERO); @@ -62,6 +66,8 @@ main(void) assert(fpclassify(0x1.2p-16383L) == FP_SUBNORMAL); #endif assert(fpclassify(HUGE_VALL) == FP_INFINITE); + assert(fpclassify((long double)HUGE_VALF) == FP_INFINITE); + assert(fpclassify((long double)HUGE_VAL) == FP_INFINITE); assert(fpclassify((long double)NAN) == FP_NAN); printf("PASS fpclassify()\n"); |