summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSADAHIRO Tomoyuki <BQW10602@nifty.com>2007-01-04 09:21:02 +0900
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-01-05 09:55:22 +0000
commit78d00c47260f2671ebe392f1c5ac1e1403ecbceb (patch)
treed4586b01b095b7cebb57e6a38e9d8ce7735041c8
parent85c508c327bae6947de518a0ae05de3f08986372 (diff)
downloadperl-78d00c47260f2671ebe392f1c5ac1e1403ecbceb.tar.gz
Re: What if NV_PRESERVES_UV_BITS is undef? (was: Re: [PATCH] Configure test code fails to compile if SIGFPE is undefined)
Message-Id: <20070104001943.6BC2.BQW10602@nifty.com> p4raw-id: //depot/perl@29693
-rwxr-xr-xext/Data/Dumper/t/dumper.t17
-rw-r--r--ext/Devel/Peek/t/Peek.t2
2 files changed, 18 insertions, 1 deletions
diff --git a/ext/Data/Dumper/t/dumper.t b/ext/Data/Dumper/t/dumper.t
index 05e51a45c2..6b99ca177e 100755
--- a/ext/Data/Dumper/t/dumper.t
+++ b/ext/Data/Dumper/t/dumper.t
@@ -1174,18 +1174,30 @@ TEST q(Data::Dumper->new(\@strings_ns)->Dump), 'Strings NV,PV';
TEST q(Data::Dumper->new(\@strings_ni)->Dump), 'Strings NV,IV';
TEST q(Data::Dumper->new(\@strings_nis)->Dump), 'Strings NV,IV,PV';
if ($XS) {
+ my $nv_preserves_uv = defined $Config{d_nv_preserves_uv};
+ my $nv_preserves_uv_4bits = $Config{nv_preserves_uv_bits} >= 4;
$WANT=$WANT_XS_N;
TEST q(Data::Dumper->new(\@numbers)->Dumpxs), 'XS Numbers';
TEST q(Data::Dumper->new(\@numbers_s)->Dumpxs), 'XS Numbers PV';
+ if ($nv_preserves_uv || $nv_preserves_uv_4bits) {
$WANT=$WANT_XS_I;
TEST q(Data::Dumper->new(\@numbers_i)->Dumpxs), 'XS Numbers IV';
TEST q(Data::Dumper->new(\@numbers_is)->Dumpxs), 'XS Numbers IV,PV';
+ } else {
+ SKIP_TEST "NV does not preserve 4bits";
+ SKIP_TEST "NV does not preserve 4bits";
+ }
$WANT=$WANT_XS_N;
TEST q(Data::Dumper->new(\@numbers_n)->Dumpxs), 'XS Numbers NV';
TEST q(Data::Dumper->new(\@numbers_ns)->Dumpxs), 'XS Numbers NV,PV';
+ if ($nv_preserves_uv || $nv_preserves_uv_4bits) {
$WANT=$WANT_XS_I;
TEST q(Data::Dumper->new(\@numbers_ni)->Dumpxs), 'XS Numbers NV,IV';
TEST q(Data::Dumper->new(\@numbers_nis)->Dumpxs), 'XS Numbers NV,IV,PV';
+ } else {
+ SKIP_TEST "NV does not preserve 4bits";
+ SKIP_TEST "NV does not preserve 4bits";
+ }
$WANT=$WANT_XS_S;
TEST q(Data::Dumper->new(\@strings)->Dumpxs), 'XS Strings';
@@ -1194,9 +1206,14 @@ if ($XS) {
$WANT=$WANT_PL_S;
TEST q(Data::Dumper->new(\@strings_i)->Dumpxs), 'XS Strings IV';
TEST q(Data::Dumper->new(\@strings_is)->Dumpxs), 'XS Strings IV,PV';
+ if ($nv_preserves_uv || $nv_preserves_uv_4bits) {
$WANT=$WANT_XS_S;
TEST q(Data::Dumper->new(\@strings_n)->Dumpxs), 'XS Strings NV';
TEST q(Data::Dumper->new(\@strings_ns)->Dumpxs), 'XS Strings NV,PV';
+ } else {
+ SKIP_TEST "NV does not preserve 4bits";
+ SKIP_TEST "NV does not preserve 4bits";
+ }
# This one used to really mess up. New code actually emulates the .pm code
$WANT=$WANT_PL_S;
TEST q(Data::Dumper->new(\@strings_ni)->Dumpxs), 'XS Strings NV,IV';
diff --git a/ext/Devel/Peek/t/Peek.t b/ext/Devel/Peek/t/Peek.t
index 04546be9de..d3a957a068 100644
--- a/ext/Devel/Peek/t/Peek.t
+++ b/ext/Devel/Peek/t/Peek.t
@@ -125,7 +125,7 @@ do_test( 7,
'SV = PVNV\\($ADDR\\) at $ADDR
REFCNT = 1
FLAGS = \\(NOK,pNOK\\)
- IV = 0
+ IV = \d+
NV = 789\\.(?:1(?:000+\d+)?|0999+\d+)
PV = $ADDR "789"\\\0
CUR = 3