Skip to content

Commit

Permalink
mark the large number modulo tests as TODO on 32-bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
zmughal committed Apr 9, 2015
1 parent babaa0e commit 4f8b4b8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions t/ops.t
Expand Up @@ -162,13 +162,17 @@ ok all(ushort($a) % ushort($b)==ushort($c)), 'ushort modulus';
$INT_MAX=2147483647;

TODO: {
local $TODO = undef;
$TODO = 'These tests have failed since <=2.007' if $^O eq 'MSWin32';
ok long($INT_MAX)%1 == 0, 'big long modulus';
cmp_ok indx($INT_MAX*4)%2, '==', 0, 'big indx modulus';
ok longlong($INT_MAX*4)%2 == 0, 'big longlong modulus';
#skip float intentionally here, since float($INT_MAX)!=$INT_MAX
cmp_ok double($INT_MAX*4)%2, '==', 0, 'big double modulus';
local $TODO = undef;
require Config; Config->import;
# mark the tests on MSWin32 or 32-bit systems as TODO
$TODO = 'These tests have failed since <=2.007' if $^O eq 'MSWin32' or $Config{ivsize} == 4;
diag "\$Config{ivsize} = $Config{ivsize}";

cmp_ok long($INT_MAX)%1 , '==', 0, "big long modulus: $INT_MAX % 1";
cmp_ok indx($INT_MAX*4)%2 , '==', 0, "big indx modulus: @{[$INT_MAX*4]} % 2";
cmp_ok longlong($INT_MAX*4)%2, '==', 0, "big longlong modulus: @{[$INT_MAX*4]} % 2";
#skip float intentionally here, since float($INT_MAX)!=$INT_MAX
cmp_ok double($INT_MAX*4)%2 , '==', 0, "big double modulus: @{[$INT_MAX*4]} % 2";
}

#and do the same for byte (unsigned char) and ushort
Expand Down

0 comments on commit 4f8b4b8

Please sign in to comment.