Projects
Mega:23.09
perl-Math-BigInt-FastCalc
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
_service:tar_scm:perl-Math-BigInt-FastCalc.spec
Changed
@@ -1,5 +1,5 @@ Name: perl-Math-BigInt-FastCalc -Version: 0.5014 +Version: 0.5018 Release: 1 Summary: Math::BigInt::Calc with some XS for more speed License: GPL+ or Artistic @@ -8,7 +8,7 @@ BuildRequires:perl-generators perl-interpreter perl-devel gcc BuildRequires:perl(ExtUtils::MakeMaker) >= 6.76 perl(Test::More) >= 0.88 -BuildRequires:perl(Math::BigInt) >= 1.999838 perl(Math::BigFloat) +BuildRequires:perl(Math::BigInt) >= 2.0030.01 Requires: perl(:MODULE_COMPAT_%(perl -V:version | cut -d"'" -f 2)) Conflicts: perl < 4:5.22.0-348 @@ -27,6 +27,15 @@ %description help Man page and other related documents for %{name}. +%package tests +Summary: Tests for %{name} +Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} +Requires: perl-Test-Harness +Requires: perl(Math::BigInt) >= 2.0030.01 + +%description tests +Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". + %prep %autosetup -n Math-BigInt-FastCalc-%{version} -p1 @@ -38,6 +47,16 @@ %make_install %{_fixperms} -c %{buildroot} +# Install tests +mkdir -p %{buildroot}%{_libexecdir}/%{name} +cp -a t %{buildroot}%{_libexecdir}/%{name} +rm %{buildroot}%{_libexecdir}/%{name}/t/00sig.t +cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF' +#!/bin/sh +cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)" +EOF +chmod +x %{buildroot}%{_libexecdir}/%{name}/test + %check unset AUTHOR_TESTING RELEASE_TESTING make test @@ -61,7 +80,13 @@ %doc CHANGES TODO %{_mandir}/*/* +%files tests +%{_libexecdir}/%{name} + %changelog +* Fri Jan 19 2024 wangjiang <wangjiang37@h-partners.com> - 0.5018-1 +- upgrade version to 0.5018 + * Fri Jul 28 2023 wangjiang <wangjiang37@h-partners.com> - 0.5014-1 - upgrade version to 0.5014
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="url">git@gitee.com:src-openeuler/perl-Math-BigInt-FastCalc.git</param> <param name="scm">git</param> - <param name="revision">openEuler-23.09</param> + <param name="revision">master</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/CHANGES -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/CHANGES
Changed
@@ -1,3 +1,23 @@ +0.5018 2024-01-06 + + * Sync test files with Math-BigInt. + +0.5017 2024-01-04 + + * Update required version of Math-BigInt. + + * Sync test files with Math-BigInt. + +0.5016 2023-12-27 + + * Sync test files with Math-BigInt. + +0.5015 2023-09-20 + + * Sync test files with Math-BigInt. + + * Remove obsolete link to cpanratings.org. + 0.5014 2023-04-03 * Sync test files with Math-BigInt.
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/MANIFEST -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/MANIFEST
Changed
@@ -62,6 +62,8 @@ xt/author/lib-arithmetic-ternary-_modpow.t xt/author/lib-arithmetic-ternary-_rsft.dat xt/author/lib-arithmetic-ternary-_rsft.t +xt/author/lib-arithmetic-unary-_clog10.t +xt/author/lib-arithmetic-unary-_clog2.t xt/author/lib-arithmetic-unary-_dec.dat xt/author/lib-arithmetic-unary-_dec.t xt/author/lib-arithmetic-unary-_dfac.dat @@ -70,6 +72,8 @@ xt/author/lib-arithmetic-unary-_fac.t xt/author/lib-arithmetic-unary-_fib.dat xt/author/lib-arithmetic-unary-_fib.t +xt/author/lib-arithmetic-unary-_ilog10.t +xt/author/lib-arithmetic-unary-_ilog2.t xt/author/lib-arithmetic-unary-_inc.dat xt/author/lib-arithmetic-unary-_inc.t xt/author/lib-arithmetic-unary-_lucas.dat
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/MANIFEST.SKIP -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/MANIFEST.SKIP
Changed
@@ -1,4 +1,4 @@ -# Start included MANIFEST.SKIP template from ExtUtils::Manifest 1.73 +# Start included MANIFEST.SKIP template from ExtUtils::Manifest 1.75 # Avoid version control files. \bRCS\b @@ -11,6 +11,8 @@ \B\.gitignore\b \b_darcs\b \B\.cvsignore$ +\B\.bzr\b +\B\.bzrignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ @@ -48,6 +50,7 @@ \.# \.rej$ \..*\.sw.?$ +\.~\d+~$ # Avoid OS-specific files/dirs # Mac OSX metadata @@ -76,7 +79,7 @@ # Avoid AppVeyor file ^\.?appveyor.yml -# End included /usr/local/share/perl5/site_perl/5.32/ExtUtils/MANIFEST.SKIP +# End included /usr/local/lib/perl5/ExtUtils/MANIFEST.SKIP # Avoid more git stuff. \B\.gitattributes\b @@ -107,6 +110,9 @@ \.lrz$ \.lzh$ +# Avoid development stuff. +^dev(el)?/ + # Avoid distribution-specific stuff. ^Math-BigInt-FastCalc-0-9
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/META.json -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/META.json
Changed
@@ -31,7 +31,7 @@ "runtime" : { "requires" : { "Carp" : "1.22", - "Math::BigInt" : "1.999838", + "Math::BigInt" : "2.003001", "XSLoader" : "0", "perl" : "5.006001" } @@ -50,6 +50,6 @@ "web" : "https://github.com/pjacklam/p5-Math-BigInt-FastCalc" } }, - "version" : "0.5014", + "version" : "0.5018", "x_serialization_backend" : "JSON::PP version 4.16" }
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/META.yml -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/META.yml
Changed
@@ -19,10 +19,10 @@ - inc requires: Carp: '1.22' - Math::BigInt: '1.999838' + Math::BigInt: '2.003001' XSLoader: '0' perl: '5.006001' resources: repository: https://github.com/pjacklam/p5-Math-BigInt-FastCalc.git -version: '0.5014' +version: '0.5018' x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/Makefile.PL -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/Makefile.PL
Changed
@@ -25,7 +25,7 @@ # A hash of modules that are needed to run the module. 'PREREQ_PM' => { - 'Math::BigInt' => 1.999838, + 'Math::BigInt' => 2.003001, 'Carp' => 1.22, 'XSLoader' => 0, },
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/README.md -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/README.md
Changed
@@ -89,10 +89,6 @@ http://matrix.cpantesters.org/?dist=Math-BigInt-FastCalc(http://matrix.cpantesters.org/?dist=Math-BigInt-FastCalc) -- CPAN Ratings - - https://cpanratings.perl.org/dist/Math-BigInt-FastCalc(https://cpanratings.perl.org/dist/Math-BigInt-FastCalc) - # LICENSE This program is free software; you may redistribute it and/or modify it under
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/SIGNATURE -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/SIGNATURE
Changed
@@ -14,17 +14,17 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: RIPEMD160 -SHA256 7df8bcd9fb7f1553d1ff2af36eca4a3505fbbb41508796acb809a8840949d429 CHANGES +SHA256 13a29bcc18344db3e8173942bb8daf3ad8c1802bd842b588c0b5777fc1b53846 CHANGES SHA256 75943d31f26d8417da884abe13a3563be16884d2ef9b1212df23fd617b85a9f0 CREDITS SHA256 0bd7a07ab76e4e9cb36e6e37d46e1e3c72d9314b7e185b2a819a4a91e5694ffc FastCalc.xs SHA256 b857edab549ac6893e2df5e1ec768ee46b62bcf1607a55e876f4d23f079eacce LICENSE -SHA256 a0943de907775f213c7a49fa96c549f55929c7235272207e2ac5929a87da6118 MANIFEST -SHA256 dac8b5ab4a7a25fd66a2b9d24dcd24f7746fc1b7654c1141103d8d2a42407325 MANIFEST.SKIP -SHA256 532984927822b53c56e9e3e4d8b80fefadfa1b9eab50551d62624f6ff75d2a4c META.json -SHA256 b443e4053ab864193518fab3fcc68e2d4a7a861524b177aa7e08e5be6669513a META.yml -SHA256 069f4cb541b05d35b22cd09769bc7b5df77b2e0f618646726597e68746855c8d Makefile.PL +SHA256 aa7f07c984f8183f0df0f1de270387322ed0e1fbfd0995894190d2a605f0018d MANIFEST +SHA256 6a11374341cfac3938014cbf01f337d8eeea5ceba35e7271e49ff31e6c63ba67 MANIFEST.SKIP +SHA256 7dd09ac11dafbc16ce056108532c48a40a0254d16db58f929c0c7026d03c7edf META.json +SHA256 5aabd5eafdbb881660a3692f23874de80e0821d24f973be147680c9ad8e4f791 META.yml +SHA256 0559acdc7836055af364a0bb9023ce7b0a08df8de5c120d8144529fe08093037 Makefile.PL SHA256 1cc2c0c3493097e1ad75c34c4f4b619b67f9204de4ba464b2b18a523aea5dc4a README -SHA256 2d6941b21a981cffa5ec5dfb656be728d8a23d7618af6cbe4a463e95ba135203 README.md +SHA256 0142606594352b326a34d0c1cc78d6047d693fa1588b0115bc2fa647a7c3d4c3 README.md SHA256 22831b087626e96a7f5703ec5cb4eba3712d10af8baf314424aeb6e449b2f605 TODO SHA256 098cb59ae489dd9ae831b78ddabf307f248429de2c252e130f48a5d86978fbb9 inc/Module/Install.pm SHA256 2898d3f318f35744a30e26099632a71692093c0c15d3d4d49a7287b445431d76 inc/Module/Install/Base.pm @@ -34,21 +34,21 @@ SHA256 7d3be1004b8b8b92d237e274d5776926b75e2f3c38081a49607239d528fdf014 inc/Module/Install/Metadata.pm SHA256 dad59bfbcfdda71aecb365213ba4e01c973d593a0dd5e09f7ae89300e0215bba inc/Module/Install/Win32.pm SHA256 2fc08f875f97772b3e362207078824fbefca8e397a77498fa3bb1381744796cf inc/Module/Install/WriteAll.pm -SHA256 a139015b52e73b467b52b4f924c744fe444f597200f11cd1d07180fdb1dd4b66 lib/Math/BigInt/FastCalc.pm +SHA256 31b5a4acbdccb88a34cf72c51bc4beba100d5574784297883c3d79c3a83ed99b lib/Math/BigInt/FastCalc.pm SHA256 f855e68d0f171debf8369ead8b36d004188f1c9069287a0d3c67a87f9afb1312 t/00sig.t SHA256 5fb0c8bd4fa865ecb97bf0585616b1e814980fa664fef1e06ea5db06d037097b t/01load.t SHA256 9567333ab26747265ddf9bbcda1d6a672b71c6e85eb2cad3021ba7d2f96eb1c1 t/Math/BigInt/Lib/TestUtil.pm -SHA256 b5f6aacf13dc567671170a4086a03c43143af31b3596542e521464c5db19bba1 t/bigfltpm.inc +SHA256 bc151bdde360ccc09f18dc925da5813e93ce94cbe91bdfbbbd7c5a66f7fae53f t/bigfltpm.inc SHA256 b26e932a876401829ef4d6aa4dda92518cb9082456437cb0f735f2ad3479ec0b t/bigfltpm.t SHA256 663cc57de5a68b55c00369848626d9c7485ef446a828fa15f6041be1400bcfaa t/bigintfc.t -SHA256 4a27c4823323437af76bce2b33e6147891bfb5d0e0bb9d3dbc5e70931bc62882 t/bigintpm.inc +SHA256 ec4f5506e6c979d197fca856d1f201275ceb1688a293f072604c3eccf3232177 t/bigintpm.inc SHA256 3768f40fbfb0389201f2af8688d9847534a5c222e8a2b10d10f0d11929326b85 t/bigintpm.t SHA256 b9a75fd76fd442cf563409f90a9c74e94517905a964f0ad3ea4ddd885f119faa t/biglog.t SHA256 a7e9da3a7157e29929b4fcd44fe68c8b8eefde426b7a4eb9912a5a8919e9c80a t/bigroot.t SHA256 f8e3dfa1c67aa3f2c65fa6be6e8e2d1d6e20ea2197b58c0225188c664b36642c t/bootstrap.t SHA256 803a71216096c0c615a66a0900d27ec20c368b2397df413bde62d30c5f9bb7e0 t/leak.t SHA256 0644242119983487817f8ae466f8a387d47df23430cd1b517049bf2061eea6ec t/mbi_rand.t -SHA256 38b8514632ee9b9190862914678406bd4861c2b808d2eb4f3333d509066a74a8 t/mbimbf.inc +SHA256 6c724a175f9bac281bce097499ce97e1cedab287bb659ae108d28567f8d202b1 t/mbimbf.inc SHA256 313f330de9045eb7bfd3dbbca5b39a6e70d359161be601da2f44773c69fe104b t/mbimbf.t SHA256 b0eca4959a7e5555737837211728b34450eb933205414eedbbfa5345abf17eea xt/author/lib-arithmetic-binary-_add.dat SHA256 da56a2a378404c7344d702200cf8c6eb04a901917106429f5f4aaf191c0b6011 xt/author/lib-arithmetic-binary-_add.t @@ -58,15 +58,15 @@ SHA256 cde7ef698c7af532276cf04738a2286ab3208d176ddf4b3a6ab57c0b0afc1749 xt/author/lib-arithmetic-binary-_gcd.t SHA256 9c2eeaac286c1ff867e8d1e13e303637df34bb79a4edb24c670a8a19cf924cdf xt/author/lib-arithmetic-binary-_lcm.dat SHA256 dd6fe19492251019c680e392388788d7c3893321526fe29f2dbc9914bec716ff xt/author/lib-arithmetic-binary-_lcm.t -SHA256 06df077590afb265890c0e6479dfd3559182ac4389e818c74663adacf11d8c82 xt/author/lib-arithmetic-binary-_log_int.t +SHA256 94c9bb1b1388390839e1011847a6075505f9f432bb8f26b3f74ba4d78665065a xt/author/lib-arithmetic-binary-_log_int.t 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 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 -SHA256 c14bcd15f4f4495f2165ee1260e5c9a2bf73c93fb93d0478071779c675167541 xt/author/lib-arithmetic-binary-_nok.t +SHA256 88552df391be5cf4ae5b9f22ed01f5948fbff6b2a1e22af659d549dd0ec58f38 xt/author/lib-arithmetic-binary-_nok.dat +SHA256 b0221866be427a357e29c2dfb608158fc45f3d86b45094017709eeaf8b0fa017 xt/author/lib-arithmetic-binary-_nok.t SHA256 453abc091d15e7ed908513643ff05ce03aa1b280d5f7aa6cbc213a833591710b xt/author/lib-arithmetic-binary-_pow.t SHA256 df5042489f114fec7922f57edf2dfccd51d09e8ed180458970336b18f07c3ea8 xt/author/lib-arithmetic-binary-_root.dat SHA256 4ff31cee26a8dcba5188e2ca8de26fc6ddd5dee86a5252bae408db4032537e61 xt/author/lib-arithmetic-binary-_root.t @@ -80,6 +80,8 @@ 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 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 @@ -87,11 +89,13 @@ SHA256 57f3186dd5b8925f3dcf49f721b622bd20f1b9c440e9947942993f8c51c1fd86 xt/author/lib-arithmetic-unary-_fac.dat SHA256 f727848ea6674b21cea458fbc8b16a1eb083bcea28949c04fe4ae9fcdcf8484e xt/author/lib-arithmetic-unary-_fac.t SHA256 c50db521aa2edb08964e8786efcf6aa32d8bbdea044c74d120662d1fb6622296 xt/author/lib-arithmetic-unary-_fib.dat -SHA256 a0dc4320993f47eda4f674e53d8c54bc88320b5dbbeefa0635cc1404b5510539 xt/author/lib-arithmetic-unary-_fib.t +SHA256 b2f82fca9468eaecb8678f45c29909022b02a5f016e0426f35308d87bda1ac21 xt/author/lib-arithmetic-unary-_fib.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 -SHA256 028904170cb4f5378d6f041b03c88072321df6506732919711bff98c6bae8943 xt/author/lib-arithmetic-unary-_lucas.t +SHA256 6a8f08c52d5e2ee6f3dce590e73c40b1fb94465df9417c727d829735ab7badad xt/author/lib-arithmetic-unary-_lucas.t SHA256 55b064926e20f6f504f2f83ead49cdb03d443980011b595cff6b85f32fa03703 xt/author/lib-arithmetic-unary-_sqrt.dat SHA256 cae4e76018ab9aa4e243b951107e5d899381a85e8eceb3170e134b0d9b805129 xt/author/lib-arithmetic-unary-_sqrt.t SHA256 7ee208bbac681fc3d5549767f43e31b71cee4024335f62368ebc1e1861c32f4c xt/author/lib-bitwise-_and.dat @@ -165,7 +169,7 @@ SHA256 a37a38d9b507b98f55a17efc4f2fd54e4c45e20ec2cb5067606a4501dd634494 xt/release/cpan-changes.t SHA256 befb07cbace153e844bd1aa24309e8136f0265cc97708bfb2f5f427964f7a88d xt/release/dist-manifest.t SHA256 dfba9c5f1e2b047a07c92747e523aceeab0d692a1bf655c2658386e45d9b4311 xt/release/distmeta.t -SHA256 fc6f9ed47fe31cadd15c83309921e5ec6680c09f8cbb7a24ba34b1c9db5b3272 xt/release/git.t +SHA256 2f6418e76023a02d013902d68fb5d7a957bb4ba09b6150b05a4baf2efcd73386 xt/release/git.t SHA256 48b9362ce2e88ef6a3dd81f820232165584d251861a27bde99ba6a707ea8e61c xt/release/kwalitee.t SHA256 c6f4a981a4c1990e5f524646375b7b219c29cba04869438e5463c096c808bf09 xt/release/minimum-version.t SHA256 f7e8bc80cdd4b191a3c628da5117e6831a685a1300213e8ca1bbbda14beb23d9 xt/release/pod-coverage.t @@ -176,11 +180,11 @@ SHA256 79e228dfe3193c0f2b5f9afaa6677062ef33ac9c9578e0e6c5a627696c319982 xt/release/version.t -----BEGIN PGP SIGNATURE----- -iQEcBAEBAwAGBQJkKqh8AAoJEGcmPl2fr166f8AH/3HmnUJnT288Hr6vE/grhW9Y -DQkGheSC97pnLLfLe2F5PgKGXHG7owp2mM5iZjDa3Ueim+Tcnb1SXEuIWvzraFwE -ouTgiCDp8ymJKyt9lWaReGQZbfd3+Y5aTcem32XBzQpbvqLNZMs4YzUKjtlvSq3e -VMck5gS7IiTeQBsxp5ECQfoGeoSdIRhPXgk0cbP8Z20ftaul1hKPSF40XY/zeocN -VfkkzV74d9jTovXdHg5VB2r8Hn9VcEvbUDYD4HCGlH1inGsjG6L3WEAdHXPvp9kr -SBa2QI89ezVBsgVONujSJfeCWgidEEGNwbouuyn5CpHvK6AQ4K9rEldHqRJedUg= -=aVKI +iQEcBAEBAwAGBQJlmQnkAAoJEGcmPl2fr1666N0H/jyNiICXBiDoc3J2L9y0Oc5N +IoUozdff9SBr+d3BGKp97dVcJplsLPfvIBa6QDN+M77IM2znK9t9zp6jzD+bG82y +skUvUd0UxHpMCzSgeH0a9Guz6dGANjuqfkji3aosV1M0Q+Lelb8YDTFlpHhAIlmo +JAI5VlaNU+6GaC8VHFCNhwY5j+613NDyuI3XGJm138YCuBt5DuJvf8eOYXaymFkU +mxWPgleVJt5n2IZWafJfbDSY/rtc2+hgUAQsGi+cCwv/IbKsxrMnJttmnNcL7vt0 +ODpWqbwF+vqvjaMXuqAp2Eer3M6qqTTBOGPDc3oWLRLBFDDsKKFOKqIVmA7Xpxo= +=bOxu -----END PGP SIGNATURE-----
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/lib/Math/BigInt/FastCalc.pm -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/lib/Math/BigInt/FastCalc.pm
Changed
@@ -12,7 +12,7 @@ our @ISA = qw< Math::BigInt::Calc >; } -our $VERSION = '0.5014'; +our $VERSION = '0.5018'; my $MAX_EXP_F; # the maximum possible base 10 exponent with "no integer" my $MAX_EXP_I; # the maximum possible base 10 exponent with "use integer" @@ -184,10 +184,6 @@ L<http://matrix.cpantesters.org/?dist=Math-BigInt-FastCalc> -=item CPAN Ratings - -L<https://cpanratings.perl.org/dist/Math-BigInt-FastCalc> - =back =head1 LICENSE
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/bigfltpm.inc -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/t/bigfltpm.inc
Changed
@@ -98,14 +98,14 @@ if (defined $args2) { $try .= qq| \$z = $CLASS->new("$args2");|; } - $try .= qq| $CLASS\::bgcd(\$x, \$y|; + $try .= qq| $CLASS->bgcd(\$x, \$y|; $try .= qq|, \$z| if defined $args2; $try .= qq|);|; } elsif ($f eq "blcm") { if (defined $args2) { $try .= qq| \$z = $CLASS->new("$args2");|; } - $try .= qq| $CLASS\::blcm(\$x, \$y|; + $try .= qq| $CLASS->blcm(\$x, \$y|; $try .= qq|, \$z| if defined $args2; $try .= qq|);|; } elsif ($f eq "bcmp") { @@ -228,23 +228,23 @@ $x = $CLASS->new(2); $x->bzero(); -is($x->{_a}, undef, qq|\$x = $CLASS->new(2); \$x->bzero(); \$x->{_a}|); -is($x->{_p}, undef, qq|\$x = $CLASS->new(2); \$x->bzero(); \$x->{_p}|); +is($x->{accuracy}, undef, qq|\$x = $CLASS->new(2); \$x->bzero(); \$x->{accuracy}|); +is($x->{precision}, undef, qq|\$x = $CLASS->new(2); \$x->bzero(); \$x->{precision}|); $x = $CLASS->new(2); $x->binf(); -is($x->{_a}, undef, qq|\$x = $CLASS->new(2); \$x->binf(); \$x->{_a}|); -is($x->{_p}, undef, qq|\$x = $CLASS->new(2); \$x->binf(); \$x->{_p}|); +is($x->{accuracy}, undef, qq|\$x = $CLASS->new(2); \$x->binf(); \$x->{accuracy}|); +is($x->{precision}, undef, qq|\$x = $CLASS->new(2); \$x->binf(); \$x->{precision}|); $x = $CLASS->new(2); $x->bone(); -is($x->{_a}, undef, qq|\$x = $CLASS->new(2); \$x->bone(); \$x->{_a}|); -is($x->{_p}, undef, qq|\$x = $CLASS->new(2); \$x->bone(); \$x->{_p}|); +is($x->{accuracy}, undef, qq|\$x = $CLASS->new(2); \$x->bone(); \$x->{accuracy}|); +is($x->{precision}, undef, qq|\$x = $CLASS->new(2); \$x->bone(); \$x->{precision}|); $x = $CLASS->new(2); $x->bnan(); -is($x->{_a}, undef, qq|\$x = $CLASS->new(2); \$x->bnan(); \$x->{_a}|); -is($x->{_p}, undef, qq|\$x = $CLASS->new(2); \$x->bnan(); \$x->{_p}|); +is($x->{accuracy}, undef, qq|\$x = $CLASS->new(2); \$x->bnan(); \$x->{accuracy}|); +is($x->{precision}, undef, qq|\$x = $CLASS->new(2); \$x->bnan(); \$x->{precision}|); ############################################################################### # bone/binf etc as plain calls (Lite failed them) @@ -466,17 +466,17 @@ # 2 * (2 ** int(18.2)); $x <<= $y; -is($x->copy()->bfround(-9), "602248.763144685", +is($x, 524288, qq|\$x = $CLASS->new("2"); \$y = $CLASS->new("18.2");| . - q| $x <<= $y; $x->copy()->bfround(-9);|); + q| $x <<= $y|); -# 2 * (2 ** 18.2) / (2 ** 18.2) => 2 +# 2 * (2 ** int(18.2)) / (2 ** int(18.2)) => 2 is($x >>= $y, 2, qq|\$x = $CLASS->new("2"); \$y = $CLASS->new("18.2");| . - q| $x <<= $y; $x->copy()->bfround(-9); $x >>= $y|); + q| $x <<= $y; $x >>= $y|); is($x, 2, qq|\$x = $CLASS->new("2"); \$y = $CLASS->new("18.2");| . - q| $x <<= $y; $x->copy()->bfround(-9); $x >>= $y; $x|); + q| $x <<= $y; $x >>= $y; $x|); __DATA__
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/bigintpm.inc -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/t/bigintpm.inc
Changed
@@ -137,14 +137,14 @@ if (defined $args2) { $try .= qq| \$z = $CLASS->new("$args2");|; } - $try .= " $CLASS\::bgcd(\$x, \$y"; + $try .= " $CLASS->bgcd(\$x, \$y"; $try .= ", \$z" if defined $args2; $try .= ");"; } elsif ($f eq "blcm") { if (defined $args2) { $try .= qq| \$z = $CLASS->new("$args2");|; } - $try .= " $CLASS\::blcm(\$x, \$y"; + $try .= " $CLASS->blcm(\$x, \$y"; $try .= ", \$z" if defined $args2; $try .= ");"; } elsif ($f eq "blsft") { @@ -1451,14 +1451,14 @@ +2:+2:8 +1:+32:4294967296 +1:+48:281474976710656 -+8:-2:NaN ++8:-2:2 # exercise base 10 +12345:4:10:123450000 -1234:0:10:-1234 +1234:0:10:1234 +2:2:10:200 +12:2:10:1200 -+1234:-3:10:NaN ++1234:-3:10:1 1234567890123:12:10:1234567890123000000000000 -3:1:2:-6 -5:1:2:-10 @@ -1470,14 +1470,14 @@ +8:+2:2 +4294967296:+32:1 +281474976710656:+48:1 -+2:-2:NaN ++2:-2:8 # exercise base 10 -1234:0:10:-1234 +1234:0:10:1234 +200:2:10:2 +1234:3:10:1 +1234:2:10:12 -+1234:-3:10:NaN ++1234:-3:10:1234000 310000:4:10:31 12300000:5:10:123 1230000000000:10:10:123
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/t/mbimbf.inc -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/t/mbimbf.inc
Changed
@@ -255,42 +255,42 @@ $x = $class->bzero(); $x->accuracy(5); - is($x->{_a}, 5, qq|\$x = $class->bzero(); \$x->accuracy(5); \$x->{_a}|); + is($x->{accuracy}, 5, qq|\$x = $class->bzero(); \$x->accuracy(5); \$x->{accuracy}|); $x = $class->bzero(); $x->precision(5); - is($x->{_p}, 5, qq|\$x = $class->bzero(); \$x->precision(5); \$x->{_p}|); + is($x->{precision}, 5, qq|\$x = $class->bzero(); \$x->precision(5); \$x->{precision}|); $x = $class->new(0); $x->accuracy(5); - is($x->{_a}, 5, qq|\$x = $class->new(0); \$x->accuracy(5); \$x->{_a}|); + is($x->{accuracy}, 5, qq|\$x = $class->new(0); \$x->accuracy(5); \$x->{accuracy}|); $x = $class->new(0); $x->precision(5); - is($x->{_p}, 5, qq|\$x = $class->new(0); \$x->precision(5); \$x->{_p}|); + is($x->{precision}, 5, qq|\$x = $class->new(0); \$x->precision(5); \$x->{precision}|); $x = $class->bzero(); $x->round(5); - is($x->{_a}, 5, qq|\$x = $class->bzero(); \$x->round(5); \$x->{_a}|); + is($x->{accuracy}, 5, qq|\$x = $class->bzero(); \$x->round(5); \$x->{accuracy}|); $x = $class->bzero(); $x->round(undef, 5); - is($x->{_p}, 5, qq|\$x = $class->bzero(); \$x->round(undef, 5); \$x->{_p}|); + is($x->{precision}, 5, qq|\$x = $class->bzero(); \$x->round(undef, 5); \$x->{precision}|); $x = $class->new(0); $x->round(5); - is($x->{_a}, 5, qq|\$x = $class->new(0); \$x->round(5); \$x->{_a}|); + is($x->{accuracy}, 5, qq|\$x = $class->new(0); \$x->round(5); \$x->{accuracy}|); $x = $class->new(0); $x->round(undef, 5); - is($x->{_p}, 5, qq|\$x = $class->new(0); \$x->round(undef, 5); \$x->{_p}|); + is($x->{precision}, 5, qq|\$x = $class->new(0); \$x->round(undef, 5); \$x->{precision}|); # see if trying to increasing A in bzero() doesn't do something $x = $class->bzero(); - $x->{_a} = 3; + $x->{accuracy} = 3; $x->round(5); - is($x->{_a}, 3, - qq|\$x = $class->bzero(); \$x->{_a} = 3; \$x->round(5); \$x->{_a}|); + is($x->{accuracy}, 3, + qq|\$x = $class->bzero(); \$x->{accuracy} = 3; \$x->round(5); \$x->{accuracy}|); } ############################################################################### @@ -349,8 +349,8 @@ $x = $mbf->new("123.456"); $y = $mbf->new("654.321"); -$x->{_a} = 5; # $x->accuracy(5) would round $x straight away -$y->{_a} = 4; # $y->accuracy(4) would round $x straight away +$x->{accuracy} = 5; # $x->accuracy(5) would round $x straight away +$y->{accuracy} = 4; # $y->accuracy(4) would round $x straight away $z = $x + $y; is($z, "777.8", q|$z = $x + $y|); @@ -373,20 +373,20 @@ #is($x, '123.456'); $z = $x->copy(); -$z->{_a} = 2; +$z->{accuracy} = 2; $z = $z / 2; is($z, 62, q|$z = $z / 2|); $x = $mbf->new(123456); -$x->{_a} = 4; +$x->{accuracy} = 4; $z = $x->copy; $z++; is($z, 123500, q|$z++|); $x = $mbi->new(123456); $y = $mbi->new(654321); -$x->{_a} = 5; # $x->accuracy(5) would round $x straight away -$y->{_a} = 4; # $y->accuracy(4) would round $x straight away +$x->{accuracy} = 5; # $x->accuracy(5) would round $x straight away +$y->{accuracy} = 4; # $y->accuracy(4) would round $x straight away $z = $x + $y; is($z, 777800, q|$z = $x + $y|); @@ -409,22 +409,22 @@ is($z, 123460, q|$z++|); $z = $x->copy(); -$z->{_a} = 2; +$z->{accuracy} = 2; $z = $z / 2; is($z, 62000, q|$z = $z / 2|); $x = $mbi->new(123400); -$x->{_a} = 4; +$x->{accuracy} = 4; is($x->bnot(), -123400, q|$x->bnot()|); # not -1234001 # to be consistent with other methods, babs() and bneg() also support rounding $x = $mbi->new(-123401); -$x->{_a} = 4; +$x->{accuracy} = 4; is($x->babs(), 123400, q|$x->babs()|); $x = $mbi->new(-123401); -$x->{_a} = 4; +$x->{accuracy} = 4; is($x->bneg(), 123400, q|$x->bneg()|); # test bdiv rounding to A and R (bug in v1.48 and maybe earlier versions) @@ -435,27 +435,27 @@ $x = $mbi->new('123456'); $y = $mbi->new('123456'); -$y->{_a} = 6; +$y->{accuracy} = 6; is($x->bdiv($y), 1, q|$x->bdiv($y)|); -is($x->{_a}, 6, q|$x->{_a}|); # carried over +is($x->{accuracy}, 6, q|$x->{accuracy}|); # carried over $x = $mbi->new('123456'); $y = $mbi->new('123456'); -$x->{_a} = 6; +$x->{accuracy} = 6; is($x->bdiv($y), 1, q|$x->bdiv($y)|); -is($x->{_a}, 6, q|$x->{_a}|); # carried over +is($x->{accuracy}, 6, q|$x->{accuracy}|); # carried over $x = $mbi->new('123456'); $y = $mbi->new('223456'); -$y->{_a} = 6; +$y->{accuracy} = 6; is($x->bdiv($y), 0, q|$x->bdiv($y)|); -is($x->{_a}, 6, q|$x->{_a}|); # carried over +is($x->{accuracy}, 6, q|$x->{accuracy}|); # carried over $x = $mbi->new('123456'); $y = $mbi->new('223456'); -$x->{_a} = 6; +$x->{accuracy} = 6; is($x->bdiv($y), 0, q|$x->bdiv($y)|); -is($x->{_a}, 6, q|$x->{_a}|); # carried over +is($x->{accuracy}, 6, q|$x->{accuracy}|); # carried over ############################################################################### # test that bop(0) does the same than bop(undef) @@ -466,7 +466,7 @@ is($x->copy->bsqrt(0), '35136.41828644462161665823116758077037159', q|$x->copy->bsqrt(...)|); -is($x->{_a}, undef, q|$x->{_a}|); +is($x->{accuracy}, undef, q|$x->{accuracy}|); # test that bsqrt() modifies $x and does not just return something else # (especially under Math::BigInt::BareCalc) @@ -622,19 +622,19 @@ } $x = $mbf->new(10); -$x->{_a} = 4; +$x->{accuracy} = 4; is($x->bdiv(3), '3.333', q|$x->bdiv(3)|); -is($x->{_a}, 4, q|$x->{_a}|); # set's it since no fallback +is($x->{accuracy}, 4, q|$x->{accuracy}|); # set's it since no fallback $x = $mbf->new(10); -$x->{_a} = 4; +$x->{accuracy} = 4; $y = $mbf->new(3); is($x->bdiv($y), '3.333', q|$x->bdiv($y)|); -is($x->{_a}, 4, q|$x->{_a}|); # set's it since no fallback +is($x->{accuracy}, 4, q|$x->{accuracy}|); # set's it since no fallback # rounding to P of x $x = $mbf->new(10); -$x->{_p} = -2; +$x->{precision} = -2; is($x->bdiv(3), '3.33', q|$x->bdiv(3)|); # round in div with requested P @@ -653,22 +653,22 @@ $x = $mbf->new(10); $y = $mbf->new(3); -$y->{_a} = 4; +$y->{accuracy} = 4; is($x->bdiv($y), '3.333', q|$x->bdiv($y) = '3.333'|); -is($x->{_a}, 4, q|$x->{_a} = 4|); -is($y->{_a}, 4, q|$y->{_a} = 4|); # set's it since no fallback -is($x->{_p}, undef, q|$x->{_p} = undef|); -is($y->{_p}, undef, q|$y->{_p} = undef|); +is($x->{accuracy}, 4, q|$x->{accuracy} = 4|); +is($y->{accuracy}, 4, q|$y->{accuracy} = 4|); # set's it since no fallback
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib-arithmetic-binary-_log_int.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-binary-_log_int.t
Changed
@@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 22023; +use Test::More tests => 27369; ############################################################################### # Read and load configuration file and backend library. @@ -52,18 +52,32 @@ # Small numbers. for (my $x = 0; $x <= 1000 ; ++ $x) { - for (my $y = 0; $y <= 10 ; ++ $y) { + for (my $b = 0; $b <= 10 ; ++ $b) { - if ($x == 0 || $y <= 1) { - push @data, $x, $y, undef, undef ; + if ($x == 0 || $b <= 1) { + push @data, $x, $b, undef, undef ; next; } - my $z = int(log($x) / log($y)); - $z++ while $y ** $z < $x; - $z-- while $y ** $z > $x; - my $status = $y ** $z == $x ? 1 : 0; - push @data, $x, $y, $z, $status ; + my $y = int(log($x) / log($b)); + $y++ while $b ** $y < $x; + $y-- while $b ** $y > $x; + my $status = $b ** $y == $x ? 1 : 0; + push @data, $x, $b, $y, $status ; + } +} + +# Larger numbers. + +for (my $b = 2 ; $b <= 100 ; $b++) { + my $bobj = $LIB -> _new($b); + for (my $y = 2 ; $y <= 10 ; $y++) { + my $x = $LIB -> _pow($LIB -> _copy($bobj), $LIB -> _new($y)); + my $x_up = $LIB -> _inc($LIB -> _copy($x)); + my $x_dn = $LIB -> _dec($LIB -> _copy($x)); + push @data, $LIB -> _str($x), $b, $y, 1 ; + push @data, $LIB -> _str($x_up), $b, $y, 0 ; + push @data, $LIB -> _str($x_dn), $b, $y - 1, 0 ; } }
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib-arithmetic-binary-_nok.dat -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-binary-_nok.dat
Changed
@@ -20902,41 +20902,42 @@ 200:199:200 200:200:1 + # binomial(2^31-2, k) for 0 <= k <= 5 -2147483648:0:1 -2147483648:1:2147483648 -2147483648:2:2305843008139952128 -2147483648:3:1650586716741330691367632896 -2147483648:4:886151994714063838812133581630996480 -2147483648:5:380599382949285310124181851059140756844314624 +2147483646:0:1 +2147483646:1:2147483646 +2147483646:2:2305843003844984835 +2147483646:3:1650586712129644681530179580 +2147483646:4:886151991412890412247001214725652485 +2147483646:5:380599381176981325647814314435493645862830074 # binomial(2^31-2, 2^31-2-k) for 0 <= k <= 5 -2147483648:2147483648:1 -2147483648:2147483647:2147483648 -2147483648:2147483646:2305843008139952128 -2147483648:2147483645:1650586716741330691367632896 -2147483648:2147483644:886151994714063838812133581630996480 -2147483648:2147483643:380599382949285310124181851059140756844314624 +2147483646:2147483646:1 +2147483646:2147483645:2147483646 +2147483646:2147483644:2305843003844984835 +2147483646:2147483643:1650586712129644681530179580 +2147483646:2147483642:886151991412890412247001214725652485 +2147483646:2147483641:380599381176981325647814314435493645862830074 # binomial(2^31-1, k) for 0 <= k <= 5 -2147483648:0:1 -2147483648:1:2147483648 -2147483648:2:2305843008139952128 -2147483648:3:1650586716741330691367632896 -2147483648:4:886151994714063838812133581630996480 -2147483648:5:380599382949285310124181851059140756844314624 +2147483647:0:1 +2147483647:1:2147483647 +2147483647:2:2305843005992468481 +2147483647:3:1650586714435487685375164415 +2147483647:4:886151993063477124376645896255832065 +2147483647:5:380599382063133317060704726682494860588482559 # binomial(2^31-1, 2^31-1-k) for 0 <= k <= 5 -2147483648:2147483648:1 -2147483648:2147483647:2147483648 -2147483648:2147483646:2305843008139952128 -2147483648:2147483645:1650586716741330691367632896 -2147483648:2147483644:886151994714063838812133581630996480 -2147483648:2147483643:380599382949285310124181851059140756844314624 +2147483647:2147483647:1 +2147483647:2147483646:2147483647 +2147483647:2147483645:2305843005992468481 +2147483647:2147483644:1650586714435487685375164415 +2147483647:2147483643:886151993063477124376645896255832065 +2147483647:2147483642:380599382063133317060704726682494860588482559 # binomial(2^31, k) for 0 <= k <= 5 @@ -20958,75 +20959,129 @@ # binomial(2^31+1, k) for 0 <= k <= 5 -2147483648:0:1 -2147483648:1:2147483648 -2147483648:2:2305843008139952128 -2147483648:3:1650586716741330691367632896 -2147483648:4:886151994714063838812133581630996480 -2147483648:5:380599382949285310124181851059140756844314624 +2147483649:0:1 +2147483649:1:2147483649 +2147483649:2:2305843010287435776 +2147483649:3:1650586719047173699507585024 +2147483649:4:886151996364650555553464272998629376 +2147483649:5:380599383835437304838245689871274338475311104 # binomial(2^31+1, 2^31+1-k) for 0 <= k <= 5 -2147483648:2147483648:1 -2147483648:2147483647:2147483648 -2147483648:2147483646:2305843008139952128 -2147483648:2147483645:1650586716741330691367632896 -2147483648:2147483644:886151994714063838812133581630996480 -2147483648:2147483643:380599382949285310124181851059140756844314624 +2147483649:2147483649:1 +2147483649:2147483648:2147483649 +2147483649:2147483647:2305843010287435776 +2147483649:2147483646:1650586719047173699507585024 +2147483649:2147483645:886151996364650555553464272998629376 +2147483649:2147483644:380599383835437304838245689871274338475311104 # binomial(2^31+2, k) for 0 <= k <= 5 -2147483648:0:1 -2147483648:1:2147483648 -2147483648:2:2305843008139952128 -2147483648:3:1650586716741330691367632896 -2147483648:4:886151994714063838812133581630996480 -2147483648:5:380599382949285310124181851059140756844314624 +2147483650:0:1 +2147483650:1:2147483650 +2147483650:2:2305843012434919425 +2147483650:3:1650586721353016709795020800 +2147483650:4:886151998015237274600637972506214400 +2147483650:5:380599384721589301202896245424738611473940480 # binomial(2^31+2, 2^31+2-k) for 0 <= k <= 5 -2147483648:2147483648:1 -2147483648:2147483647:2147483648 -2147483648:2147483646:2305843008139952128 -2147483648:2147483645:1650586716741330691367632896 -2147483648:2147483644:886151994714063838812133581630996480 -2147483648:2147483643:380599382949285310124181851059140756844314624 +2147483650:2147483650:1 +2147483650:2147483649:2147483650 +2147483650:2147483648:2305843012434919425 +2147483650:2147483647:1650586721353016709795020800 +2147483650:2147483646:886151998015237274600637972506214400 +2147483650:2147483645:380599384721589301202896245424738611473940480 + +# binomial(2^31+3, k) for 0 <= k <= 5 + +2147483651:0:1 +2147483651:1:2147483651 +2147483651:2:2305843014582403075 +2147483651:3:1650586723658859722229940225 +2147483651:4:886151999665823995953654682301235200 +2147483651:5:380599385607741299218133520025376583980154880 + +# binomial(2^31+3, 2^31+3-k) for 0 <= k <= 5 + +2147483651:2147483651:1 +2147483651:2147483650:2147483651 +2147483651:2147483649:2305843014582403075 +2147483651:2147483648:1650586723658859722229940225 +2147483651:2147483647:886151999665823995953654682301235200 +2147483651:2147483646:380599385607741299218133520025376583980154880 + +# binomial(2^31+4, k) for 0 <= k <= 5 + +2147483652:0:1 +2147483652:1:2147483652 +2147483652:2:2305843016729886726 +2147483652:3:1650586725964702736812343300 +2147483652:4:886152001316410719612514404531175425 +2147483652:5:380599386493893298883957515979031266281390080 + +# binomial(2^31+4, 2^31+4-k) for 0 <= k <= 5 + +2147483652:2147483652:1 +2147483652:2147483651:2147483652 +2147483652:2147483650:2305843016729886726 +2147483652:2147483649:1650586725964702736812343300 +2147483652:2147483648:886152001316410719612514404531175425 +2147483652:2147483647:380599386493893298883957515979031266281390080 + +# binomial(2^31+5, k) for 0 <= k <= 5 + +2147483653:0:1 +2147483653:1:2147483653 +2147483653:2:2305843018877370378 +2147483653:3:1650586728270545753542230026 +2147483653:4:886152002966997445577217141343518725 +2147483653:5:380599387380045300200368235591545670812565505 + +# binomial(2^31+5, 2^31+5-k) for 0 <= k <= 5 + +2147483653:2147483653:1 +2147483653:2147483652:2147483653 +2147483653:2147483651:2305843018877370378 +2147483653:2147483650:1650586728270545753542230026 +2147483653:2147483649:886152002966997445577217141343518725 +2147483653:2147483648:380599387380045300200368235591545670812565505 # binomial(2^32-2, k) for 0 <= k <= 5 -4294967296:0:1 -4294967296:1:4294967296 -4294967296:2:9223372034707292160 -4294967296:3:13204693743154017563500871680 -4294967296:4:14178431935232062024195948610647490560 -4294967296:5:12179180282733993764727382376328762979415752704 +4294967294:0:1 +4294967294:1:4294967294 +4294967294:2:9223372026117357571 +4294967294:3:13204693724707273506971189244 +4294967294:4:14178431908822674565558029570587754501 +4294967294:5:12179180254377129933877339520505430331269054458 # binomial(2^32-2, 2^32-2-k) for 0 <= k <= 5
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib-arithmetic-binary-_nok.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-binary-_nok.t
Changed
@@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 82645; +use Test::More tests => 93973; ############################################################################### # Read and load configuration file and backend library.
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-unary-_clog10.t
Added
@@ -0,0 +1,189 @@ +# -*- mode: perl; -*- + +use strict; +use warnings; + +use Test::More tests => 4569; + +############################################################################### +# Read and load configuration file and backend library. + +use Config::Tiny (); + +my $config_file = 'xt/author/lib.ini'; +my $config = Config::Tiny -> read('xt/author/lib.ini') + or die Config::Tiny -> errstr(); + +# Read the library to test. + +our $LIB = $config->{_}->{lib}; + +die "No library defined in file '$config_file'" + unless defined $LIB; +die "Invalid library name '$LIB' in file '$config_file'" + unless $LIB =~ /^A-Za-z\w*(::\w+)*\z/; + +# Read the reference type(s) the library uses. + +our $REF = $config->{_}->{ref}; + +die "No reference type defined in file '$config_file'" + unless defined $REF; +die "Invalid reference type '$REF' in file '$config_file'" + unless $REF =~ /^A-Za-z\w*(::\w+)*\z/; + +# Load the library. + +eval "require $LIB"; +die $@ if $@; + +############################################################################### + +can_ok($LIB, '_clog10'); + +# ceil(log(x) / log(10) + +sub clog10 { + my $x = shift; + my $y = int(log($x) / log(10)); + + my $trial = 10 ** $y; + return $y if $trial == $x; + + while ($trial > $x) { + $y--; + $trial = 10 ** $y; + } + + while ($trial < $x) { + $y++; + $trial = 10 ** $y; + } + + return $y; +} + +my @data; + +# Small numbers. + +for (my $x = 1; $x <= 998 ; ++ $x) { + my $y = clog10($x); + my $status = 10 ** $y == $x ? 1 : 0; + push @data, $x, $y, $status ; +} + +# Larger numbers. + +my $b = $LIB -> _new(10); +for (my $y = 3 ; $y <= 50 ; $y++) { + my $x = $LIB -> _pow($LIB -> _copy($b), $LIB -> _new($y)); + my $x_up = $LIB -> _inc($LIB -> _copy($x)); + my $x_dn = $LIB -> _dec($LIB -> _copy($x)); + push @data, $LIB -> _str($x_dn), $y, 0 ; # clog10(10**$y - 1) = $y + push @data, $LIB -> _str($x), $y, 1 ; # clog10(10**$y) = $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) { + my ($in0, $out0, $out1) = @{ $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 list context: $test", sub { + + unless (defined $out0) { + plan tests => 1; + + is($got0, $out0, + "'$test' output arg has the right value"); + return; + } + + plan tests => 8; + + # Number of output arguments. + + cmp_ok(scalar(@got), '==', 2, + "'$test' gives two output args"); + + # First output argument. + + is(ref($got0), $REF, + "'$test' first output arg is a $REF"); + + is($LIB->_check($got0), 0, + "'$test' first output is valid"); + + is($LIB->_str($got0), $out0, + "'$test' output arg has the right value"); + + is(ref($x), $REF, + "'$test' first input arg is still a $REF"); + + ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0, + "'$test' first input arg has the correct value"); + + # Second output argument. + + is(ref($got1), "", + "'$test' second output arg is a scalar"); + + is($got1, $out1, + "'$test' second output arg has the right value"); + }; +}
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-unary-_clog2.t
Added
@@ -0,0 +1,189 @@ +# -*- mode: perl; -*- + +use strict; +use warnings; + +use Test::More tests => 5181; + +############################################################################### +# Read and load configuration file and backend library. + +use Config::Tiny (); + +my $config_file = 'xt/author/lib.ini'; +my $config = Config::Tiny -> read('xt/author/lib.ini') + or die Config::Tiny -> errstr(); + +# Read the library to test. + +our $LIB = $config->{_}->{lib}; + +die "No library defined in file '$config_file'" + unless defined $LIB; +die "Invalid library name '$LIB' in file '$config_file'" + unless $LIB =~ /^A-Za-z\w*(::\w+)*\z/; + +# Read the reference type(s) the library uses. + +our $REF = $config->{_}->{ref}; + +die "No reference type defined in file '$config_file'" + unless defined $REF; +die "Invalid reference type '$REF' in file '$config_file'" + unless $REF =~ /^A-Za-z\w*(::\w+)*\z/; + +# Load the library. + +eval "require $LIB"; +die $@ if $@; + +############################################################################### + +can_ok($LIB, '_clog2'); + +# ceil(log(x) / log(2) + +sub clog2 { + my $x = shift; + my $y = int(log($x) / log(2)); + + my $trial = 2 ** $y; + return $y if $trial == $x; + + while ($trial > $x) { + $y--; + $trial = 2 ** $y; + } + + while ($trial < $x) { + $y++; + $trial = 2 ** $y; + } + + return $y; +} + +my @data; + +# Small numbers. + +for (my $x = 1 ; $x <= 1022 ; ++ $x) { + my $y = clog2($x); + my $status = 2 ** $y == $x ? 1 : 0; + push @data, $x, $y, $status ; +} + +# Larger numbers. + +my $b = $LIB -> _new(2); +for (my $y = 10 ; $y <= 100 ; $y++) { + my $x = $LIB -> _pow($LIB -> _copy($b), $LIB -> _new($y)); + my $x_up = $LIB -> _inc($LIB -> _copy($x)); + my $x_dn = $LIB -> _dec($LIB -> _copy($x)); + push @data, $LIB -> _str($x_dn), $y, 0 ; # clog2(2**$y - 1) = $y + push @data, $LIB -> _str($x), $y, 1 ; # clog2(2**$y) = $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) { + my ($in0, $out0, $out1) = @{ $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($got0, $out0, + "'$test' output arg has the right value"); + return; + } + + plan tests => 8; + + # Number of output arguments. + + cmp_ok(scalar(@got), '==', 2, + "'$test' gives two output args"); + + # First output argument. + + is(ref($got0), $REF, + "'$test' first output arg is a $REF"); + + is($LIB->_check($got0), 0, + "'$test' first output is valid"); + + is($LIB->_str($got0), $out0, + "'$test' output arg has the right value"); + + is(ref($x), $REF, + "'$test' first input arg is still a $REF"); + + ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0, + "'$test' first input arg has the correct value"); + + # Second output argument. + + is(ref($got1), "", + "'$test' second output arg is a scalar"); + + is($got1, $out1, + "'$test' second output arg has the right value"); + }; +}
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib-arithmetic-unary-_fib.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-unary-_fib.t
Changed
@@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 1005; +use Test::More tests => 503; ############################################################################### # Read and load configuration file and backend library. @@ -54,48 +54,6 @@ } close DATAFILE or die "$datafile: can't close file after reading: $!"; -# List context. - -for (my $i = 0 ; $i <= $#data ; ++ $i) { - my $in0 = $i; - my $out = map { $data$_1 } 0 .. $i ; - - my ($x, @got); - - my $test = qq|\$x = $LIB->_new("$in0"); | - . qq|\@got = $LIB->_fib(\$x);|; - - diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING}; - - eval $test; - is($@, "", "'$test' gives emtpy \$\@"); - - subtest "_fib() in list context: $test", sub { - plan tests => 3 * $i + 6, - - cmp_ok(scalar @got, "==", scalar @$out, - "'$test' gives one output arg"); - - for (my $j = 0 ; $j <= $#$out ; ++ $j) { - - is(ref($got$j), $REF, - "'$test' output arg is a $REF"); - - is($LIB->_check($got$j), 0, - "'$test' output is valid"); - - is($LIB->_str($got$j), $out->$j, - "'$test' output arg has the right value"); - } - - is(ref($x), $REF, - "'$test' input arg is still a $REF"); - - ok($LIB->_str($x) eq $out->-1 || $LIB->_str($x) eq $in0, - "'$test' input arg has the correct value"); - }; -} - # Scalar context. for (my $i = 0 ; $i <= $#data ; ++ $i) {
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-unary-_ilog10.t
Added
@@ -0,0 +1,189 @@ +# -*- mode: perl; -*- + +use strict; +use warnings; + +use Test::More tests => 4569; + +############################################################################### +# Read and load configuration file and backend library. + +use Config::Tiny (); + +my $config_file = 'xt/author/lib.ini'; +my $config = Config::Tiny -> read('xt/author/lib.ini') + or die Config::Tiny -> errstr(); + +# Read the library to test. + +our $LIB = $config->{_}->{lib}; + +die "No library defined in file '$config_file'" + unless defined $LIB; +die "Invalid library name '$LIB' in file '$config_file'" + unless $LIB =~ /^A-Za-z\w*(::\w+)*\z/; + +# Read the reference type(s) the library uses. + +our $REF = $config->{_}->{ref}; + +die "No reference type defined in file '$config_file'" + unless defined $REF; +die "Invalid reference type '$REF' in file '$config_file'" + unless $REF =~ /^A-Za-z\w*(::\w+)*\z/; + +# Load the library. + +eval "require $LIB"; +die $@ if $@; + +############################################################################### + +can_ok($LIB, '_ilog10'); + +# int(log(x) / log(10) + +sub ilog10 { + my $x = shift; + my $y = int(log($x) / log(10)); + + my $trial = 10 ** $y; + return $y if $trial == $x; + + while ($trial < $x) { + $y++; + $trial = 10 ** $y; + } + + while ($trial > $x) { + $y--; + $trial = 10 ** $y; + } + + return $y; +} + +my @data; + +# Small numbers. + +for (my $x = 1; $x <= 998 ; ++ $x) { + my $y = ilog10($x); + my $status = 10 ** $y == $x ? 1 : 0; + push @data, $x, $y, $status ; +} + +# Larger numbers. + +my $b = $LIB -> _new(10); +for (my $y = 3 ; $y <= 50 ; $y++) { + my $x = $LIB -> _pow($LIB -> _copy($b), $LIB -> _new($y)); + my $x_up = $LIB -> _inc($LIB -> _copy($x)); + my $x_dn = $LIB -> _dec($LIB -> _copy($x)); + push @data, $LIB -> _str($x_dn), $y - 1, 0 ; # ilog10(10**$y - 1) = $y - 1 + push @data, $LIB -> _str($x), $y, 1 ; # ilog10(10**$y) = $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) { + my ($in0, $out0, $out1) = @{ $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($got0, $out0, + "'$test' output arg has the right value"); + return; + } + + plan tests => 8; + + # Number of output arguments. + + cmp_ok(scalar(@got), '==', 2, + "'$test' gives two output args"); + + # First output argument. + + is(ref($got0), $REF, + "'$test' first output arg is a $REF"); + + is($LIB->_check($got0), 0, + "'$test' first output is valid"); + + is($LIB->_str($got0), $out0, + "'$test' output arg has the right value"); + + is(ref($x), $REF, + "'$test' first input arg is still a $REF"); + + ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0, + "'$test' first input arg has the correct value"); + + # Second output argument. + + is(ref($got1), "", + "'$test' second output arg is a scalar"); + + is($got1, $out1, + "'$test' second output arg has the right value"); + }; +}
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-unary-_ilog2.t
Added
@@ -0,0 +1,189 @@ +# -*- mode: perl; -*- + +use strict; +use warnings; + +use Test::More tests => 5181; + +############################################################################### +# Read and load configuration file and backend library. + +use Config::Tiny (); + +my $config_file = 'xt/author/lib.ini'; +my $config = Config::Tiny -> read('xt/author/lib.ini') + or die Config::Tiny -> errstr(); + +# Read the library to test. + +our $LIB = $config->{_}->{lib}; + +die "No library defined in file '$config_file'" + unless defined $LIB; +die "Invalid library name '$LIB' in file '$config_file'" + unless $LIB =~ /^A-Za-z\w*(::\w+)*\z/; + +# Read the reference type(s) the library uses. + +our $REF = $config->{_}->{ref}; + +die "No reference type defined in file '$config_file'" + unless defined $REF; +die "Invalid reference type '$REF' in file '$config_file'" + unless $REF =~ /^A-Za-z\w*(::\w+)*\z/; + +# Load the library. + +eval "require $LIB"; +die $@ if $@; + +############################################################################### + +can_ok($LIB, '_ilog2'); + +# int(log(x) / log(2) + +sub ilog2 { + my $x = shift; + my $y = int(log($x) / log(2)); + + my $trial = 2 ** $y; + return $y if $trial == $x; + + while ($trial < $x) { + $y++; + $trial = 2 ** $y; + } + + while ($trial > $x) { + $y--; + $trial = 2 ** $y; + } + + return $y; +} + +my @data; + +# Small numbers. + +for (my $x = 1 ; $x <= 1022 ; ++ $x) { + my $y = ilog2($x); + my $status = 2 ** $y == $x ? 1 : 0; + push @data, $x, $y, $status ; +} + +# Larger numbers. + +my $b = $LIB -> _new(2); +for (my $y = 10 ; $y <= 100 ; $y++) { + my $x = $LIB -> _pow($LIB -> _copy($b), $LIB -> _new($y)); + my $x_up = $LIB -> _inc($LIB -> _copy($x)); + my $x_dn = $LIB -> _dec($LIB -> _copy($x)); + push @data, $LIB -> _str($x_dn), $y - 1, 0 ; # ilog2(2**$y - 1) = $y - 1 + push @data, $LIB -> _str($x), $y, 1 ; # ilog2(2**$y) = $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) { + my ($in0, $out0, $out1) = @{ $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($got0, $out0, + "'$test' output arg has the right value"); + return; + } + + plan tests => 8; + + # Number of output arguments. + + cmp_ok(scalar(@got), '==', 2, + "'$test' gives two output args"); + + # First output argument. + + is(ref($got0), $REF, + "'$test' first output arg is a $REF"); + + is($LIB->_check($got0), 0, + "'$test' first output is valid"); + + is($LIB->_str($got0), $out0, + "'$test' output arg has the right value"); + + is(ref($x), $REF, + "'$test' first input arg is still a $REF"); + + ok($LIB->_str($x) eq $out0 || $LIB->_str($x) eq $in0, + "'$test' first input arg has the correct value"); + + # Second output argument. + + is(ref($got1), "", + "'$test' second output arg is a scalar"); + + is($got1, $out1, + "'$test' second output arg has the right value"); + }; +}
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/author/lib-arithmetic-unary-_lucas.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/author/lib-arithmetic-unary-_lucas.t
Changed
@@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 1005; +use Test::More tests => 503; ############################################################################### # Read and load configuration file and backend library. @@ -54,48 +54,6 @@ } close DATAFILE or die "$datafile: can't close file after reading: $!"; -# List context. - -for (my $i = 0 ; $i <= $#data ; ++ $i) { - my $in0 = $i; - my $out = map { $data$_1 } 0 .. $i ; - - my ($x, @got); - - my $test = qq|\$x = $LIB->_new("$in0"); | - . qq|\@got = $LIB->_lucas(\$x);|; - - diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING}; - - eval $test; - is($@, "", "'$test' gives emtpy \$\@"); - - subtest "_lucas() in list context: $test", sub { - plan tests => 3 * $i + 6, - - cmp_ok(scalar @got, "==", scalar @$out, - "'$test' gives one output arg"); - - for (my $j = 0 ; $j <= $#$out ; ++ $j) { - - is(ref($got$j), $REF, - "'$test' output arg is a $REF"); - - is($LIB->_check($got$j), 0, - "'$test' output is valid"); - - is($LIB->_str($got$j), $out->$j, - "'$test' output arg has the right value"); - } - - is(ref($x), $REF, - "'$test' input arg is still a $REF"); - - ok($LIB->_str($x) eq $out->-1 || $LIB->_str($x) eq $in0, - "'$test' input arg has the correct value"); - }; -} - # Scalar context. for (my $i = 0 ; $i <= $#data ; ++ $i) {
View file
_service:tar_scm:Math-BigInt-FastCalc-0.5014.tar.gz/xt/release/git.t -> _service:tar_scm:Math-BigInt-FastCalc-0.5018.tar.gz/xt/release/git.t
Changed
@@ -6,6 +6,7 @@ use IO::Pipe; use IO::File; use IO::Dir; + use File::Which qw< which >; use Sort::Versions qw< versioncmp >; @@ -129,7 +130,18 @@ or die "$filename: can't open file for reading: $!\n"; while (defined(my $line = <$fh>)) { - push @vers, $1 if $line =~ /^(\S+)/; + if ($line =~ /^(\S+)/) { + my $verstr = $1; + if ($verstr =~ / ^ v? ( \d+ ( \. \d+ ( _ \d+ )* )? ) $ /ix) { + my $vernum = $1; + $vernum =~ tr/_//d; + push @vers, $verstr, $vernum ; + last; # only get the first one + } else { + printf STDERR " Ignoring version number '%s' in %s line %u\n", + $verstr, $filename, $.; + } + } } $fh -> close() @@ -138,22 +150,18 @@ # Sort the versions. -@vers = sort { versioncmp($a, $b) } @vers; +#@vers = sort { versioncmp($a, $b) } @vers; unless (@vers) { print "not "; $failno++; } print "ok ", ++$testno, " - found version number(s) in changelog file(s)"; -print " ('$vers-1')" if @vers; +print " ('$vers00')" if @vers; print "\n"; -# Get most recent version (migth be undef). - -my $ver = $vers-1; - ################################################################################ -# Get the all the git tags. +# Get the all the git tags that look like version numbers. ################################################################################ my @tags; @@ -162,44 +170,44 @@ my @args = ('git', 'tag', '-l'); $pipe -> reader(@args); while (defined(my $tag = <$pipe>)) { - next unless $tag =~ /^v?\d/; $tag =~ s/\s+\z//; - push @tags, $tag; + if ($tag =~ / ^ v? ( \d+ ( \. \d+ ( _ \d+ )* )? ) /ix) { + my $vernum = $1; + $vernum =~ tr/_//d; + push @tags, $tag, $vernum ; + } } $pipe -> close() or die "can't close pipe after reading: $!"; } # Sort the tags. -@tags = sort { versioncmp($a, $b) } @tags; +#@tags = sort { versioncmp($b, $b) } @tags; +@tags = sort { $b -> 1 <=> $a -> 1 } @tags; unless (@tags) { print "not "; $failno++; } print "ok ", ++$testno, " - found git tag(s)"; -print " ('$tags-1')" if @tags; +print " ('", $tags00, "')" if @tags; print "\n"; -# Get newest tag (might be undef). - -my $tag = $tags-1; - ################################################################################ # Compare version number with git tag. ################################################################################ ++$testno; if (@vers and @tags) { - my $ok = versioncmp($ver, $tag) == 0; + my $ok = $vers00 eq $tags00; unless ($ok) { print "not "; $failno++; } print "ok ", $testno, " - changelog version matches git tag\n"; print STDERR <<"EOF" unless $ok; -# latest version in changelog(s): $ver -# latest git tag: $tag +# latest version in changelog(s): $vers00 +# latest git tag: $tags00 EOF } else { print "ok ", $testno, " - skipped (missing version number or git tag)\n"; @@ -217,7 +225,7 @@ ++$testno; if (@tags) { my $pipe = IO::Pipe -> new(); - my @args = ('git', 'rev-parse', $tag); + my @args = ('git', 'rev-parse', $tags00); $pipe -> reader(@args); $commit_tagged = <$pipe>; chomp $commit_tagged if defined $commit_tagged; @@ -226,7 +234,7 @@ print "not "; $failno++; } - print "ok ", $testno, " - tag ('$tag') refers to a commit"; + print "ok ", $testno, " - tag ('$tags00') refers to a commit"; print " ('$commit_tagged')" if $commit_tagged; print "\n"; } else {
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2