Skip Menu |

This queue is for tickets about the Math-BaseCalc CPAN distribution.

Report information
The Basics
Id: 37362
Status: resolved
Priority: 0/
Queue: Math-BaseCalc

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.012
Fixed in: (no value)



Subject: Most 64bit systems fail the big integer test
t/01_basic_tests...... # Failed test 'hex (2**55 + 5) into hex then back' # at t/01_basic_tests.t line 69. # got: '36028797018963976' # expected: '3.6028797018964e+16' # Looks like you failed 1 test of 13. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/13 subtests
It's only the test script that's broken. This patch fixes the problem on the x86, x86-64, and ppc32 (G4) boxes I've tried. --- t/01_basic_tests.t.DIST 2008-06-26 17:01:17.000000000 -0400 +++ t/01_basic_tests.t 2008-11-18 03:00:51.000000000 -0500 @@ -66,7 +66,7 @@ my $r1 = $calc->to_base(2**55 + 5); my $result = $calc->from_base($calc->to_base(2**55 + 5)); #warn "res: $r1, $result"; - is($result, 2**55 + 5, "hex (2**55 + 5) into hex then back"); + is($result, int(2**55 + 5), "hex (2**55 + 5) into hex then back"); } { On Thu Jul 03 00:39:31 2008, ANDK wrote: Show quoted text
> t/01_basic_tests...... > # Failed test 'hex (2**55 + 5) into hex then back' > # at t/01_basic_tests.t line 69. > # got: '36028797018963976' > # expected: '3.6028797018964e+16' > # Looks like you failed 1 test of 13. > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/13 subtests >
Excellent, thanks for the fix. I've committed it to SVN. -Ken