Skip to content

Commit

Permalink
[t/spec] unfudge overflow.t, all tests pass in rakudo if you have a b…
Browse files Browse the repository at this point in the history
…igint

library installed


git-svn-id: http://svn.pugscode.org/pugs@24208 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information
moritz committed Dec 8, 2008
1 parent 2bb550b commit 3d9d4c4
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions S03-operators/overflow.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,11 @@ fail anywhere.

my $a = 2147483647;
my $c=$a++;
#?rakudo todo 'detect integer overflow/underflow'
is($a, 2147483648, "var incremented after post-autoincrement");
is($c, 2147483647, "during post-autoincrement return value is not yet incremented");

$a = 2147483647;
$c=++$a;
#?rakudo 2 todo 'detect integer overflow/underflow'
is($a, 2147483648, "var incremented after pre-autoincrement");
is($c, 2147483648, "during pre-autoincrement return value is incremented");

Expand All @@ -35,13 +33,11 @@ is($a, 2147483648, 'simple assignment: $a = $a+1');

$a = -2147483648;
$c=$a--;
#?rakudo todo 'detect integer overflow/underflow'
is($a, -2147483649, "var decremented after post-autodecrement");
is($c, -2147483648, "during post-autodecrement return value is not yet decremented");

$a = -2147483648;
$c=--$a;
#?rakudo 2 todo 'detect integer overflow/underflow'
is($a, -2147483649, "var decremented after pre-autodecrement");
is($c, -2147483649, "during pre-autodecrement return value is decremented");

Expand All @@ -52,13 +48,11 @@ is($a, -2147483649, 'simple assignment: $a = $a-1');
$a = 2147483648;
$a = -$a;
$c=$a--;
#?rakudo todo 'detect integer overflow/underflow'
is($a, -2147483649, "post-decrement negative value");

$a = 2147483648;
$a = -$a;
$c=--$a;
#?rakudo todo 'detect integer overflow/underflow'
is($a, -2147483649, "pre-decrement negative value");

$a = 2147483648;
Expand All @@ -70,14 +64,12 @@ $a = 2147483648;
my $b = -$a;
$c=$b--;

#?rakudo todo 'detect integer overflow/underflow'
is($b, ((-$a)-1), "compare -- to -1 op with same origin var");
is($a, 2147483648, "make sure origin var remains unchanged");

$a = 2147483648;
$b = -$a;
$c=--$b;
#?rakudo todo 'detect integer overflow/underflow'
is($b, ((-$a)-1), "same thing with predecremenet");

$a = 2147483648;
Expand Down

0 comments on commit 3d9d4c4

Please sign in to comment.