Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37794855
en ru br
ALT Linux repos
S:0.078-alt1

Group :: Development/Perl
RPM: perl-CryptX

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0001-fix-82-issues-in-tests-by-Math-BigInt-1.999831.patch
Download


From e198dff8190d2f5b674fa88add58f4747a315d3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Josef=20=C5=A0pa=C4=8Dek?= <mspacek@redhat.com>
Date: Fri, 27 May 2022 16:12:01 +0200
Subject: [PATCH] fix #82 issues in tests by Math::BigInt 1.999831
---
 Changes                | 3 +++
 Makefile.PL            | 2 +-
 t/mbi_ltm/bigfltpm.inc | 9 +++++----
 t/mbi_ltm_biglog.t     | 2 +-
 4 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/Changes b/Changes
index 1db4abf9..96c40347 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Changes for CryptX
 
+0.077
+        - fix #82 issues in tests by Math::BigInt 1.999831
+
 0.076   2022-01-07
         - fix #80 github actions (mac, windows, cygwin)
         - fix #79 isolate ltc functions (via -Wl,--exclude-libs,ALL)
diff --git a/Makefile.PL b/Makefile.PL
index 35d78720..f34835fb 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -79,7 +79,7 @@ my %eumm_args = (
   ABSTRACT         => 'Cryptographic toolkit',
   MIN_PERL_VERSION => '5.006',
   LICENSE          => 'perl_5',
-  PREREQ_PM        => { 'Math::BigInt' => 0 },
+  PREREQ_PM        => { 'Math::BigInt' => 1.999831 },
   TEST_REQUIRES    => { 'Test::More' => 0 },
   META_MERGE       => { resources  => { repository => 'https://github.com/DCIT/perl-CryptX', bugtracker => 'https://github.com/DCIT/perl-CryptX/issues' } },
   dist             => { PREOP => 'perldoc -u lib/CryptX.pm | pod2markdown > README.md', TARFLAGS => '--owner=0 --group=0 -cvf' },
diff --git a/t/mbi_ltm/bigfltpm.inc b/t/mbi_ltm/bigfltpm.inc
index 07e0bf0d..2418fd49 100644
--- a/t/mbi_ltm/bigfltpm.inc
+++ b/t/mbi_ltm/bigfltpm.inc
@@ -46,7 +46,8 @@ while (<DATA>) {
     } elsif ($f eq "binf") {
         $try .= qq| \$x->binf("$args[1]");|;
     } elsif ($f eq "bone") {
-        $try .= qq| \$x->bone("$args[1]");|;
+        $try .= length($args[1]) ? qq| \$x->bone("$args[1]");|
+	                         : qq| \$x->bone();|;
     } elsif ($f eq "bstr") {
         $try .= qq| \$x->accuracy($args[1]); \$x->precision($args[2]);|;
         $try .= ' $x->bstr();';
@@ -555,8 +556,8 @@ $div_scale = 40
 &bcos
 1.2:10:0.3623577545
 2.4:12:-0.737393715541
-0:10:1
-0:20:1
+0:10:1.000000000
+0:20:1.0000000000000000000
 1:10:0.5403023059
 1:12:0.540302305868
 
@@ -844,7 +845,7 @@ abc:NaN
 0::1
 -2::1
 abc::1
-2:abc:1
+2::1
 
 &bsstr
 +inf:inf
diff --git a/t/mbi_ltm_biglog.t b/t/mbi_ltm_biglog.t
index ffc0cade..77d2b856 100644
--- a/t/mbi_ltm_biglog.t
+++ b/t/mbi_ltm_biglog.t
@@ -120,7 +120,7 @@ is ($cl->new('1.2')->bpow('0.3',10),  '1.056219968');
 is ($cl->new('10')->bpow('0.6',10),   '3.981071706');
 
 # blog should handle bigint input
-is (Math::BigFloat::blog(Math::BigInt->new(100),10), 2, "blog(100)");
+is (Math::BigFloat->blog(Math::BigInt->new(100),10), 2, "blog(100)");
 
 #############################################################################
 # some integer results
-- 
2.36.1
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin