diff options
author | Roland Rosenfeld <roland@debian.org> | 2023-04-05 16:25:36 +0200 |
---|---|---|
committer | Roland Rosenfeld <roland@debian.org> | 2023-04-05 16:25:36 +0200 |
commit | a39757d9d4d305bf3de3324ae74aaec90f68dc0e (patch) | |
tree | b9376bc560066ba15fde93d903744a941e1c8320 | |
parent | a26a7be1980a3bce042442cedaba3b784588f91f (diff) | |
parent | a94f511392239cb70beb2eef28e57ba792de2194 (diff) |
Update upstream source from tag 'upstream/1.6012'
Update to upstream version '1.6012'
with Debian dir af3e9bdb9df514d46a047e3a437b5bca0d9b88a9
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | META.json | 8 | ||||
-rw-r--r-- | META.yml | 6 | ||||
-rw-r--r-- | Makefile.PL | 2 | ||||
-rw-r--r-- | SIGNATURE | 30 | ||||
-rw-r--r-- | lib/Math/BigInt/GMP.pm | 2 | ||||
-rw-r--r-- | t/01load.t | 11 | ||||
-rw-r--r-- | t/mbimbf.t | 71 | ||||
-rw-r--r-- | xt/author/lib-arithmetic-binary-_modinv.t | 13 |
9 files changed, 105 insertions, 42 deletions
@@ -1,3 +1,7 @@ +1.6012 2023-04-03 + + * Sync test files with Math-BigInt. + 1.6011 2022-05-17 * Sync test files with Math-BigInt. @@ -4,7 +4,7 @@ "Peter John Acklam <pjacklam@gmail.com>" ], "dynamic_config" : 1, - "generated_by" : "ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 2.150010", + "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], @@ -31,7 +31,7 @@ "runtime" : { "requires" : { "Carp" : "1.22", - "Math::BigInt" : "1.999831", + "Math::BigInt" : "1.999838", "XSLoader" : "0.02", "perl" : "5.008" } @@ -50,6 +50,6 @@ "web" : "https://github.com/pjacklam/p5-Math-BigInt-GMP" } }, - "version" : "1.6011", - "x_serialization_backend" : "JSON::PP version 4.08" + "version" : "1.6012", + "x_serialization_backend" : "JSON::PP version 4.16" } @@ -7,7 +7,7 @@ build_requires: configure_requires: ExtUtils::MakeMaker: '6.58' dynamic_config: 1 -generated_by: 'ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 2.150010' +generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html @@ -19,10 +19,10 @@ no_index: - inc requires: Carp: '1.22' - Math::BigInt: '1.999831' + Math::BigInt: '1.999838' XSLoader: '0.02' perl: '5.008' resources: repository: https://github.com/pjacklam/p5-Math-BigInt-GMP.git -version: '1.6011' +version: '1.6012' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff --git a/Makefile.PL b/Makefile.PL index dd7fd09..011167e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -36,7 +36,7 @@ WriteMakefile # A hash of modules that are needed to run the module. 'PREREQ_PM' => { - 'Math::BigInt' => 1.999831, + 'Math::BigInt' => 1.999838, 'Carp' => 1.22, 'XSLoader' => 0.02, }, @@ -15,15 +15,15 @@ not run its Makefile.PL or Build.PL. Hash: RIPEMD160 SHA256 b173bc6027df00777c94cc36850ef64f7b2affeb8ec85593fee91eff5ce4a899 BUGS -SHA256 edf03f70b3e984b4e6e71045630a8682e090cfb0d0a6c1e3e8f7b3938d7b66de CHANGES +SHA256 acaa3263863eb170a3ca4d4054ce5d27b503be1832823af528e8e2d244649a0c CHANGES SHA256 15123cad594aefe6f9f78a0b637ba685991f36865f561686d57c61b13eca1ae0 CREDITS SHA256 7ddda45c10ba55b6713c512b418d706278b1e260e94008d599b2709cbfa166d0 GMP.xs SHA256 b857edab549ac6893e2df5e1ec768ee46b62bcf1607a55e876f4d23f079eacce LICENSE SHA256 283a887525057e82bc986996c36c5aef1919f12e46fbb14f192295b6800fafdc MANIFEST SHA256 cea319b25473049674f5cc8c9bfa5b90f0b78383d4af657b8cf4bdd9ea4dd40c MANIFEST.SKIP -SHA256 fc823668d5c529f8b217e73a0fa2000db33e3d4d71b7c4cc989ad699b9d1d8cf META.json -SHA256 0a1f99f7ed75be475edd65dc76fe0d5d873722223d309f5f1aadbc031ada3699 META.yml -SHA256 e8592004f459312c7a6f2715482533bda5c57a950008c7f6931dbb012ab11017 Makefile.PL +SHA256 e24a8dfeef64344b4f107a5ab8d7cea92438eb0642ce24f75bc25b29a7126450 META.json +SHA256 86482d141fe4345c2c80a00453b6c382382a6c49a023ebc00032528d306d5f32 META.yml +SHA256 918743db3c7dfcce0384bc351dbd705f0dc831bf7054196ea0202f39d5f2414a Makefile.PL SHA256 29860c37d5c1b8260c51206c28b7580ae6b03df165e2ec266db5d2f373a8a80e README SHA256 cc43859594b7bd2e14bb5ada4c8a01c437010283d4fddd92d86191d109010f78 README.md SHA256 672c89aacd483edd14cbe5ee7db5dfa2991addad05f0d920d2424dfe507592f0 TODO @@ -31,9 +31,9 @@ SHA256 ceed5e08784e849958f8aa74c536c008ad89cdce1612571ee38321293fc91250 build/RE SHA256 9850d025676d6bd49c4703ae2091f95266cf457a5b033f457b9cf073f6a2c33f build/leak.pl SHA256 fbe60701f97bf64e468ebaae5fb4805409a61fa71793133d14909e0b9733e9fc build/leaktest SHA256 7ac0dbf02aa5f9fffd64599358320f60388e95de64f9ae7a6d718cf224a0b433 inc/Devel/CheckLib.pm -SHA256 c43ddedfeb13c0d7c2f1958639ecc53789502bd33d9a4943bdd15244cc1dd178 lib/Math/BigInt/GMP.pm +SHA256 aa9eabf6ec786113f0fc40d7bbb048489583b4f0babb669f6975cd6e648b3e72 lib/Math/BigInt/GMP.pm SHA256 f855e68d0f171debf8369ead8b36d004188f1c9069287a0d3c67a87f9afb1312 t/00sig.t -SHA256 774a5b7aa7e0da4d3fd19849dad45e3519406447732c3ad3441a48508739ed33 t/01load.t +SHA256 02d11ba7425bc433a45b924752fcd7c3fb0840e78df7dc4c5b1eb572cc571873 t/01load.t SHA256 9567333ab26747265ddf9bbcda1d6a672b71c6e85eb2cad3021ba7d2f96eb1c1 t/Math/BigInt/Lib/TestUtil.pm SHA256 b5f6aacf13dc567671170a4086a03c43143af31b3596542e521464c5db19bba1 t/bigfltpm.inc SHA256 ba90ef638a3c5cd2be536e53144c37687d49c213bf3e0945c966012a6395fbf7 t/bigfltpm.t @@ -45,7 +45,7 @@ SHA256 b8af8e548686d7132b27fad6f115a1b5c7b938260351a0a8233a4c6d6d824c99 t/bigroo SHA256 d918b6df34003214403c8dc86f7da70700ad29af8a8e9dc53540dc1e83b41351 t/mbi-from-big-scalar.t SHA256 1cb05e56f537b9e4020e64e5d679d84af8cb8c6f1dd30cd0bef2080626d23959 t/mbi_rand.t SHA256 38b8514632ee9b9190862914678406bd4861c2b808d2eb4f3333d509066a74a8 t/mbimbf.inc -SHA256 3cdfdd022b39ff8464a85038cf3cef1dd9707ef4f9a1d56fdfab223886521926 t/mbimbf.t +SHA256 de43ca888cbc4ab7b9f32f941fcff2ce4fe1d0a1d4559277d4f46aef3bebf3b2 t/mbimbf.t SHA256 bf013505c2786529e733c6b86b8a2b82c2bb9fba72a2d74c469b8fa41baa0dd1 t/storable.t SHA256 c5da85d3c88dc2e8aa40e2cced0c564428d7dc3e0bb17498b080a0853a461cdb t/threads.t SHA256 6ae0f9e1d213c4ebcb27e2e6dbba8cf2b8ea955c0067f024efb43aa0488effeb t/version.t @@ -62,7 +62,7 @@ SHA256 06df077590afb265890c0e6479dfd3559182ac4389e818c74663adacf11d8c82 xt/autho SHA256 4cb097b928c88e95b49fc76198dd75c2b909cae0ca2b5f6abedf33ad07a90bbc xt/author/lib-arithmetic-binary-_mod.dat SHA256 0161a89d6df264535241d5bd7568677e1c8ae60b23ca09f9707c1831cbada139 xt/author/lib-arithmetic-binary-_mod.t SHA256 9ce9460416424ec2965fddebb4ebccebf0e8b0a59d3997075a7ff80a5566456f xt/author/lib-arithmetic-binary-_modinv.dat -SHA256 cec0a619a88850626b02eaa1cff77d52446cb7667828e5986c3d884f0de51eb6 xt/author/lib-arithmetic-binary-_modinv.t +SHA256 66b6eaf20fe3464cb880b4192032ac3a82ddb50aa207a025d321528ed1320bf2 xt/author/lib-arithmetic-binary-_modinv.t SHA256 75354f125320b70e19247ded923d12e48bd9db02598602bbfa9f24ff5fe629e5 xt/author/lib-arithmetic-binary-_mul.dat SHA256 089bcba994a3a1781ce1f3e7320e723f8c0a727ce979c4e4c4ddf3792832a23f xt/author/lib-arithmetic-binary-_mul.t SHA256 c6902a2bb76ff6107dbb943595fe7deca9b26ce3cb37ea19b7436414a6e40053 xt/author/lib-arithmetic-binary-_nok.dat @@ -176,11 +176,11 @@ SHA256 334ef06155ec886e4592639219b0227e330d969019a9ac25e0c633e4be1b38f3 xt/relea SHA256 79e228dfe3193c0f2b5f9afaa6677062ef33ac9c9578e0e6c5a627696c319982 xt/release/version.t -----BEGIN PGP SIGNATURE----- -iQEcBAEBAwAGBQJig6sKAAoJEGcmPl2fr166LHUH/A0lO6EeffyerILXzgmhXjGK -8GM990EKmbhswVC2J1mggcP3ulDas1e44NAvgLcwTAmoMT8ZVxpBbNvpxDZkFUxl -CfcWWaHBBBFzWA+XkwAriNv05XZBuYknRVkndvjx4hMIpI1vt5npoMtO6/UJGNHA -5pDe1mGGQ2kXiWsrutZEwlW5HjY3Ay9yHsZfPym20NWMo5YH9K+rPwKrj33lMJt6 -VTMzkTdERetyllyICVbhws+VNAIDMDtxp2We3Vdfx8cGkMGgEsAmbYWfGynaWaEU -IiNFPuu3g7wxR99phPMfwMFTelOZYL5BfQ/xNd8NGHjBAswB7UEILu/39xLDrYg= -=5CGK +iQEcBAEBAwAGBQJkKq8+AAoJEGcmPl2fr166PZ4IAK+8GD+dGMtDWIgbKiLQ798/ +hU8YRmeZWDdwdjwgyfE3ZOgbbWX+PkQ08FAYy6wJGUExszGRartOIL0zvWm0y+Ri +cDeLbKxNOhlnAxAzY44glaE5TtWh8RpaP+e0WKROgmxOeLVjs9DC5r+XhlzDqCnP +B7XInVOLdP80g0QZRss6G1oB9qV6FX5/4PhnnF0qscdjsrNSJoslrM36UXy68CEP +S2Rm1cqM8c80fhn7OxWIlj1807BLEk+csw6+Vrn8+AI1ombDRXP0UAxb5PH0R2mr +gGdjOYFIujBFZfaoDq5V20nutTu1A3fesNCRwf84xBDZf7IgtDHimCHLuaGLov8= +=9I7H -----END PGP SIGNATURE----- diff --git a/lib/Math/BigInt/GMP.pm b/lib/Math/BigInt/GMP.pm index 63b707c..2bb31f7 100644 --- a/lib/Math/BigInt/GMP.pm +++ b/lib/Math/BigInt/GMP.pm @@ -8,7 +8,7 @@ use Math::BigInt::Lib 1.999801; our @ISA = qw< Math::BigInt::Lib >; -our $VERSION = '1.6011'; +our $VERSION = '1.6012'; use XSLoader; XSLoader::load "Math::BigInt::GMP", $VERSION; @@ -1,7 +1,7 @@ # -*- mode: perl; -*- -use strict; # restrict unsafe constructs -use warnings; # enable optional warnings +use strict; +use warnings; use Test::More tests => 2; @@ -10,8 +10,11 @@ BEGIN { use_ok('Math::BigInt'); # Math::BigInt is required for the tests }; -my @mods = ('Math::BigInt::GMP', - 'Math::BigInt'); +my @mods = ( + 'Math::BigInt', + 'Math::BigInt::Lib', + 'Math::BigInt::GMP', + ); diag(""); diag("Testing with Perl $], $^X"); @@ -7,7 +7,7 @@ use strict; use warnings; use Test::More tests => 712 # tests in require'd file - + 26; # tests in this file + + 52; # tests in this file use Math::BigInt only => 'GMP'; use Math::BigFloat; @@ -58,24 +58,71 @@ foreach my $class (qw/Math::BigInt Math::BigFloat/) { } foreach my $class (qw/Math::BigInt Math::BigFloat/) { - $class->accuracy(42); + my $x; - # $x gets A of 42, too! - my $x = $class->new(123); + # Accuracy - # really? - is($x->accuracy(), 42, '$x has A of 42'); + # set and check the class accuracy + $class->accuracy(1); + is($class->accuracy(), 1, "$class has A of 1"); - # $x has no A, but the global is still in effect for $x so the return value - # of that operation should be 42, not undef - is($x->accuracy(undef), 42, '$x has A from global'); + # a new instance gets the class accuracy + $x = $class->new(123); + is($x->accuracy(), 1, '$x has A of 1'); - # so $x should still have A = 42 - is($x->accuracy(), 42, '$x has still A of 42'); + # set and check the instance accuracy + $x->accuracy(2); + is($x->accuracy(), 2, '$x has A of 2'); - # reset for further tests + # change the class accuracy + $class->accuracy(3); + is($class->accuracy(), 3, "$class has A of 3"); + + # verify that the instance accuracy hasn't changed + is($x->accuracy(), 2, '$x still has A of 2'); + + # change the instance accuracy + $x->accuracy(undef); + is($x->accuracy(), undef, '$x now has A of undef'); + + # check the class accuracy + is($class->accuracy(), 3, "$class still has A of 3"); + + # change the class accuracy again $class->accuracy(undef); + is($class->accuracy(), undef, "$class now has A of undef"); + + # Precision + + # set and check the class precision + $class->precision(1); + is($class->precision(), 1, "$class has A of 1"); + + # a new instance gets the class precision + $x = $class->new(123); + is($x->precision(), 1, '$x has A of 1'); + + # set and check the instance precision + $x->precision(2); + is($x->precision(), 2, '$x has A of 2'); + + # change the class precision + $class->precision(3); + is($class->precision(), 3, "$class has A of 3"); + + # verify that the instance precision hasn't changed + is($x->precision(), 2, '$x still has A of 2'); + + # change the instance precision + $x->precision(undef); + is($x->precision(), undef, '$x now has A of undef'); + + # check the class precision + is($class->precision(), 3, "$class still has A of 3"); + + # change the class precision again $class->precision(undef); + is($class->precision(), undef, "$class now has A of undef"); } # bug with blog(Math::BigFloat, Math::BigInt) diff --git a/xt/author/lib-arithmetic-binary-_modinv.t b/xt/author/lib-arithmetic-binary-_modinv.t index 8a08e64..ed91505 100644 --- a/xt/author/lib-arithmetic-binary-_modinv.t +++ b/xt/author/lib-arithmetic-binary-_modinv.t @@ -81,8 +81,17 @@ for (my $i = 0 ; $i <= $#data ; ++ $i) { plan tests => 1; - cmp_ok(scalar @got, "==", 0, - "'$test' gives two output args"); + # The output should ideally be nothing, but some backend libraries + # return two undefs. + + subtest 'output when no inverse exists' => sub { + plan tests => 1 + @got; + ok(@got == 0 || @got == 2, + "'$test' gives zero or two output args"); + for my $got (@got) { + is($got, undef, "'$test' output arg is undef"); + } + } } else { |