Permalink
Browse files

test ranges of bigints and nums

  • Loading branch information...
1 parent 8d18a30 commit 53c3cd2249dfca51e37029ef7d95b1954ba54a71 @moritz moritz committed Feb 10, 2012
Showing with 15 additions and 1 deletion.
  1. +15 −1 S03-operators/range.t
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 118;
+plan 120;
# L<S03/Nonchaining binary precedence/Range object constructor>
@@ -244,4 +244,18 @@ is (1..6 Z 'a' .. 'c').join, '1a2b3c', 'Ranges and infix:<Z>';
"range doesn't leak Parrot types";
}
+{
+ my $big = 2 ** 130;
+ my $count = 0;
+ ++$count for $big .. $big + 2;
+ is $count, 3, 'can iterate over big Int range';
+}
+
+# RT #110350
+{
+ for 1e0 .. 1e0 {
+ isa_ok $_, Num, 'Range of nums produces a Num';
+ }
+}
+
# # vim: ft=perl6

0 comments on commit 53c3cd2

Please sign in to comment.