summaryrefslogtreecommitdiff
path: root/ext/POSIX/t
diff options
context:
space:
mode:
authorAristotle Pagaltzis <pagaltzis@gmx.de>2015-05-07 15:35:20 +0200
committerAristotle Pagaltzis <pagaltzis@gmx.de>2015-05-07 15:35:20 +0200
commitfa17b3a66ad36c94bb6ad181a15f3fc64d7ee4ce (patch)
tree6fc328fe9d3f8363048cb19ac3efe8b9fcc549b6 /ext/POSIX/t
parent98ab3abf6b1bfe34ebb07896ebcdbedbe874e2ad (diff)
downloadperl-fa17b3a66ad36c94bb6ad181a15f3fc64d7ee4ce.tar.gz
POSIX/t/math.t: skip fpclassify where unsupported
Diffstat (limited to 'ext/POSIX/t')
-rw-r--r--ext/POSIX/t/math.t14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/POSIX/t/math.t b/ext/POSIX/t/math.t
index 6bdb1be052..20870e6942 100644
--- a/ext/POSIX/t/math.t
+++ b/ext/POSIX/t/math.t
@@ -54,6 +54,14 @@ between(0.76, tanh(1), 0.77, 'tanh(1)');
between(-0.77, tanh(-1), -0.76, 'tanh(-1)');
cmp_ok(tanh(1), '==', -tanh(-1), 'tanh(1) == -tanh(-1)');
+SKIP: {
+ skip "no fpclassify", 4 unless $Config{d_fpclassify};
+ is(fpclassify(1), FP_NORMAL, "fpclassify 1");
+ is(fpclassify(0), FP_ZERO, "fpclassify 0");
+ is(fpclassify(INFINITY), FP_INFINITE, "fpclassify INFINITY");
+ is(fpclassify(NAN), FP_NAN, "fpclassify NAN");
+}
+
sub near {
my ($got, $want, $msg, $eps) = @_;
$eps ||= 1e-6;
@@ -61,7 +69,7 @@ sub near {
}
SKIP: {
- my $C99_SKIP = 63;
+ my $C99_SKIP = 59;
unless ($Config{d_acosh}) {
skip "no acosh, suspecting no C99 math", $C99_SKIP;
@@ -84,10 +92,6 @@ SKIP: {
is(fdim(34, 12), 22, "fdim 34 12");
is(fmax(12, 34), 34, "fmax 12 34");
is(fmin(12, 34), 12, "fmin 12 34");
- is(fpclassify(1), FP_NORMAL, "fpclassify 1");
- is(fpclassify(0), FP_ZERO, "fpclassify 0");
- is(fpclassify(INFINITY), FP_INFINITE, "fpclassify INFINITY");
- is(fpclassify(NAN), FP_NAN, "fpclassify NAN");
is(hypot(3, 4), 5, "hypot 3 4");
near(hypot(-2, 1), sqrt(5), "hypot -1 2", 1e-9);
is(ilogb(255), 7, "ilogb 255");