Skip to content

Commit

Permalink
Cover largish Int math on hex, bin, and octals
Browse files Browse the repository at this point in the history
Part of cover for R#2157 rakudo/rakudo#2157
  • Loading branch information
zoffixznet committed Aug 1, 2018
1 parent 1667fb4 commit e59fbd9
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions S32-num/int.t
Expand Up @@ -290,10 +290,16 @@ ok Int ~~ UInt, "accept undefined Int";

# https://github.com/rakudo/rakudo/issues/2157
subtest 'no funny business with Ints that are not representable in double' => {
plan 3;
is-deeply 9930972392403501+1, 9930972392403502;
is-deeply 9930972392403503+1, 9930972392403504;
is-deeply 9007199254740993+1, 9007199254740994;
plan 3*4;
is-deeply $_+1, 9930972392403502
for 9930972392403501, 0x23482ab1b9322d, 0o432202526156231055,
0b100011010010000010101010110001101110010011001000101101;
is-deeply $_+1, 9930972392403504
for 9930972392403503, 0x23482ab1b9322f, 0o432202526156231057,
0b100011010010000010101010110001101110010011001000101111;
is-deeply $_+1, 9007199254740994
for 9007199254740993, 0x20000000000001, 0o400000000000000001,
0b100000000000000000000000000000000000000000000000000001;
}

# vim: ft=perl6

0 comments on commit e59fbd9

Please sign in to comment.