From: SADAHIRO Tomoyuki Date: Thu, 4 Jan 2007 00:21:02 +0000 (+0900) Subject: Re: What if NV_PRESERVES_UV_BITS is undef? (was: Re: [PATCH] Configure test code... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=78d00c47260f2671ebe392f1c5ac1e1403ecbceb;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/ext/Data/Dumper/t/dumper.t b/ext/Data/Dumper/t/dumper.t index 05e51a4..6b99ca1 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 04546be..d3a957a 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