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:
8d2f77d
)
Test for inf range ends.
author
Jarkko Hietaniemi
<jhi@iki.fi>
Mon, 12 Jan 2015 03:27:45 +0000
(22:27 -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
7627135
..
00087eb
100644
(file)
--- a/
t/op/infnan.t
+++ b/
t/op/infnan.t
@@
-248,6
+248,14
@@
SKIP: {
is("a" x $NInf, "", "x -Inf");
}
+{
+ eval 'for my $x (0..$PInf) { last }';
+ like($@, qr/Range iterator outside integer range/, "0..+Inf fails");
+
+ eval 'for my $x ($NInf..0) { last }';
+ like($@, qr/Range iterator outside integer range/, "-Inf..0 fails");
+}
+
# === NaN ===
cmp_ok($NaN, '!=', $NaN, "NaN is NaN numerically (by not being NaN)");