summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2024-01-20 23:53:47 +0100
committergregor herrmann <gregoa@debian.org>2024-01-20 23:53:47 +0100
commitf30f175af280060cd9d1f43d6dd2db3a25ba8a29 (patch)
tree4e815ab405a98b1135e205bf0b32edbb5671056c
parent2287f8917c55972ed20d37b7da9a4c51570a0774 (diff)
parentc5cf8374906b59474086ce26cca18e5a665965f2 (diff)
New upstream version 1.7001
-rw-r--r--CHANGES4
-rw-r--r--META.json2
-rw-r--r--META.yml2
-rw-r--r--SIGNATURE30
-rw-r--r--lib/Math/BigInt/GMP.pm2
-rw-r--r--xt/author/lib-arithmetic-unary-_clog10.t46
-rw-r--r--xt/author/lib-arithmetic-unary-_clog2.t46
-rw-r--r--xt/author/lib-arithmetic-unary-_ilog10.t46
-rw-r--r--xt/author/lib-arithmetic-unary-_ilog2.t46
9 files changed, 202 insertions, 22 deletions
diff --git a/CHANGES b/CHANGES
index a24c82b..a5bc0d5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,7 @@
+1.7001 2024-01-06
+
+ * Sync test files with Math-BigInt.
+
1.7000 2023-12-29
* Add new methods _to_hex(), _to_bin(), _to_oct(), _lcm(), _dfac(), _nok(),
diff --git a/META.json b/META.json
index e8e7615..661331f 100644
--- a/META.json
+++ b/META.json
@@ -50,6 +50,6 @@
"web" : "https://github.com/pjacklam/p5-Math-BigInt-GMP"
}
},
- "version" : "1.7000",
+ "version" : "1.7001",
"x_serialization_backend" : "JSON::PP version 4.16"
}
diff --git a/META.yml b/META.yml
index 9166378..9ee3e30 100644
--- a/META.yml
+++ b/META.yml
@@ -24,5 +24,5 @@ requires:
perl: '5.008'
resources:
repository: https://github.com/pjacklam/p5-Math-BigInt-GMP.git
-version: '1.7000'
+version: '1.7001'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/SIGNATURE b/SIGNATURE
index 8c27bed..5ad549e 100644
--- a/SIGNATURE
+++ b/SIGNATURE
@@ -15,14 +15,14 @@ not run its Makefile.PL or Build.PL.
Hash: RIPEMD160
SHA256 b173bc6027df00777c94cc36850ef64f7b2affeb8ec85593fee91eff5ce4a899 BUGS
-SHA256 839e1d91ccf8a48fa2492c0a3f1cff3d0e2b18253a47eee25657ac7ff4f5ef14 CHANGES
+SHA256 79214b7536f6df6aacfc41f7339632eb5760e4274cc321b414430b8a6084f6b1 CHANGES
SHA256 15123cad594aefe6f9f78a0b637ba685991f36865f561686d57c61b13eca1ae0 CREDITS
SHA256 96d7f51723971acffc9ce42791cf1ce102aebf95d1796fb2aa2d4cd25c2f319c GMP.xs
SHA256 b857edab549ac6893e2df5e1ec768ee46b62bcf1607a55e876f4d23f079eacce LICENSE
SHA256 18db4d26e2a02c9580a516178098d1e4e20b96dcb6f4a020dcc36afad7cfc408 MANIFEST
SHA256 300af321df1f3305df4507151dc184906e1c846cbd9bedb0402c0e94564d79ca MANIFEST.SKIP
-SHA256 d661b35bca4e3bcd3a8b3c14a304be683bae14becca0ffa32f8dda0809fdd526 META.json
-SHA256 f4e301c9ce196a22a080c04dff49cedf182ed5312980f39939b7d7a3488ef074 META.yml
+SHA256 5bbb87ae006071ad2927a3ca0ba6d005e7f88190c89053e75a72eb59bcaab04e META.json
+SHA256 601b8dfd3d5c4b3ef0e64b47408afa4e13b5795a7ed45529271dcbe43d2a0e3e META.yml
SHA256 9422a37dcba85512ce508d7056be2dcf7be8bc6611389c5aa14f1f80904d2957 Makefile.PL
SHA256 29860c37d5c1b8260c51206c28b7580ae6b03df165e2ec266db5d2f373a8a80e README
SHA256 7f237bd49206aa66675265834a76013ad984ab5eb251f3a0e08909d864be8075 README.md
@@ -31,7 +31,7 @@ SHA256 ceed5e08784e849958f8aa74c536c008ad89cdce1612571ee38321293fc91250 build/RE
SHA256 9850d025676d6bd49c4703ae2091f95266cf457a5b033f457b9cf073f6a2c33f build/leak.pl
SHA256 fbe60701f97bf64e468ebaae5fb4805409a61fa71793133d14909e0b9733e9fc build/leaktest
SHA256 7ac0dbf02aa5f9fffd64599358320f60388e95de64f9ae7a6d718cf224a0b433 inc/Devel/CheckLib.pm
-SHA256 004cb8bb7774d01d01c7f1459883a9c0f73d984dd2597f5ee84295600eb321d5 lib/Math/BigInt/GMP.pm
+SHA256 20b3f71063989e19420e741c71abdb80a6e2827f20c6cbc1a899f207d7790c7b lib/Math/BigInt/GMP.pm
SHA256 f855e68d0f171debf8369ead8b36d004188f1c9069287a0d3c67a87f9afb1312 t/00sig.t
SHA256 02d11ba7425bc433a45b924752fcd7c3fb0840e78df7dc4c5b1eb572cc571873 t/01load.t
SHA256 9567333ab26747265ddf9bbcda1d6a672b71c6e85eb2cad3021ba7d2f96eb1c1 t/Math/BigInt/Lib/TestUtil.pm
@@ -80,8 +80,8 @@ SHA256 c5a53b0ec7c1b14b17c0e4bf41c315f0141ff21f7dbad7fd25dc7d3b579a764f xt/autho
SHA256 d8611619dab9fdc6d96c96405199000fdac98981d98a57abff92bec4ae09a5e1 xt/author/lib-arithmetic-ternary-_modpow.t
SHA256 5331d847542708905a63dd06446490f32cfe18d88718590292fc1ad69c0cb81d xt/author/lib-arithmetic-ternary-_rsft.dat
SHA256 33f5d3dc42033c732d91012e4c5d9562899f70e7f3f1c2e034668f161dd688d9 xt/author/lib-arithmetic-ternary-_rsft.t
-SHA256 d795c2d3e0f319ba16bca63d8802a13e0c9479c39660278887b24a566dae2d82 xt/author/lib-arithmetic-unary-_clog10.t
-SHA256 0334d44b065364453f60f181a760449ec1ee4b56e944100360373a17153e4e4c xt/author/lib-arithmetic-unary-_clog2.t
+SHA256 0d77de7a7ecff8ffd6ac9060b3ec12727d6bea8ca86132bcc1e76fe402af4297 xt/author/lib-arithmetic-unary-_clog10.t
+SHA256 c2ac74a41b7685d2eb61d6de5e6148acc34ec3b4adf36985f65c1120a1807375 xt/author/lib-arithmetic-unary-_clog2.t
SHA256 dbc1a33f78e6d0cfe4c8dfd31ab271adff848df77d53e6ec97f54bab56dde2ad xt/author/lib-arithmetic-unary-_dec.dat
SHA256 f5f920dd152f07178ebb084a6e80952b90c7711e747f436dfb7b31642c949907 xt/author/lib-arithmetic-unary-_dec.t
SHA256 1c34633b7790e445119757453c6e3697119552458bccb15ffc8873d4e218fc33 xt/author/lib-arithmetic-unary-_dfac.dat
@@ -90,8 +90,8 @@ SHA256 57f3186dd5b8925f3dcf49f721b622bd20f1b9c440e9947942993f8c51c1fd86 xt/autho
SHA256 f727848ea6674b21cea458fbc8b16a1eb083bcea28949c04fe4ae9fcdcf8484e xt/author/lib-arithmetic-unary-_fac.t
SHA256 c50db521aa2edb08964e8786efcf6aa32d8bbdea044c74d120662d1fb6622296 xt/author/lib-arithmetic-unary-_fib.dat
SHA256 b2f82fca9468eaecb8678f45c29909022b02a5f016e0426f35308d87bda1ac21 xt/author/lib-arithmetic-unary-_fib.t
-SHA256 8514037a4871d58c5fdfc5a96cb72f4f031f0aebde59dd7129538e6c72715751 xt/author/lib-arithmetic-unary-_ilog10.t
-SHA256 5c8062e4b3a7719db4f60cc59eef1ca968e7d31804f95078d9d537c2019f0184 xt/author/lib-arithmetic-unary-_ilog2.t
+SHA256 ded69272216c3aeb1ffc49f7a6f7a15decaec1a9b58b7a788b0308105607ad78 xt/author/lib-arithmetic-unary-_ilog10.t
+SHA256 d0fba9a97a8a6102e846ec49d5c5acbecd811ff759a6415734b91a91caa26105 xt/author/lib-arithmetic-unary-_ilog2.t
SHA256 80e1a9a614a37a16d007cf88be0683f6452d0a8e3aef4eb13fba6053dc439e77 xt/author/lib-arithmetic-unary-_inc.dat
SHA256 eace71a2c79601988d3ff32271c6832e07c1fd293e06260aebb4cf7893cdeae8 xt/author/lib-arithmetic-unary-_inc.t
SHA256 4ae236ecf145b651b5521a3539e00f0942dd48594717a5058b07986b9f7e2191 xt/author/lib-arithmetic-unary-_lucas.dat
@@ -180,11 +180,11 @@ SHA256 334ef06155ec886e4592639219b0227e330d969019a9ac25e0c633e4be1b38f3 xt/relea
SHA256 79e228dfe3193c0f2b5f9afaa6677062ef33ac9c9578e0e6c5a627696c319982 xt/release/version.t
-----BEGIN PGP SIGNATURE-----
-iQEcBAEBAwAGBQJljtBZAAoJEGcmPl2fr1669TQH/3juoU/0Do+r7grdgSafoHJp
-zZhn+iFMvHr1ic/WuJROJVH8eV8oG/+m1Q/Hti9iCbCUvHvgA0lFGfN+X3ZUjY2i
-W3yPp7esLjJZQ88Laj+kwVE1517wQpMYksVNxceyWm5smPC9CUxwA+DEd1h24ICw
-VfrLbgctwRTe1gt9IauONOJoQGdQ2fFixjVF5kRDpVo3/f0SkLMIcZ3nKv0GT3iK
-xScF9Qr8iDBdGJU1TWlKNZ2VyLC0ngkcbwizHyvv6i5kw271rxaYkZZoTyL2Eomw
-ns4ekYID+gytCY1WsT+AhXw3WbTg/WYPWBQNhyOwm/nn+HHSlDPT57Jf9oYPzno=
-=Adki
+iQEcBAEBAwAGBQJlmQxCAAoJEGcmPl2fr166oEkH/1lJKEzb1t43XXZioNM1ULt4
+4YSUM4/z3+bHDK9K99Y0VuE6+dXI4JQksg6Oj9H8bLXxQkH/u5YlRUhqRNZtwvVr
+YkbfQSIwJG0x0VZgj+Oxx+zKQjHSi7RqiDhX01fNaseXHvsExAQjFte0Eemgkfn2
+5JX3UORIAoriSzhHeT7q1wd/3fqv7Fs9aIhcfb/iyCkHl1tqyGViFzklqyaDj5FV
+34YIJGDkX6/C8uLRIx6YbuGQnKkKbSiX0kUxqRevhCYRFwHAxLJXv0MeVOQxAVOR
+7sOfJSWCLKocwvBEOyqJTIEnUnnnlrgHe9b1mTKJVNs0qy4KVF0KXnAan0HAYbo=
+=SfNt
-----END PGP SIGNATURE-----
diff --git a/lib/Math/BigInt/GMP.pm b/lib/Math/BigInt/GMP.pm
index 383a577..88745fd 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.7000';
+our $VERSION = '1.7001';
use XSLoader;
XSLoader::load "Math::BigInt::GMP", $VERSION;
diff --git a/xt/author/lib-arithmetic-unary-_clog10.t b/xt/author/lib-arithmetic-unary-_clog10.t
index 6ade891..bcb1657 100644
--- a/xt/author/lib-arithmetic-unary-_clog10.t
+++ b/xt/author/lib-arithmetic-unary-_clog10.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 2285;
+use Test::More tests => 4569;
###############################################################################
# Read and load configuration file and backend library.
@@ -85,6 +85,50 @@ for (my $y = 3 ; $y <= 50 ; $y++) {
push @data, [ $LIB -> _str($x_up), $y + 1, 0 ]; # clog10(10**$y + 1) = $y + 1
}
+# Scalar context.
+
+for (my $i = 0 ; $i <= $#data ; ++ $i) {
+ my ($in0, $out0) = @{ $data[$i] };
+
+ my ($x, $y, $got);
+
+ my $test = qq|\$x = $LIB->_new("$in0"); |
+ . qq|\$got = $LIB->_clog10(\$x);|;
+
+ diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING};
+
+ eval $test;
+ is($@, "", "'$test' gives emtpy \$\@");
+
+ subtest "_clog10() in scalar context: $test", sub {
+
+ unless (defined $out0) {
+ plan tests => 1;
+
+ is($got, $out0,
+ "'$test' output arg has the right value");
+ return;
+ }
+
+ plan tests => 5;
+
+ is(ref($got), $REF,
+ "'$test' output arg is a $REF");
+
+ is($LIB->_check($got), 0,
+ "'$test' output is valid");
+
+ is($LIB->_str($got), $out0,
+ "'$test' output arg has the right value");
+
+ is(ref($x), $REF,
+ "'$test' input arg is still a $REF");
+
+ ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0,
+ "'$test' input arg has the correct value");
+ };
+}
+
# List context.
for (my $i = 0 ; $i <= $#data ; ++ $i) {
diff --git a/xt/author/lib-arithmetic-unary-_clog2.t b/xt/author/lib-arithmetic-unary-_clog2.t
index 9888389..73e78b1 100644
--- a/xt/author/lib-arithmetic-unary-_clog2.t
+++ b/xt/author/lib-arithmetic-unary-_clog2.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 2591;
+use Test::More tests => 5181;
###############################################################################
# Read and load configuration file and backend library.
@@ -85,6 +85,50 @@ for (my $y = 10 ; $y <= 100 ; $y++) {
push @data, [ $LIB -> _str($x_up), $y + 1, 0 ]; # clog2(2**$y + 1) = $y + 1
}
+# Scalar context.
+
+for (my $i = 0 ; $i <= $#data ; ++ $i) {
+ my ($in0, $out0) = @{ $data[$i] };
+
+ my ($x, $y, $got);
+
+ my $test = qq|\$x = $LIB->_new("$in0"); |
+ . qq|\$got = $LIB->_clog2(\$x);|;
+
+ diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING};
+
+ eval $test;
+ is($@, "", "'$test' gives emtpy \$\@");
+
+ subtest "_clog2() in list context: $test", sub {
+
+ unless (defined $out0) {
+ plan tests => 1;
+
+ is($got, $out0,
+ "'$test' output arg has the right value");
+ return;
+ }
+
+ plan tests => 5;
+
+ is(ref($got), $REF,
+ "'$test' output arg is a $REF");
+
+ is($LIB->_check($got), 0,
+ "'$test' output is valid");
+
+ is($LIB->_str($got), $out0,
+ "'$test' output arg has the right value");
+
+ is(ref($x), $REF,
+ "'$test' input arg is still a $REF");
+
+ ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0,
+ "'$test' input arg has the correct value");
+ };
+}
+
# List context.
for (my $i = 0 ; $i <= $#data ; ++ $i) {
diff --git a/xt/author/lib-arithmetic-unary-_ilog10.t b/xt/author/lib-arithmetic-unary-_ilog10.t
index f9c049d..cacc2c7 100644
--- a/xt/author/lib-arithmetic-unary-_ilog10.t
+++ b/xt/author/lib-arithmetic-unary-_ilog10.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 2285;
+use Test::More tests => 4569;
###############################################################################
# Read and load configuration file and backend library.
@@ -85,6 +85,50 @@ for (my $y = 3 ; $y <= 50 ; $y++) {
push @data, [ $LIB -> _str($x_up), $y, 0 ]; # ilog10(10**$y + 1) = $y
}
+# Scalar context.
+
+for (my $i = 0 ; $i <= $#data ; ++ $i) {
+ my ($in0, $out0) = @{ $data[$i] };
+
+ my ($x, $y, $got);
+
+ my $test = qq|\$x = $LIB->_new("$in0"); |
+ . qq|\$got = $LIB->_ilog10(\$x);|;
+
+ diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING};
+
+ eval $test;
+ is($@, "", "'$test' gives emtpy \$\@");
+
+ subtest "_ilog10() in list context: $test", sub {
+
+ unless (defined $out0) {
+ plan tests => 1;
+
+ is($got, $out0,
+ "'$test' output arg has the right value");
+ return;
+ }
+
+ plan tests => 5;
+
+ is(ref($got), $REF,
+ "'$test' output arg is a $REF");
+
+ is($LIB->_check($got), 0,
+ "'$test' output is valid");
+
+ is($LIB->_str($got), $out0,
+ "'$test' output arg has the right value");
+
+ is(ref($x), $REF,
+ "'$test' input arg is still a $REF");
+
+ ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0,
+ "'$test' input arg has the correct value");
+ };
+}
+
# List context.
for (my $i = 0 ; $i <= $#data ; ++ $i) {
diff --git a/xt/author/lib-arithmetic-unary-_ilog2.t b/xt/author/lib-arithmetic-unary-_ilog2.t
index edb9644..56f30f3 100644
--- a/xt/author/lib-arithmetic-unary-_ilog2.t
+++ b/xt/author/lib-arithmetic-unary-_ilog2.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 2591;
+use Test::More tests => 5181;
###############################################################################
# Read and load configuration file and backend library.
@@ -85,6 +85,50 @@ for (my $y = 10 ; $y <= 100 ; $y++) {
push @data, [ $LIB -> _str($x_up), $y, 0 ]; # ilog2(2**$y + 1) = $y
}
+# Scalar context.
+
+for (my $i = 0 ; $i <= $#data ; ++ $i) {
+ my ($in0, $out0) = @{ $data[$i] };
+
+ my ($x, $y, $got);
+
+ my $test = qq|\$x = $LIB->_new("$in0"); |
+ . qq|\$got = $LIB->_ilog2(\$x);|;
+
+ diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING};
+
+ eval $test;
+ is($@, "", "'$test' gives emtpy \$\@");
+
+ subtest "_ilog2() in list context: $test", sub {
+
+ unless (defined $out0) {
+ plan tests => 1;
+
+ is($got, $out0,
+ "'$test' output arg has the right value");
+ return;
+ }
+
+ plan tests => 5;
+
+ is(ref($got), $REF,
+ "'$test' output arg is a $REF");
+
+ is($LIB->_check($got), 0,
+ "'$test' output is valid");
+
+ is($LIB->_str($got), $out0,
+ "'$test' output arg has the right value");
+
+ is(ref($x), $REF,
+ "'$test' input arg is still a $REF");
+
+ ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0,
+ "'$test' input arg has the correct value");
+ };
+}
+
# List context.
for (my $i = 0 ; $i <= $#data ; ++ $i) {