In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/177ee6a3ebda2fa85768cab5f086fd1e706fc36c?hp=7f581e76d55d16c0f0b5f02b898e703e1bc5c8ff>
- Log ----------------------------------------------------------------- commit 177ee6a3ebda2fa85768cab5f086fd1e706fc36c Author: Jarkko Hietaniemi <[email protected]> Date: Sat Nov 8 12:23:20 2014 -0500 Using bignum needs skip_if_miniperl(). M t/run/switchd.t commit f572e0f0bfae9b7df3b375a7cb25a3f64e1600ea Author: Jarkko Hietaniemi <[email protected]> Date: Sat Nov 8 12:12:42 2014 -0500 skip_all, not skip, if only miniperl. M t/re/rt122747.t commit b940ee07642cbbf04ebaeb00224e43aa7fbcc377 Author: Jarkko Hietaniemi <[email protected]> Date: Sat Nov 8 10:58:18 2014 -0500 Wrong (non-existent) Config var name. M t/op/inc.t commit 00c6bd382c7d72713e8c18253ebd82aad09d65a5 Author: Jarkko Hietaniemi <[email protected]> Date: Sat Nov 8 12:46:54 2014 -0500 Fix one test message, add two tests. M t/op/infnan.t commit 5ebb886c819e1797abbe87aeb12c359cccd7179e Author: Jarkko Hietaniemi <[email protected]> Date: Sat Nov 8 09:20:23 2014 -0500 undef the temp variables between tests. This way a failing result doesn't carry over between subtests. M t/op/infnan.t commit 6e1abbf3f1f4c8f2a149d6212886b03eb10cc2cd Author: Jarkko Hietaniemi <[email protected]> Date: Sat Nov 8 11:01:43 2014 -0500 Perl_isfinitel is not necessarily always there. M sv.c commit f3654d06b0c8b46f39c9d4f2bedf42748d4ce624 Author: Jarkko Hietaniemi <[email protected]> Date: Sat Nov 8 11:05:51 2014 -0500 Drop uselongdouble unless it really gives longer doubles. M perl.h ----------------------------------------------------------------------- Summary of changes: perl.h | 8 +++----- sv.c | 8 ++++++-- t/op/inc.t | 2 +- t/op/infnan.t | 14 +++++++++++++- t/re/rt122747.t | 2 +- t/run/switchd.t | 6 ++++-- 6 files changed, 28 insertions(+), 12 deletions(-) diff --git a/perl.h b/perl.h index c7bb858..9a67df4 100644 --- a/perl.h +++ b/perl.h @@ -1761,11 +1761,9 @@ typedef UVTYPE UV; #define FPTR2DPTR(t,p) ((t)PTR2nat(p)) /* function pointer to data pointer */ #ifdef USE_LONG_DOUBLE -# if defined(HAS_LONG_DOUBLE) && LONG_DOUBLESIZE == DOUBLESIZE -# define LONG_DOUBLE_EQUALS_DOUBLE -# endif -# if !(defined(HAS_LONG_DOUBLE) && (LONG_DOUBLESIZE > DOUBLESIZE)) -# undef USE_LONG_DOUBLE /* Ouch! */ +# if LONG_DOUBLESIZE == DOUBLESIZE +# define LONG_DOUBLE_EQUALS_DOUBLE +# undef USE_LONG_DOUBLE /* Ouch! */ # endif #endif diff --git a/sv.c b/sv.c index d3f10e2..7091c51 100644 --- a/sv.c +++ b/sv.c @@ -11231,7 +11231,9 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p #if defined(HAS_LONG_DOUBLE) && LONG_DOUBLESIZE > DOUBLESIZE && \ defined(PERL_PRIgldbl) && !defined(USE_QUADMATH) long double fv; -# define FV_ISFINITE(x) Perl_isfinitel(x) +# ifdef Perl_isfinitel +# define FV_ISFINITE(x) Perl_isfinitel(x) +# endif # define FV_GF PERL_PRIgldbl # if defined(__VMS) && defined(__ia64) && defined(__IEEE_FLOAT) /* Work around breakage in OTS$CVT_FLOAT_T_X */ @@ -11244,10 +11246,12 @@ Perl_sv_vcatpvfn_flags(pTHX_ SV *const sv, const char *const pat, const STRLEN p # endif #else NV fv; -# define FV_ISFINITE(x) Perl_isfinite((NV)(x)) # define FV_GF NVgf # define NV_TO_FV(nv,fv) (fv)=(nv) #endif +#ifndef FV_ISINITE +# define FV_ISFINITE(x) Perl_isfinite((NV)(x)) +#endif STRLEN have; STRLEN need; STRLEN gap; diff --git a/t/op/inc.t b/t/op/inc.t index d56f345..71dfef5 100644 --- a/t/op/inc.t +++ b/t/op/inc.t @@ -188,7 +188,7 @@ cmp_ok($a, '==', 2147483647, "postdecrement properly downgrades from double"); SKIP: { if ($Config{uselongdouble} && - ($Config{longdblkind} == 6 || $Config{longdoublekind} == 5)) { + ($Config{longdblkind} == 6 || $Config{longdblkind} == 5)) { skip "the double-double format is weird", 1; } diff --git a/t/op/infnan.t b/t/op/infnan.t index a45bc3f..23d5377 100644 --- a/t/op/infnan.t +++ b/t/op/infnan.t @@ -69,7 +69,9 @@ cmp_ok($NInf + $NInf, '==', $NInf, "-Inf - Inf is -Inf"); cmp_ok($PInf * 2, '==', $PInf, "twice Inf is Inf"); cmp_ok($PInf / 2, '==', $PInf, "half of Inf is Inf"); -cmp_ok($PInf * $PInf, '==', $PInf, "-Inf * +Inf is +Inf"); +cmp_ok($PInf * $PInf, '==', $PInf, "+Inf * +Inf is +Inf"); +cmp_ok($PInf * $NInf, '==', $NInf, "+Inf * -Inf is -Inf"); +cmp_ok($NInf * $PInf, '==', $NInf, "-Inf * +Inf is -Inf"); cmp_ok($NInf * $NInf, '==', $PInf, "-Inf * -Inf is +Inf"); is(sprintf("%g", $PInf), "Inf", "$PInf sprintf %g is Inf"); @@ -102,16 +104,20 @@ ok(!defined eval { $a = chr("-Inf") }, "chr(stringy -Inf) undef"); like($@, qr/Cannot chr/, "stringy -Inf chr() fails"); for my $f (@packi_fmt) { + undef $a; ok(!defined eval { $a = pack($f, $PInf) }, "pack $f +Inf undef"); like($@, $f eq 'w' ? qr/Cannot compress Inf/: qr/Cannot pack Inf/, "+Inf pack $f fails"); + undef $a; ok(!defined eval { $a = pack($f, "Inf") }, "pack $f stringy +Inf undef"); like($@, $f eq 'w' ? qr/Cannot compress Inf/: qr/Cannot pack Inf/, "stringy +Inf pack $f fails"); + undef $a; ok(!defined eval { $a = pack($f, $NInf) }, "pack $f -Inf undef"); like($@, $f eq 'w' ? qr/Cannot compress -Inf/: qr/Cannot pack -Inf/, "-Inf pack $f fails"); + undef $a; ok(!defined eval { $a = pack($f, "-Inf") }, "pack $f stringy -Inf undef"); like($@, $f eq 'w' ? qr/Cannot compress -Inf/: qr/Cannot pack -Inf/, @@ -119,19 +125,25 @@ for my $f (@packi_fmt) { } for my $f (@packf_fmt) { + undef $a; + undef $b; ok(defined eval { $a = pack($f, $PInf) }, "pack $f +Inf defined"); eval { $b = unpack($f, $a) }; cmp_ok($b, '==', $PInf, "pack $f +Inf equals $PInf"); + undef $a; + undef $b; ok(defined eval { $a = pack($f, $NInf) }, "pack $f -Inf defined"); eval { $b = unpack($f, $a) }; cmp_ok($b, '==', $NInf, "pack $f -Inf equals $NInf"); } for my $f (@packs_fmt) { + undef $a; ok(defined eval { $a = pack($f, $PInf) }, "pack $f +Inf defined"); is($a, pack($f, "Inf"), "pack $f +Inf same as 'Inf'"); + undef $a; ok(defined eval { $a = pack($f, $NInf) }, "pack $f -Inf defined"); is($a, pack($f, "-Inf"), "pack $f -Inf same as 'Inf'"); } diff --git a/t/re/rt122747.t b/t/re/rt122747.t index 4f38ef3..27cfe1a 100644 --- a/t/re/rt122747.t +++ b/t/re/rt122747.t @@ -10,7 +10,7 @@ BEGIN { @INC = ('../lib','.','../ext/re'); require './test.pl'; if (is_miniperl()) { - skip_if_miniperl("Unicode tables not built yet", 2) + skip_all_if_miniperl("Unicode tables not built yet", 2) unless eval 'require "unicore/Heavy.pl"'; } } diff --git a/t/run/switchd.t b/t/run/switchd.t index 1f11e87..5005b082 100644 --- a/t/run/switchd.t +++ b/t/run/switchd.t @@ -3,10 +3,9 @@ BEGIN { chdir 't' if -d 't'; @INC = qw(../lib lib); + require "./test.pl"; } -BEGIN { require "./test.pl"; } - # This test depends on t/lib/Devel/switchd*.pm. plan(tests => 20); @@ -286,6 +285,8 @@ is( '-d does not conflict with sort optimisations' ); +SKIP: { + skip_if_miniperl("under miniperl", 1); is( runperl( switches => [ '-Ilib', '-d:switchd_empty' ], @@ -300,3 +301,4 @@ is( "debugged\n", "\$DB::single set to overload" ); +} -- Perl5 Master Repository
