Skip Menu |

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

Report information
The Basics
Id: 114008
Status: resolved
Priority: 0/
Queue: Math-BigRat

People
Owner: Nobody in particular
Requestors: devans [...] macports.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.260805



Subject: Math:BigRat test failures
Date: Tue, 26 Apr 2016 18:30:56 -0700
To: bug-Math-BigRat [...] rt.cpan.org
From: David Evans <devans [...] macports.org>
Building and testing Math::BigRat 0.260804 on MacPorts yields the following test errors. Last version to test properly was 0.260802. PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.22" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00sig.t ............. skipped: Set the environment variable TEST_SIGNATURE to enable this test. # # Testing with Perl 5.022001, /opt/local/bin/perl5.22 # # Version Module # ------- ------ # 0.260804 Math::BigRat # 1.9997 Math::BigInt # t/01load.t ............ ok t/02pod.t ............. skipped: Test::Pod 1.22 required for testing POD t/03podcov.t .......... skipped: Test::Pod::Coverage 1.08 required for testing POD coverage t/author-blog-mbr.t ... skipped: these tests are for testing by the author t/author-relop-mbr.t .. skipped: these tests are for testing by the author # Failed test 'Math::BigRat->new("12345678901234567890/2")' # at t/big_ap.t line 33. # got: '6150000000000000000' # expected: '6172839450617283945' # Failed test 'Math::BigRat->new("1234567890123456789E1")' # at t/big_ap.t line 36. # got: '12300000000000000000' # expected: '12345678901234567890' # Failed test 'Math::BigRat->new("12345678901234567890/1E0")' # at t/big_ap.t line 39. # got: '12300000000000000000' # expected: '12345678901234567890' # Failed test 'Math::BigRat->new("1234567890123456789e1/1")' # at t/big_ap.t line 42. # got: '12300000000000000000' # expected: '12345678901234567890' # Failed test 'Math::BigRat->new("1234567890123456789e1/1E0")' # at t/big_ap.t line 45. # got: '12300000000000000000' # expected: '12345678901234567890' # Failed test 'Math::BigRat->new("12345678901234567890")' # at t/big_ap.t line 51. # got: '12300000000000000000' # expected: '12345678901234567890' # Failed test at t/big_ap.t line 61. # got: '6150000000000000000' # expected: '6172839450617283945' # Failed test at t/big_ap.t line 71. # got: '6170000000000000000' # expected: '6172839450617283945' # Failed test at t/big_ap.t line 74. # got: '12300000000000000000' # expected: '12345678901234567890' # Failed test at t/big_ap.t line 80. # got: '12300000000000000000' # expected: '12345678901234567890' # Failed test at t/big_ap.t line 90. # got: '6150000000000000000' # expected: '6172839450617283945' # Failed test at t/big_ap.t line 100. # got: '6170000000000000000' # expected: '6172839450617283945' # Failed test at t/big_ap.t line 105. # got: '12340000000000000000' # expected: '12345678901234567890' # Looks like you failed 13 tests of 17. t/big_ap.t ............ Dubious, test returned 13 (wstat 3328, 0xd00) Failed 13/17 subtests t/bigfltrt.t .......... ok t/biglog.t ............ ok Can't use an undefined value as a SCALAR reference at /opt/local/lib/perl5/5.22/Math/BigFloat.pm line 194. # Looks like you planned 202 tests but ran 20. # Looks like your test exited with 255 just after 20. t/bigrat.t ............ Dubious, test returned 255 (wstat 65280, 0xff00) Failed 182/202 subtests # Failed test '$x = Math::BigRat->new("+InFiNiTy"); $x;' # at t/bigratpm.inc line 139. # got: 'NaN' # expected: 'inf' # Failed test '$x = Math::BigRat->new("+infinity"); $x->is_inf("");' # at t/bigratpm.inc line 139. # got: '0' # expected: '1' # Failed test '$x = Math::BigRat->new("-infinity"); $x->is_inf("");' # at t/bigratpm.inc line 139. # got: '0' # expected: '1' # Looks like you failed 3 tests of 703. t/bigratpm.t .......... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/703 subtests t/bigratup.t .......... ok t/bigroot.t ........... ok t/bitwise.t ........... ok t/hang.t .............. ok t/requirer.t .......... ok t/trap.t .............. ok Test Summary Report ------------------- t/big_ap.t (Wstat: 3328 Tests: 17 Failed: 13) Failed tests: 1-5, 7-10, 12-15 Non-zero exit status: 13 t/bigrat.t (Wstat: 65280 Tests: 20 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 202 tests but ran 20. t/bigratpm.t (Wstat: 768 Tests: 703 Failed: 3) Failed tests: 150, 441-442 Non-zero exit status: 3 Files=17, Tests=3414, 4 wallclock secs ( 0.38 usr 0.08 sys + 3.35 cusr 0.18 csys = 3.99 CPU) Result: FAIL Failed 3/17 test programs. 16/3414 subtests failed. make: *** [test_dynamic] Error 255
The short answer is that Math::BigRat v0.260804 requires Math::BigInt v1.999718. That dependency is described in Makefile.PL of Math-BigRat v0.260804, which contains the line requires 'Math::BigInt' => 1.999718; and when I run that Makefile.PL with Math-BigInt v1.9997 I get a line saying Warning: prerequisite Math::BigInt 1.999718 not found. We have 1.9997. If you didn't see that line, I suspect there is something wrong with your toolchain. In any case, I am not sure if this is a bug in Math::BigRat, since the dependency is stated in Makefile.PL. FWIW, I have experienced something similar myself when building Math::MPC. Math::MPC requires Math::MPFR, but when I run Makefile.PL for Math::MPC, then line mentioning the dependency on Math::MPFR doesn't always appear. I have only experienced this when my toolchain is not up to date, but I haven't (yet) tracked down the exact cause.
Subject: Re: [rt.cpan.org #114008] Math:BigRat test failures
Date: Wed, 27 Apr 2016 00:45:20 -0700
To: bug-Math-BigRat [...] rt.cpan.org
From: David Evans <devans [...] macports.org>
On 4/26/16 11:51 PM, Peter John Acklam via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=114008 > > > The short answer is that Math::BigRat v0.260804 requires Math::BigInt v1.999718. > > That dependency is described in Makefile.PL of Math-BigRat v0.260804, which > contains the line > > requires 'Math::BigInt' => 1.999718; > > and when I run that Makefile.PL with Math-BigInt v1.9997 I get a line saying > > Warning: prerequisite Math::BigInt 1.999718 not found. We have 1.9997. > > If you didn't see that line, I suspect there is something wrong with your > toolchain. In any case, I am not sure if this is a bug in Math::BigRat, > since the dependency is stated in Makefile.PL. > > FWIW, I have experienced something similar myself when building Math::MPC. > Math::MPC requires Math::MPFR, but when I run Makefile.PL for Math::MPC, > then line mentioning the dependency on Math::MPFR doesn't always appear. > I have only experienced this when my toolchain is not up to date, but I > haven't (yet) tracked down the exact cause. >
Nevermind. I guess I wasn't paying attention. Yes, I now see the warning line and, after installing latest Math::BigInt 1.999722, the tests run as they should. Thanks for your patience. PERL_DL_NONLAZY=1 "/opt/local/bin/perl5.22" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/00sig.t ............. skipped: Set the environment variable TEST_SIGNATURE to enable this test. # # Testing with Perl 5.022001, /opt/local/bin/perl5.22 # # Version Module # ------- ------ # 0.260804 Math::BigRat # 1.999722 Math::BigInt # t/01load.t ............ ok t/02pod.t ............. skipped: Test::Pod 1.22 required for testing POD t/03podcov.t .......... skipped: Test::Pod::Coverage 1.08 required for testing POD coverage t/author-blog-mbr.t ... skipped: these tests are for testing by the author t/author-relop-mbr.t .. skipped: these tests are for testing by the author t/big_ap.t ............ ok t/bigfltrt.t .......... ok t/biglog.t ............ ok t/bigrat.t ............ ok t/bigratpm.t .......... ok t/bigratup.t .......... ok t/bigroot.t ........... ok t/bitwise.t ........... ok t/hang.t .............. ok t/requirer.t .......... ok t/trap.t .............. ok All tests successful. Files=17, Tests=3596, 3 wallclock secs ( 0.40 usr 0.08 sys + 3.15 cusr 0.17 csys = 3.80 CPU) Result: PASS
Math::BigRat now declares a dependency on the most recent compatible version of Math::BigFloat, both in Makefile.PL and in Math/BigRat.pm: use Math::BigFloat '1.999718';