Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package perl-Math-BigInt-GMP for 
openSUSE:Factory checked in at 2025-05-26 18:36:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Math-BigInt-GMP (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Math-BigInt-GMP.new.2732 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Math-BigInt-GMP"

Mon May 26 18:36:00 2025 rev:30 rq:1279817 version:1.7003

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Math-BigInt-GMP/perl-Math-BigInt-GMP.changes    
    2024-05-15 21:26:43.553872586 +0200
+++ 
/work/SRC/openSUSE:Factory/.perl-Math-BigInt-GMP.new.2732/perl-Math-BigInt-GMP.changes
      2025-05-26 18:37:44.272972044 +0200
@@ -1,0 +2,11 @@
+Thu Mar 27 05:35:42 UTC 2025 - Tina Müller <timueller+p...@suse.de>
+
+- updated to 1.7003
+   see /usr/share/doc/packages/perl-Math-BigInt-GMP/CHANGES
+
+  1.7003 2025-03-25
+   * Sync test files with Math-BigInt.
+  1.7002 2025-02-22
+   * Sync test files with Math-BigInt.
+
+-------------------------------------------------------------------

Old:
----
  Math-BigInt-GMP-1.7001.tar.gz

New:
----
  Math-BigInt-GMP-1.7003.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Math-BigInt-GMP.spec ++++++
--- /var/tmp/diff_new_pack.HVwDm2/_old  2025-05-26 18:37:44.684989341 +0200
+++ /var/tmp/diff_new_pack.HVwDm2/_new  2025-05-26 18:37:44.688989509 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Math-BigInt-GMP
 #
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %define cpan_name Math-BigInt-GMP
 Name:           perl-Math-BigInt-GMP
-Version:        1.7001
+Version:        1.7003
 Release:        0
 License:        Artistic-1.0 OR GPL-1.0-or-later
 Summary:        Backend library for Math::BigInt etc. based on GMP
@@ -29,10 +29,10 @@
 BuildRequires:  perl-macros
 BuildRequires:  perl(Carp) >= 1.22
 BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.58
-BuildRequires:  perl(Math::BigInt) >= 2.3.1
+BuildRequires:  perl(Math::BigInt) >= 2.005001
 BuildRequires:  perl(Test::More) >= 0.88
 Requires:       perl(Carp) >= 1.22
-Requires:       perl(Math::BigInt) >= 2.3.1
+Requires:       perl(Math::BigInt) >= 2.005001
 %{perl_requires}
 # MANUAL BEGIN
 BuildRequires:  gmp-devel
@@ -56,7 +56,7 @@
 Math::BigInt::Calc.pm.
 
 %prep
-%autosetup  -n %{cpan_name}-%{version}
+%autosetup  -n %{cpan_name}-%{version} -p1
 
 find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path 
"*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 
644
 

++++++ Math-BigInt-GMP-1.7001.tar.gz -> Math-BigInt-GMP-1.7003.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/CHANGES 
new/Math-BigInt-GMP-1.7003/CHANGES
--- old/Math-BigInt-GMP-1.7001/CHANGES  2024-01-06 09:03:02.000000000 +0100
+++ new/Math-BigInt-GMP-1.7003/CHANGES  2025-03-26 08:13:31.000000000 +0100
@@ -1,3 +1,11 @@
+1.7003 2025-03-25
+
+ * Sync test files with Math-BigInt.
+
+1.7002 2025-02-22
+
+ * Sync test files with Math-BigInt.
+
 1.7001 2024-01-06
 
  * Sync test files with Math-BigInt.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/MANIFEST 
new/Math-BigInt-GMP-1.7003/MANIFEST
--- old/Math-BigInt-GMP-1.7001/MANIFEST 2024-01-06 09:16:01.000000000 +0100
+++ new/Math-BigInt-GMP-1.7003/MANIFEST 2025-03-26 09:36:18.000000000 +0100
@@ -99,6 +99,7 @@
 xt/author/lib-boolean-_is_two.t
 xt/author/lib-boolean-_is_zero.t
 xt/author/lib-comparison-_acmp.t
+xt/author/lib-comparison-_scmp.t
 xt/author/lib-constructor-binary-_from_base.dat
 xt/author/lib-constructor-binary-_from_base.t
 xt/author/lib-constructor-nullary-_one.t
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/META.json 
new/Math-BigInt-GMP-1.7003/META.json
--- old/Math-BigInt-GMP-1.7001/META.json        2024-01-06 09:16:00.000000000 
+0100
+++ new/Math-BigInt-GMP-1.7003/META.json        2025-03-26 09:36:18.000000000 
+0100
@@ -4,7 +4,7 @@
       "Peter John Acklam <pjack...@gmail.com>"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter 
version 2.150010",
+   "generated_by" : "ExtUtils::MakeMaker version 7.72, CPAN::Meta::Converter 
version 2.150010",
    "license" : [
       "perl_5"
    ],
@@ -31,7 +31,7 @@
       "runtime" : {
          "requires" : {
             "Carp" : "1.22",
-            "Math::BigInt" : "2.003001",
+            "Math::BigInt" : "2.005001",
             "XSLoader" : "0.02",
             "perl" : "5.008"
          }
@@ -50,6 +50,6 @@
          "web" : "https://github.com/pjacklam/p5-Math-BigInt-GMP";
       }
    },
-   "version" : "1.7001",
+   "version" : "1.7003",
    "x_serialization_backend" : "JSON::PP version 4.16"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/META.yml 
new/Math-BigInt-GMP-1.7003/META.yml
--- old/Math-BigInt-GMP-1.7001/META.yml 2024-01-06 09:15:56.000000000 +0100
+++ new/Math-BigInt-GMP-1.7003/META.yml 2025-03-26 09:36:14.000000000 +0100
@@ -7,7 +7,7 @@
 configure_requires:
   ExtUtils::MakeMaker: '6.58'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 
2.150010'
+generated_by: 'ExtUtils::MakeMaker version 7.72, 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 @@
     - inc
 requires:
   Carp: '1.22'
-  Math::BigInt: '2.003001'
+  Math::BigInt: '2.005001'
   XSLoader: '0.02'
   perl: '5.008'
 resources:
   repository: https://github.com/pjacklam/p5-Math-BigInt-GMP.git
-version: '1.7001'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
+version: '1.7003'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.020'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/Makefile.PL 
new/Math-BigInt-GMP-1.7003/Makefile.PL
--- old/Math-BigInt-GMP-1.7001/Makefile.PL      2023-12-27 10:13:33.000000000 
+0100
+++ new/Math-BigInt-GMP-1.7003/Makefile.PL      2025-03-26 08:41:23.000000000 
+0100
@@ -36,7 +36,7 @@
    # A hash of modules that are needed to run the module.
 
    'PREREQ_PM'          => {
-                            'Math::BigInt'        => 2.003001,
+                            'Math::BigInt'        => 2.005001,
                             'Carp'                => 1.22,
                             'XSLoader'            => 0.02,
                            },
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/SIGNATURE 
new/Math-BigInt-GMP-1.7003/SIGNATURE
--- old/Math-BigInt-GMP-1.7001/SIGNATURE        2024-01-06 09:16:09.000000000 
+0100
+++ new/Math-BigInt-GMP-1.7003/SIGNATURE        2025-03-26 09:36:25.000000000 
+0100
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.88.
+signed via the Module::Signature module, version 0.89.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
@@ -15,15 +15,15 @@
 Hash: RIPEMD160
 
 SHA256 b173bc6027df00777c94cc36850ef64f7b2affeb8ec85593fee91eff5ce4a899 BUGS
-SHA256 79214b7536f6df6aacfc41f7339632eb5760e4274cc321b414430b8a6084f6b1 CHANGES
+SHA256 abcc440972c12eb1770a04f56402a9f426d59b3179ca006e4ccf18129658b5d9 CHANGES
 SHA256 15123cad594aefe6f9f78a0b637ba685991f36865f561686d57c61b13eca1ae0 CREDITS
 SHA256 96d7f51723971acffc9ce42791cf1ce102aebf95d1796fb2aa2d4cd25c2f319c GMP.xs
 SHA256 b857edab549ac6893e2df5e1ec768ee46b62bcf1607a55e876f4d23f079eacce LICENSE
-SHA256 18db4d26e2a02c9580a516178098d1e4e20b96dcb6f4a020dcc36afad7cfc408 
MANIFEST
+SHA256 482468c45c9529028455a87a3fe9bf02d6ad97680db0a34b3a1756374628def0 
MANIFEST
 SHA256 300af321df1f3305df4507151dc184906e1c846cbd9bedb0402c0e94564d79ca 
MANIFEST.SKIP
-SHA256 5bbb87ae006071ad2927a3ca0ba6d005e7f88190c89053e75a72eb59bcaab04e 
META.json
-SHA256 601b8dfd3d5c4b3ef0e64b47408afa4e13b5795a7ed45529271dcbe43d2a0e3e 
META.yml
-SHA256 9422a37dcba85512ce508d7056be2dcf7be8bc6611389c5aa14f1f80904d2957 
Makefile.PL
+SHA256 038c3ca6ff36c78d48f1f2ed6f732ea4d023c2d90d655fed25937f22a5995f4b 
META.json
+SHA256 d9fda48cccc32179b5c6581e3c9f7abe14c6a49c5dcf06a8035af637d761a289 
META.yml
+SHA256 1208913a2a5d6531ae17762625299562dc3c273541eb6ff95ecaed1a5bc37dd8 
Makefile.PL
 SHA256 29860c37d5c1b8260c51206c28b7580ae6b03df165e2ec266db5d2f373a8a80e README
 SHA256 7f237bd49206aa66675265834a76013ad984ab5eb251f3a0e08909d864be8075 
README.md
 SHA256 672c89aacd483edd14cbe5ee7db5dfa2991addad05f0d920d2424dfe507592f0 TODO
@@ -31,15 +31,15 @@
 SHA256 9850d025676d6bd49c4703ae2091f95266cf457a5b033f457b9cf073f6a2c33f 
build/leak.pl
 SHA256 fbe60701f97bf64e468ebaae5fb4805409a61fa71793133d14909e0b9733e9fc 
build/leaktest
 SHA256 7ac0dbf02aa5f9fffd64599358320f60388e95de64f9ae7a6d718cf224a0b433 
inc/Devel/CheckLib.pm
-SHA256 20b3f71063989e19420e741c71abdb80a6e2827f20c6cbc1a899f207d7790c7b 
lib/Math/BigInt/GMP.pm
+SHA256 810d7fec5cf9122100ecb64ae83ba2e82101268016dd3d3a1df0004238779b91 
lib/Math/BigInt/GMP.pm
 SHA256 f855e68d0f171debf8369ead8b36d004188f1c9069287a0d3c67a87f9afb1312 
t/00sig.t
 SHA256 02d11ba7425bc433a45b924752fcd7c3fb0840e78df7dc4c5b1eb572cc571873 
t/01load.t
 SHA256 9567333ab26747265ddf9bbcda1d6a672b71c6e85eb2cad3021ba7d2f96eb1c1 
t/Math/BigInt/Lib/TestUtil.pm
-SHA256 bc151bdde360ccc09f18dc925da5813e93ce94cbe91bdfbbbd7c5a66f7fae53f 
t/bigfltpm.inc
+SHA256 e91a9d83dc55ce67621aaec023652a0e0b2c4798055d7eda6fb3623f49f423e2 
t/bigfltpm.inc
 SHA256 ba90ef638a3c5cd2be536e53144c37687d49c213bf3e0945c966012a6395fbf7 
t/bigfltpm.t
 SHA256 b4c6c2c6539673ca4317d1edf14d0088d975c0c27ebe409f773a3b390d509d71 
t/bigintg.t
-SHA256 ec4f5506e6c979d197fca856d1f201275ceb1688a293f072604c3eccf3232177 
t/bigintpm.inc
-SHA256 3f2f7ace432bf43336f143602aed02f30247df2f45cba918ce55f55529d66be0 
t/bigintpm.t
+SHA256 f5e474a10404d614db2eeb7aa85b8573cabc335c57e1d540924446dce41e7b2d 
t/bigintpm.inc
+SHA256 c252104c25ae1ab8ff1da1890e19786bf68ff5472943099e71f2fb93795a5e29 
t/bigintpm.t
 SHA256 2c9176d4f4ade203eabc81baeb3d51bc13370da33292335f3fc073c35fbe280e 
t/biglog.t
 SHA256 b8af8e548686d7132b27fad6f115a1b5c7b938260351a0a8233a4c6d6d824c99 
t/bigroot.t
 SHA256 d918b6df34003214403c8dc86f7da70700ad29af8a8e9dc53540dc1e83b41351 
t/mbi-from-big-scalar.t
@@ -117,6 +117,7 @@
 SHA256 910ccb928f092e50b0dd45fdb93f584fd702b63e255a3fc125851c454820d034 
xt/author/lib-boolean-_is_two.t
 SHA256 6d2bb5e2405c9563c6877d1ec086a5dce2d61621d04dd8ab5b28a5bd0ed03bcf 
xt/author/lib-boolean-_is_zero.t
 SHA256 cd3bfc09bb93df64006255ea7c45940aff2eb864007444b23a7d797f181b908d 
xt/author/lib-comparison-_acmp.t
+SHA256 48bda3cf59139648db67b96546fd260c518e3dd97e54e4a3a3a369dd43129b9e 
xt/author/lib-comparison-_scmp.t
 SHA256 63568923af657af310f9adca9be11418f169707e646f906193d98a52e4148fda 
xt/author/lib-constructor-binary-_from_base.dat
 SHA256 4b173614f1b3a63dbb5140a7685ae8ede70f0f0828799afb72c38d07da60948f 
xt/author/lib-constructor-binary-_from_base.t
 SHA256 a955ad729cafc5eac08765cb8e953e4941aae30e3ecfbf914bc42f364b59196a 
xt/author/lib-constructor-nullary-_one.t
@@ -180,11 +181,12 @@
 SHA256 79e228dfe3193c0f2b5f9afaa6677062ef33ac9c9578e0e6c5a627696c319982 
xt/release/version.t
 -----BEGIN PGP SIGNATURE-----
 
-iQEcBAEBAwAGBQJlmQxCAAoJEGcmPl2fr166oEkH/1lJKEzb1t43XXZioNM1ULt4
-4YSUM4/z3+bHDK9K99Y0VuE6+dXI4JQksg6Oj9H8bLXxQkH/u5YlRUhqRNZtwvVr
-YkbfQSIwJG0x0VZgj+Oxx+zKQjHSi7RqiDhX01fNaseXHvsExAQjFte0Eemgkfn2
-5JX3UORIAoriSzhHeT7q1wd/3fqv7Fs9aIhcfb/iyCkHl1tqyGViFzklqyaDj5FV
-34YIJGDkX6/C8uLRIx6YbuGQnKkKbSiX0kUxqRevhCYRFwHAxLJXv0MeVOQxAVOR
-7sOfJSWCLKocwvBEOyqJTIEnUnnnlrgHe9b1mTKJVNs0qy4KVF0KXnAan0HAYbo=
-=SfNt
+iQEzBAEBAwAdFiEETKm/EiRoNYMVDAUYZyY+XZ+vXroFAmfjvIMACgkQZyY+XZ+v
+Xrpf5Af/b5cRtLMBd3vHSqlrfCOy1vHyTzRRdiVQE3++zD899xOV43KF2HhVe6FQ
+Xe9t8MgJGF2ULwXzdWwppizNu6Hc0ycOFI/nWF8oR9bn6XTB+gARrs6wRLNK/v1d
+6HTVdLB/oPzmPpYHWMF2BkvZSI8g3dwsZRtf5Fz71gxrdJssL5Jhb0vWiz8D3gPN
+hY4EVcFZHNNeQMtiSBIzP8nEZTWX09JTsqVs+jKpVAUde7x+XGDyXmnG5oB9hcqR
+TOgsjjhPbasTOi0GqtLQaQum1OTys5iJGW4nhCLtXx3zCwtPBdQDb3fMMc1bn4TB
+V+sbT00CpfzgP1JnhykMAWdJ6s9tGQ==
+=c7bL
 -----END PGP SIGNATURE-----
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/lib/Math/BigInt/GMP.pm 
new/Math-BigInt-GMP-1.7003/lib/Math/BigInt/GMP.pm
--- old/Math-BigInt-GMP-1.7001/lib/Math/BigInt/GMP.pm   2024-01-06 
09:06:36.000000000 +0100
+++ new/Math-BigInt-GMP-1.7003/lib/Math/BigInt/GMP.pm   2025-03-26 
08:18:36.000000000 +0100
@@ -8,7 +8,7 @@
 
 our @ISA = qw< Math::BigInt::Lib >;
 
-our $VERSION = '1.7001';
+our $VERSION = '1.7003';
 
 use XSLoader;
 XSLoader::load "Math::BigInt::GMP", $VERSION;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/t/bigfltpm.inc 
new/Math-BigInt-GMP-1.7003/t/bigfltpm.inc
--- old/Math-BigInt-GMP-1.7001/t/bigfltpm.inc   2023-12-26 13:10:26.000000000 
+0100
+++ new/Math-BigInt-GMP-1.7003/t/bigfltpm.inc   2025-03-25 08:55:25.000000000 
+0100
@@ -158,8 +158,9 @@
         }
     }
 
+    note "\n$try\n\n";
     $got = eval $try;
-    print "# Error: $@\n" if $@;
+    diag "Error: $@\n" if $@;
 
     if ($want =~ m|^/(.*)$|) {
         my $pat = $1;
@@ -512,7 +513,7 @@
 abc:abc:NaN
 abc:+0:NaN
 +0:abc:NaN
-+0:+0:NaN
++0:+0:0
 +1:+0:0
 +0:+1:0
 +27:+90:270
@@ -1814,10 +1815,10 @@
 9:4:2,1
 9:5:1,4
 # bug in v1.74 with bdiv in list context, when $y is 1 or -1
-2.1:-1:-2.1,0
-2.1:1:2.1,0
--2.1:-1:2.1,0
--2.1:1:-2.1,0
+2.1:-1:-3,-0.9
+2.1:1:2,0.1
+-2.1:-1:2,-0.1
+-2.1:1:-3,0.9
 
 &bdiv
 $div_scale = 40; $round_mode = "even"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/t/bigintpm.inc 
new/Math-BigInt-GMP-1.7003/t/bigintpm.inc
--- old/Math-BigInt-GMP-1.7001/t/bigintpm.inc   2023-12-16 11:18:44.000000000 
+0100
+++ new/Math-BigInt-GMP-1.7003/t/bigintpm.inc   2025-02-12 14:34:17.000000000 
+0100
@@ -1623,6 +1623,10 @@
 invalid:+inf:NaN
 +inf:invalid:NaN
 -inf:invalid:NaN
++inf:1:inf
+-inf:1:-inf
+1:+inf:inf
+1:-inf:-inf
 0:0:0
 1:0:1
 0:1:1
@@ -1686,6 +1690,10 @@
 -inf:+inf:-inf
 +inf:+inf:NaN
 -inf:-inf:NaN
++inf:1:inf
+-inf:1:-inf
+1:+inf:-inf
+1:-inf:inf
 +0:+0:0
 +1:+0:1
 +0:+1:-1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Math-BigInt-GMP-1.7001/t/bigintpm.t 
new/Math-BigInt-GMP-1.7003/t/bigintpm.t
--- old/Math-BigInt-GMP-1.7001/t/bigintpm.t     2023-09-20 19:02:03.000000000 
+0200
+++ new/Math-BigInt-GMP-1.7003/t/bigintpm.t     2025-02-22 19:36:00.000000000 
+0100
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 4278            # tests in require'd file
+use Test::More tests => 4294            # tests in require'd file
                          + 20;          # tests in this file
 
 use Math::BigInt only => 'GMP';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Math-BigInt-GMP-1.7001/xt/author/lib-comparison-_scmp.t 
new/Math-BigInt-GMP-1.7003/xt/author/lib-comparison-_scmp.t
--- old/Math-BigInt-GMP-1.7001/xt/author/lib-comparison-_scmp.t 1970-01-01 
01:00:00.000000000 +0100
+++ new/Math-BigInt-GMP-1.7003/xt/author/lib-comparison-_scmp.t 2025-02-27 
08:07:32.000000000 +0100
@@ -0,0 +1,117 @@
+# -*- mode: perl; -*-
+
+use strict;
+use warnings;
+
+use Test::More tests => 1765;
+
+###############################################################################
+# 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/;
+
+# Load the library.
+
+eval "require $LIB";
+die $@ if $@;
+
+###############################################################################
+
+use lib 't';
+use Math::BigInt::Lib::TestUtil qw< randstr >;
+
+can_ok($LIB, '_scmp');
+
+# Generate test data.
+
+my @data;
+
+# Small integers.
+
+for my $a (-10 .. 10) {
+    for my $b (-10 .. 10) {
+        push @data, [ $a, $b, $a <=> $b ];
+    }
+}
+
+# List context.
+
+for (my $i = 0 ; $i <= $#data ; ++ $i) {
+    my ($in0, $in1, $out0) = @{ $data[$i] };
+
+    my ($x, $y, @got);
+
+    my $sgn_in0 = $in0 < 0 ? "-" : "+";
+    my $abs_in0 = abs($in0);
+
+    my $sgn_in1 = $in1 < 0 ? "-" : "+";
+    my $abs_in1 = abs($in1);
+
+    my $test = qq|\$x = $LIB->_new("$abs_in0"); |
+             . qq|\$y = $LIB->_new("$abs_in1"); |
+             . qq|\@got = $LIB->_scmp(\$x, "$sgn_in0", \$y, "$sgn_in1");|;
+
+    diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING};
+
+    eval $test;
+    is($@, "", "'$test' gives emtpy \$\@");
+
+    subtest "_new() in list context: $test", sub {
+        plan tests => 3,
+
+        cmp_ok(scalar(@got), "==", 1,
+               "'$test' one output arg");
+
+        is(ref($got[0]), "",
+           "'$test' output arg is a Perl scalar");
+
+        is($got[0], $out0,
+           "'$test' output arg has the right value");
+    };
+}
+
+# Scalar context.
+
+for (my $i = 0 ; $i <= $#data ; ++ $i) {
+    my ($in0, $in1, $out0) = @{ $data[$i] };
+
+    my ($x, $y, $got);
+
+    my $sgn_in0 = $in0 < 0 ? "-" : "+";
+    my $abs_in0 = abs($in0);
+
+    my $sgn_in1 = $in1 < 0 ? "-" : "+";
+    my $abs_in1 = abs($in1);
+
+    my $test = qq|\$x = $LIB->_new("$abs_in0"); |
+             . qq|\$y = $LIB->_new("$abs_in1"); |
+             . qq|\$got = $LIB->_scmp(\$x, "$sgn_in0", \$y, "$sgn_in1");|;
+
+    diag("\n$test\n\n") if $ENV{AUTHOR_DEBUGGING};
+
+    eval $test;
+    is($@, "", "'$test' gives emtpy \$\@");
+
+    subtest "_new() in scalar context: $test", sub {
+        plan tests => 2,
+
+        is(ref($got), "",
+           "'$test' output arg is a Perl scalar");
+
+        is($got, $out0,
+           "'$test' output arg has the right value");
+    };
+}

Reply via email to