summaryrefslogtreecommitdiff
path: root/t/op/infnan.t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-08-26 18:48:45 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-08-26 19:43:22 -0400
commit0ec38c0a463b7ea7bfa74c296c06ea3ad4d1df12 (patch)
tree0735ba073ad9bb4b411ff8b3173e58cc87c25072 /t/op/infnan.t
parent540a63d621d3b475009c86e37344c9bf88c22222 (diff)
downloadperl-0ec38c0a463b7ea7bfa74c296c06ea3ad4d1df12.tar.gz
Detect false infinities.
Diffstat (limited to 't/op/infnan.t')
-rw-r--r--t/op/infnan.t10
1 files changed, 9 insertions, 1 deletions
diff --git a/t/op/infnan.t b/t/op/infnan.t
index 41ec84a38e..5ef8f24e1b 100644
--- a/t/op/infnan.t
+++ b/t/op/infnan.t
@@ -24,7 +24,7 @@ my @NaN = ("NAN", "nan", "qnan", "SNAN", "NanQ", "NANS",
my @fmt = qw(e f g a d x c p);
-my $inf_tests = 11 + @fmt + 3 * @PInf + 3 * @NInf + 5;
+my $inf_tests = 11 + @fmt + 3 * @PInf + 3 * @NInf + 5 + 3;
my $nan_tests = 7 + @fmt + 2 * @NaN + 3;
my $infnan_tests = 4;
@@ -82,6 +82,14 @@ SKIP: {
is(9**9**9, $PInf, "9**9**9 is Inf");
}
+{
+ # Silence "isn't numeric in addition", that's kind of the point.
+ local $^W = 0;
+ for my $i (qw(Info Infiniti Infinityz)) {
+ cmp_ok("$i" + 0, '==', 0, "false infinity $i");
+ }
+}
+
SKIP: {
if ($NaN == 1) {
skip $nan_tests, "no nan found";