summaryrefslogtreecommitdiff
path: root/ext/XS/APItest/t/xs_special_subs.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-12-22 11:28:02 +0000
committerNicholas Clark <nick@ccl4.org>2007-12-22 11:28:02 +0000
commit9568a12365eb8ff5d5bc470ce5480d516d924f31 (patch)
tree843d6d93c95bc3aead7041e90c042a1de40010f4 /ext/XS/APItest/t/xs_special_subs.t
parent54cea8cc4e7e8225637e8d1e3b66ab04b99f0aee (diff)
downloadperl-9568a12365eb8ff5d5bc470ce5480d516d924f31.tar.gz
Integrate:
[ 32483] Use a new (clean) anonymous hash for each loop, rather than a hash in the pad, as the latter can change internal state sufficiently to confuse matters (even though in all cases it has no keys and from Perl space is "measurably" identical). [ 32500] Get APItest.xs compiling on 5.8.x by making the compilation of the Perl_hv_common() test code conditional on the macro hv_common being defined, and the refcounted_he code conditional on it being 5.9 or later. [ 32501] Hack round the fact that UNITCHECK is nothing special on 5.8.x by conditionally creating a sub UNITCHECK(&); [ 32502] UNITCHECK isn't anything special in 5.8.x, so don't run those tests. [ 32503] Skip the op.t API test as it's not relevant to 5.8.x (%^H propagation). Correct the expectations of hash.t and svsetsv.t for 5.8.x. [ 32507] Test both dMY_CXT and dMY_CXT_INTERP. p4raw-link: @32507 on //depot/blead-maint-fixup/perl: 948cafa0ee2c83e155ea7f64aa3684aa54c83031 p4raw-link: @32503 on //depot/blead-maint-fixup/perl: 0a4679392d1fb21a111f1f0a9e93261b2b2cd4e7 p4raw-link: @32502 on //depot/blead-maint-fixup/perl: cfed56ecfc9c769a0f76147400aa46972ddbb0be p4raw-link: @32501 on //depot/blead-maint-fixup/perl: 8221ebfdedcb3fbfc645196464faaf397ba18800 p4raw-link: @32500 on //depot/blead-maint-fixup/perl: 77ea6e921df11217724b2f5c3c6b6a6ff488ab44 p4raw-link: @32483 on //depot/blead-maint-fixup/perl: 42b4d13769a3b10e7ffb0a3d275d2fdda0245bd5 p4raw-id: //depot/perl@32699 p4raw-integrated: from //depot/blead-maint-fixup/perl@32698 'copy in' ext/XS/APItest/APItest.pm ext/XS/APItest/APItest.xs ext/XS/APItest/t/hash.t ext/XS/APItest/t/my_cxt.t ext/XS/APItest/t/op.t ext/XS/APItest/t/svsetsv.t ext/XS/APItest/t/xs_special_subs.t ext/XS/APItest/t/xs_special_subs_require.t (@32482..) 'merge in' perl.h (@32504..)
Diffstat (limited to 'ext/XS/APItest/t/xs_special_subs.t')
-rw-r--r--ext/XS/APItest/t/xs_special_subs.t48
1 files changed, 27 insertions, 21 deletions
diff --git a/ext/XS/APItest/t/xs_special_subs.t b/ext/XS/APItest/t/xs_special_subs.t
index 9283093ec6..13b0461dd8 100644
--- a/ext/XS/APItest/t/xs_special_subs.t
+++ b/ext/XS/APItest/t/xs_special_subs.t
@@ -16,7 +16,11 @@ BEGIN {
use strict;
use warnings;
-use Test::More tests => 100;
+my $uc;
+BEGIN {
+ $uc = $] > 5.009;
+}
+use Test::More tests => $uc ? 100 : 80;
# Doing this longhand cut&paste makes it clear
# BEGIN and INIT are FIFO, CHECK and END are LIFO
@@ -24,8 +28,10 @@ BEGIN {
print "# First BEGIN\n";
is($XS::APItest::BEGIN_called, undef, "BEGIN not yet called");
is($XS::APItest::BEGIN_called_PP, undef, "BEGIN not yet called");
- is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called");
- is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called");
+ is($XS::APItest::UNITCHECK_called, undef, "UNITCHECK not yet called")
+ if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, undef, "UNITCHECK not yet called")
+ if $uc;
is($XS::APItest::CHECK_called, undef, "CHECK not yet called");
is($XS::APItest::CHECK_called_PP, undef, "CHECK not yet called");
is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -38,8 +44,8 @@ CHECK {
print "# First CHECK\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
- is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
- is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+ is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, 1, "CHECK called");
is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -52,8 +58,8 @@ INIT {
print "# First INIT\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
- is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
- is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+ is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, 1, "CHECK called");
is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -66,8 +72,8 @@ END {
print "# First END\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
- is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
- is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+ is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, 1, "CHECK called");
is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
is($XS::APItest::INIT_called, 1, "INIT called");
@@ -79,8 +85,8 @@ END {
print "# First body\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, 1, "CHECK called");
is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
is($XS::APItest::INIT_called, 1, "INIT called");
@@ -93,8 +99,8 @@ use XS::APItest;
print "# Second body\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
-is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
-is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, 1, "CHECK called");
is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
is($XS::APItest::INIT_called, 1, "INIT called");
@@ -106,8 +112,8 @@ BEGIN {
print "# Second BEGIN\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
- is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
- is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+ is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, undef, "CHECK not yet called");
is($XS::APItest::CHECK_called_PP, undef, "CHECK not yet called");
is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -120,8 +126,8 @@ CHECK {
print "# Second CHECK\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
- is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK yet called");
- is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK yet called");
+ is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK yet called") if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK yet called") if $uc;
is($XS::APItest::CHECK_called, undef, "CHECK not yet called");
is($XS::APItest::CHECK_called_PP, undef, "CHECK not yet called");
is($XS::APItest::INIT_called, undef, "INIT not yet called");
@@ -134,8 +140,8 @@ INIT {
print "# Second INIT\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
- is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
- is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+ is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, 1, "CHECK called");
is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
is($XS::APItest::INIT_called, 1, "INIT called");
@@ -148,8 +154,8 @@ END {
print "# Second END\n";
is($XS::APItest::BEGIN_called, 1, "BEGIN called");
is($XS::APItest::BEGIN_called_PP, 1, "BEGIN called");
- is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called");
- is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called");
+ is($XS::APItest::UNITCHECK_called, 1, "UNITCHECK called") if $uc;
+ is($XS::APItest::UNITCHECK_called_PP, 1, "UNITCHECK called") if $uc;
is($XS::APItest::CHECK_called, 1, "CHECK called");
is($XS::APItest::CHECK_called_PP, 1, "CHECK called");
is($XS::APItest::INIT_called, 1, "INIT called");