This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
415b66b
)
Test for nan range ends.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Mon, 12 Jan 2015 03:57:37 +0000
(22:57 -0500)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Mon, 12 Jan 2015 11:45:13 +0000
(06:45 -0500)
t/op/infnan.t
patch
|
blob
|
blame
|
history
diff --git
a/t/op/infnan.t
b/t/op/infnan.t
index
00087eb
..
bb03fd4
100644
(file)
--- a/
t/op/infnan.t
+++ b/
t/op/infnan.t
@@
-399,6
+399,14
@@
ok(!($NaN > $NInf), "NaN is not gt -Inf");
is(sin($PInf), $NaN, "sin(+Inf) is NaN");
+{
+ eval 'for my $x (0..$NaN) { last }';
+ like($@, qr/Range iterator outside integer range/, "0..NaN fails");
+
+ eval 'for my $x ($NaN..0) { last }';
+ like($@, qr/Range iterator outside integer range/, "NaN..0 fails");
+}
+
# === Overflows and Underflows ===
# 1e9999 (and 1e-9999) are large (and small) enough for even