summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-11-03 14:57:52 -0700
committerKarl Williamson <khw@cpan.org>2019-11-22 06:49:03 -0700
commit8154c0b1642d2b0fab033464d4ae3fbbba80affc (patch)
treeed3b00375e4f0e3beeb1e02a6be842ffe5b519ba /dist
parentc6e41a0a54eceb66483226532b3eb8e032541e26 (diff)
downloadperl-8154c0b1642d2b0fab033464d4ae3fbbba80affc.tar.gz
D:P: Convert ok() to is()
There are some ok() that need to remain so, but this converts all the ones that are really is() to be that. After this commit, the remaining ok() can have a test description added to them.
Diffstat (limited to 'dist')
-rw-r--r--dist/Devel-PPPort/parts/inc/HvNAME6
-rw-r--r--dist/Devel-PPPort/parts/inc/SvPV108
-rw-r--r--dist/Devel-PPPort/parts/inc/Sv_set28
-rw-r--r--dist/Devel-PPPort/parts/inc/call32
-rw-r--r--dist/Devel-PPPort/parts/inc/cop2
-rw-r--r--dist/Devel-PPPort/parts/inc/exception10
-rw-r--r--dist/Devel-PPPort/parts/inc/format8
-rw-r--r--dist/Devel-PPPort/parts/inc/grok16
-rw-r--r--dist/Devel-PPPort/parts/inc/gv12
-rw-r--r--dist/Devel-PPPort/parts/inc/mPUSH22
-rw-r--r--dist/Devel-PPPort/parts/inc/magic70
-rw-r--r--dist/Devel-PPPort/parts/inc/memory2
-rw-r--r--dist/Devel-PPPort/parts/inc/mess52
-rw-r--r--dist/Devel-PPPort/parts/inc/misc76
-rw-r--r--dist/Devel-PPPort/parts/inc/newCONSTSUB6
-rw-r--r--dist/Devel-PPPort/parts/inc/newRV4
-rw-r--r--dist/Devel-PPPort/parts/inc/newSV_type2
-rw-r--r--dist/Devel-PPPort/parts/inc/newSVpv14
-rw-r--r--dist/Devel-PPPort/parts/inc/ppphtest78
-rw-r--r--dist/Devel-PPPort/parts/inc/pv_tools18
-rw-r--r--dist/Devel-PPPort/parts/inc/pvs22
-rw-r--r--dist/Devel-PPPort/parts/inc/shared_pv2
-rw-r--r--dist/Devel-PPPort/parts/inc/snprintf4
-rw-r--r--dist/Devel-PPPort/parts/inc/sprintf4
-rw-r--r--dist/Devel-PPPort/parts/inc/strlfuncs2
-rw-r--r--dist/Devel-PPPort/parts/inc/sv_xpvf18
-rw-r--r--dist/Devel-PPPort/parts/inc/threads2
-rw-r--r--dist/Devel-PPPort/parts/inc/utf8122
-rw-r--r--dist/Devel-PPPort/parts/inc/uv22
-rw-r--r--dist/Devel-PPPort/parts/inc/variables10
-rw-r--r--dist/Devel-PPPort/parts/inc/warn2
-rw-r--r--dist/Devel-PPPort/t/HvNAME.t6
-rw-r--r--dist/Devel-PPPort/t/SvPV.t108
-rw-r--r--dist/Devel-PPPort/t/Sv_set.t28
-rw-r--r--dist/Devel-PPPort/t/call.t32
-rw-r--r--dist/Devel-PPPort/t/cop.t2
-rw-r--r--dist/Devel-PPPort/t/exception.t10
-rw-r--r--dist/Devel-PPPort/t/format.t8
-rw-r--r--dist/Devel-PPPort/t/grok.t16
-rw-r--r--dist/Devel-PPPort/t/gv.t12
-rw-r--r--dist/Devel-PPPort/t/mPUSH.t20
-rw-r--r--dist/Devel-PPPort/t/magic.t70
-rw-r--r--dist/Devel-PPPort/t/memory.t2
-rw-r--r--dist/Devel-PPPort/t/mess.t52
-rw-r--r--dist/Devel-PPPort/t/misc.t76
-rw-r--r--dist/Devel-PPPort/t/newCONSTSUB.t6
-rw-r--r--dist/Devel-PPPort/t/newRV.t4
-rw-r--r--dist/Devel-PPPort/t/newSV_type.t2
-rw-r--r--dist/Devel-PPPort/t/newSVpv.t14
-rw-r--r--dist/Devel-PPPort/t/ppphtest.t78
-rw-r--r--dist/Devel-PPPort/t/pv_tools.t18
-rw-r--r--dist/Devel-PPPort/t/pvs.t22
-rw-r--r--dist/Devel-PPPort/t/shared_pv.t2
-rw-r--r--dist/Devel-PPPort/t/snprintf.t4
-rw-r--r--dist/Devel-PPPort/t/sprintf.t4
-rw-r--r--dist/Devel-PPPort/t/strlfuncs.t2
-rw-r--r--dist/Devel-PPPort/t/sv_xpvf.t18
-rw-r--r--dist/Devel-PPPort/t/testutil.pl4
-rw-r--r--dist/Devel-PPPort/t/threads.t2
-rw-r--r--dist/Devel-PPPort/t/utf8.t122
-rw-r--r--dist/Devel-PPPort/t/uv.t22
-rw-r--r--dist/Devel-PPPort/t/variables.t10
-rw-r--r--dist/Devel-PPPort/t/warn.t2
63 files changed, 775 insertions, 779 deletions
diff --git a/dist/Devel-PPPort/parts/inc/HvNAME b/dist/Devel-PPPort/parts/inc/HvNAME
index 9fba5029fb..07c84e9ec9 100644
--- a/dist/Devel-PPPort/parts/inc/HvNAME
+++ b/dist/Devel-PPPort/parts/inc/HvNAME
@@ -31,8 +31,8 @@ HvNAMELEN_get(hv)
=tests plan => 4
-ok(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
+is(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
ok(!defined Devel::PPPort::HvNAME_get({}));
-ok(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
-ok(Devel::PPPort::HvNAMELEN_get({}), 0);
+is(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
+is(Devel::PPPort::HvNAMELEN_get({}), 0);
diff --git a/dist/Devel-PPPort/parts/inc/SvPV b/dist/Devel-PPPort/parts/inc/SvPV
index a701ae593b..592f999e56 100644
--- a/dist/Devel-PPPort/parts/inc/SvPV
+++ b/dist/Devel-PPPort/parts/inc/SvPV
@@ -423,70 +423,70 @@ SvPV_renew(sv, nlen, insv)
my $mhx = "mhx";
-ok(&Devel::PPPort::SvPVbyte($mhx), 3);
+is(&Devel::PPPort::SvPVbyte($mhx), 3);
my $i = 42;
-ok(&Devel::PPPort::SvPV_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_const($mhx), $i++);
-ok(&Devel::PPPort::SvPV_mutable($mhx), $i++);
-ok(&Devel::PPPort::SvPV_flags($mhx), $i++);
-ok(&Devel::PPPort::SvPV_flags_const($mhx), $i++);
-
-ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_mutable($mhx), $i++);
-
-ok(&Devel::PPPort::SvPV_force_nomg($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_flags($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++);
-
-ok(&Devel::PPPort::SvPV_nolen_const($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), 0);
+is(&Devel::PPPort::SvPV_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_const($mhx), $i++);
+is(&Devel::PPPort::SvPV_mutable($mhx), $i++);
+is(&Devel::PPPort::SvPV_flags($mhx), $i++);
+is(&Devel::PPPort::SvPV_flags_const($mhx), $i++);
+
+is(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++);
+is(&Devel::PPPort::SvPV_force($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_mutable($mhx), $i++);
+
+is(&Devel::PPPort::SvPV_force_nomg($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_flags($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++);
+
+is(&Devel::PPPort::SvPV_nolen_const($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg_nolen($mhx), 0);
my $str = "";
&Devel::PPPort::SvPV_force($str);
my($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 81, "x"x80);
-ok($str, "x"x80);
-ok($s2, "x"x80);
+is($str, "x"x80);
+is($s2, "x"x80);
ok($before < 81);
-ok($after, 81);
+is($after, 81);
$str = "x"x400;
&Devel::PPPort::SvPV_force($str);
($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 41, "x"x40);
-ok($str, "x"x40);
-ok($s2, "x"x40);
+is($str, "x"x40);
+is($s2, "x"x40);
ok($before > 41);
-ok($after, 41);
+is($after, 41);
diff --git a/dist/Devel-PPPort/parts/inc/Sv_set b/dist/Devel-PPPort/parts/inc/Sv_set
index 5fbd79513f..e8dfe23442 100644
--- a/dist/Devel-PPPort/parts/inc/Sv_set
+++ b/dist/Devel-PPPort/parts/inc/Sv_set
@@ -175,17 +175,17 @@ sv_setsv_compile_test(sv)
=tests plan => 15
my $foo = 5;
-ok(&Devel::PPPort::TestSvUV_set($foo, 12345), 42);
-ok(&Devel::PPPort::TestSvPVX_const("mhx"), 43);
-ok(&Devel::PPPort::TestSvPVX_mutable("mhx"), 44);
+is(&Devel::PPPort::TestSvUV_set($foo, 12345), 42);
+is(&Devel::PPPort::TestSvPVX_const("mhx"), 43);
+is(&Devel::PPPort::TestSvPVX_mutable("mhx"), 44);
my $bar = [];
bless $bar, 'foo';
-ok($bar->x(), 'foobar');
+is($bar->x(), 'foobar');
Devel::PPPort::TestSvSTASH_set($bar, 'bar');
-ok($bar->x(), 'hacker');
+is($bar->x(), 'hacker');
if ( "$]" < '5.007003' ) {
skip 'skip: no SV_NOSTEAL support', 10;
@@ -194,19 +194,19 @@ if ( "$]" < '5.007003' ) {
tie my $scalar, 'TieScalarCounter', 'string';
- ok tied($scalar)->{fetch}, 0;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 0;
+ is tied($scalar)->{store}, 0;
my $copy = Devel::PPPort::newSVsv_nomg($scalar);
- ok tied($scalar)->{fetch}, 0;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 0;
+ is tied($scalar)->{store}, 0;
my $fetch = $scalar;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
my $copy2 = Devel::PPPort::newSVsv_nomg($scalar);
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok $copy2, 'string';
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is $copy2, 'string';
}
package TieScalarCounter;
diff --git a/dist/Devel-PPPort/parts/inc/call b/dist/Devel-PPPort/parts/inc/call
index 678df8cadf..3daf589f47 100644
--- a/dist/Devel-PPPort/parts/inc/call
+++ b/dist/Devel-PPPort/parts/inc/call
@@ -382,12 +382,12 @@ for $test (
ok(eq_array( [ &Devel::PPPort::call_sv_G_METHOD('meth', $flags, $obj, @$args) ], $expected));
};
-ok(&Devel::PPPort::eval_pv('f()', 0), 'y');
-ok(&Devel::PPPort::eval_pv('f(qw(a b c))', 0), 'y');
+is(&Devel::PPPort::eval_pv('f()', 0), 'y');
+is(&Devel::PPPort::eval_pv('f(qw(a b c))', 0), 'y');
-ok(!defined $::{'less::'}, 1, "Hadn't loaded less yet");
+is(!defined $::{'less::'}, 1, "Hadn't loaded less yet");
Devel::PPPort::load_module(0, "less", undef);
-ok(defined $::{'less::'}, 1, "Have now loaded less");
+is(defined $::{'less::'}, 1, "Have now loaded less");
ok(eval { Devel::PPPort::eval_pv('die', 0); 1 });
ok(!eval { Devel::PPPort::eval_pv('die', 1); 1 });
@@ -402,15 +402,15 @@ ok($@ =~ /^string3 at \(eval [0-9]+\) line 1\.\n$/);
if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
my $hashref = { key => 'value' };
- ok(eval { Devel::PPPort::eval_pv('die $hashref', 1); 1 }, undef, 'check plain hashref is rethrown');
- ok(ref($@), 'HASH', 'check $@ is hashref') and
- ok($@->{key}, 'value', 'check $@ hashref has correct value');
+ is(eval { Devel::PPPort::eval_pv('die $hashref', 1); 1 }, undef, 'check plain hashref is rethrown');
+ is(ref($@), 'HASH', 'check $@ is hashref') and
+ is($@->{key}, 'value', 'check $@ hashref has correct value');
my $false = False->new;
ok(!$false);
- ok(eval { Devel::PPPort::eval_pv('die $false', 1); 1 }, undef, 'check false objects are rethrown');
- ok(ref($@), 'False', 'check that $@ contains False object');
- ok("$@", "$false", 'check we got the expected object');
+ is(eval { Devel::PPPort::eval_pv('die $false', 1); 1 }, undef, 'check false objects are rethrown');
+ is(ref($@), 'False', 'check that $@ contains False object');
+ is("$@", "$false", 'check we got the expected object');
} else {
skip 'skip: no support for references in $@', 7;
}
@@ -428,15 +428,15 @@ ok($@ =~ /^string3 at \(eval [0-9]+\) line 1\.\n$/);
if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
my $hashref = { key => 'value' };
- ok(eval { Devel::PPPort::eval_sv('die $hashref', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check plain hashref is rethrown');
- ok(ref($@), 'HASH', 'check $@ is hashref') and
- ok($@->{key}, 'value', 'check $@ hashref has correct value');
+ is(eval { Devel::PPPort::eval_sv('die $hashref', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check plain hashref is rethrown');
+ is(ref($@), 'HASH', 'check $@ is hashref') and
+ is($@->{key}, 'value', 'check $@ hashref has correct value');
my $false = False->new;
ok(!$false);
- ok(eval { Devel::PPPort::eval_sv('die $false', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check false objects are rethrown');
- ok(ref($@), 'False', 'check that $@ contains False object');
- ok("$@", "$false", 'check we got the expected object');
+ is(eval { Devel::PPPort::eval_sv('die $false', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check false objects are rethrown');
+ is(ref($@), 'False', 'check that $@ contains False object');
+ is("$@", "$false", 'check we got the expected object');
} else {
skip 'skip: no support for references in $@', 7;
}
diff --git a/dist/Devel-PPPort/parts/inc/cop b/dist/Devel-PPPort/parts/inc/cop
index e69a17650a..c9a92ea3f7 100644
--- a/dist/Devel-PPPort/parts/inc/cop
+++ b/dist/Devel-PPPort/parts/inc/cop
@@ -175,7 +175,7 @@ my $package;
$package = &Devel::PPPort::CopSTASHPV();
}
print "# $package\n";
-ok($package, "MyPackage");
+is($package, "MyPackage");
my $file = &Devel::PPPort::CopFILE();
print "# $file\n";
diff --git a/dist/Devel-PPPort/parts/inc/exception b/dist/Devel-PPPort/parts/inc/exception
index 8dd21cc70f..e4fa8cec5d 100644
--- a/dist/Devel-PPPort/parts/inc/exception
+++ b/dist/Devel-PPPort/parts/inc/exception
@@ -55,14 +55,14 @@ my $rv;
$Devel::PPPort::exception_caught = undef;
$rv = eval { &Devel::PPPort::exception(0) };
-ok($@, '');
+is($@, '');
ok(defined $rv);
-ok($rv, 42);
-ok($Devel::PPPort::exception_caught, 0);
+is($rv, 42);
+is($Devel::PPPort::exception_caught, 0);
$Devel::PPPort::exception_caught = undef;
$rv = eval { &Devel::PPPort::exception(1) };
-ok($@, "boo\n");
+is($@, "boo\n");
ok(not defined $rv);
-ok($Devel::PPPort::exception_caught, 1);
+is($Devel::PPPort::exception_caught, 1);
diff --git a/dist/Devel-PPPort/parts/inc/format b/dist/Devel-PPPort/parts/inc/format
index 58f2e4c79d..738b703f9f 100644
--- a/dist/Devel-PPPort/parts/inc/format
+++ b/dist/Devel-PPPort/parts/inc/format
@@ -103,8 +103,8 @@ my $num = 1.12345678901234567890;
eval { Devel::PPPort::croak_NVgf($num) };
ok($@ =~ /^1.1234567890/);
-ok(Devel::PPPort::sprintf_iv(-8), 'XX_-8_XX');
-ok(Devel::PPPort::sprintf_uv(15), 'XX_15_XX');
+is(Devel::PPPort::sprintf_iv(-8), 'XX_-8_XX');
+is(Devel::PPPort::sprintf_uv(15), 'XX_15_XX');
my $ivsize = $Config::Config{ivsize};
my $ivmax = ($ivsize == 4) ? '2147483647' : ($ivsize == 8) ? '9223372036854775807' : 0;
@@ -112,6 +112,6 @@ my $uvmax = ($ivsize == 4) ? '4294967295' : ($ivsize == 8) ? '184467440737095516
if ($ivmax == 0) {
skip 'skip: unknown ivsize', 2;
} else {
- ok(Devel::PPPort::sprintf_ivmax(), $ivmax);
- ok(Devel::PPPort::sprintf_uvmax(), $uvmax);
+ is(Devel::PPPort::sprintf_ivmax(), $ivmax);
+ is(Devel::PPPort::sprintf_uvmax(), $uvmax);
}
diff --git a/dist/Devel-PPPort/parts/inc/grok b/dist/Devel-PPPort/parts/inc/grok
index 9ca6627f1a..df73008d0b 100644
--- a/dist/Devel-PPPort/parts/inc/grok
+++ b/dist/Devel-PPPort/parts/inc/grok
@@ -657,14 +657,14 @@ Perl_grok_oct(string)
=tests plan => 10
-ok(&Devel::PPPort::grok_number("42"), 42);
+is(&Devel::PPPort::grok_number("42"), 42);
ok(!defined(&Devel::PPPort::grok_number("A")));
-ok(&Devel::PPPort::grok_bin("10000001"), 129);
-ok(&Devel::PPPort::grok_hex("deadbeef"), 0xdeadbeef);
-ok(&Devel::PPPort::grok_oct("377"), 255);
+is(&Devel::PPPort::grok_bin("10000001"), 129);
+is(&Devel::PPPort::grok_hex("deadbeef"), 0xdeadbeef);
+is(&Devel::PPPort::grok_oct("377"), 255);
-ok(&Devel::PPPort::Perl_grok_number("42"), 42);
+is(&Devel::PPPort::Perl_grok_number("42"), 42);
ok(!defined(&Devel::PPPort::Perl_grok_number("A")));
-ok(&Devel::PPPort::Perl_grok_bin("10000001"), 129);
-ok(&Devel::PPPort::Perl_grok_hex("deadbeef"), 0xdeadbeef);
-ok(&Devel::PPPort::Perl_grok_oct("377"), 255);
+is(&Devel::PPPort::Perl_grok_bin("10000001"), 129);
+is(&Devel::PPPort::Perl_grok_hex("deadbeef"), 0xdeadbeef);
+is(&Devel::PPPort::Perl_grok_oct("377"), 255);
diff --git a/dist/Devel-PPPort/parts/inc/gv b/dist/Devel-PPPort/parts/inc/gv
index c7e6d893e8..6f7119a092 100644
--- a/dist/Devel-PPPort/parts/inc/gv
+++ b/dist/Devel-PPPort/parts/inc/gv
@@ -118,15 +118,15 @@ gv_init_type(namesv, multi, flags)
=tests plan => 7
-ok(Devel::PPPort::GvSVn(), 1);
+is(Devel::PPPort::GvSVn(), 1);
-ok(Devel::PPPort::isGV_with_GP(), 2);
+is(Devel::PPPort::isGV_with_GP(), 2);
-ok(Devel::PPPort::get_cvn_flags(), 3);
+is(Devel::PPPort::get_cvn_flags(), 3);
-ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
+is(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
-ok(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION);
+is(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION);
-ok(Devel::PPPort::gv_init_type("sanity_check", 0, 0), "*main::sanity_check");
+is(Devel::PPPort::gv_init_type("sanity_check", 0, 0), "*main::sanity_check");
ok($::{sanity_check});
diff --git a/dist/Devel-PPPort/parts/inc/mPUSH b/dist/Devel-PPPort/parts/inc/mPUSH
index a17972c708..d1b6d3e6a2 100644
--- a/dist/Devel-PPPort/parts/inc/mPUSH
+++ b/dist/Devel-PPPort/parts/inc/mPUSH
@@ -118,14 +118,14 @@ mXPUSHu()
=tests plan => 10
-ok(join(':', &Devel::PPPort::mPUSHs()), "foo:bar:42");
-ok(join(':', &Devel::PPPort::mPUSHp()), "one:two:three");
-ok(join(':', &Devel::PPPort::mPUSHn()), "0.5:-0.25:0.125");
-ok(join(':', &Devel::PPPort::mPUSHi()), "-1:2:-3");
-ok(join(':', &Devel::PPPort::mPUSHu()), "1:2:3");
-
-ok(join(':', &Devel::PPPort::mXPUSHs()), "foo:bar:42");
-ok(join(':', &Devel::PPPort::mXPUSHp()), "one:two:three");
-ok(join(':', &Devel::PPPort::mXPUSHn()), "0.5:-0.25:0.125");
-ok(join(':', &Devel::PPPort::mXPUSHi()), "-1:2:-3");
-ok(join(':', &Devel::PPPort::mXPUSHu()), "1:2:3");
+is(join(':', &Devel::PPPort::mPUSHs()), "foo:bar:42");
+is(join(':', &Devel::PPPort::mPUSHp()), "one:two:three");
+is(join(':', &Devel::PPPort::mPUSHn()), "0.5:-0.25:0.125");
+is(join(':', &Devel::PPPort::mPUSHi()), "-1:2:-3");
+is(join(':', &Devel::PPPort::mPUSHu()), "1:2:3");
+
+is(join(':', &Devel::PPPort::mXPUSHs()), "foo:bar:42");
+is(join(':', &Devel::PPPort::mXPUSHp()), "one:two:three");
+is(join(':', &Devel::PPPort::mXPUSHn()), "0.5:-0.25:0.125");
+is(join(':', &Devel::PPPort::mXPUSHi()), "-1:2:-3");
+is(join(':', &Devel::PPPort::mXPUSHu()), "1:2:3");
diff --git a/dist/Devel-PPPort/parts/inc/magic b/dist/Devel-PPPort/parts/inc/magic
index 9a4f31af1d..28e161d900 100644
--- a/dist/Devel-PPPort/parts/inc/magic
+++ b/dist/Devel-PPPort/parts/inc/magic
@@ -555,27 +555,27 @@ magic_SvPV_nomg_nolen(sv)
# Find proper magic
ok(my $obj1 = Devel::PPPort->new_with_mg());
-ok(Devel::PPPort::as_string($obj1), 'hello');
+is(Devel::PPPort::as_string($obj1), 'hello');
# Find with no magic
my $obj = bless {}, 'Fake::Class';
-ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
# Find with other magic (not the magic we are looking for)
ok($obj = Devel::PPPort->new_with_other_mg());
-ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
# Okay, attempt to remove magic that isn't there
Devel::PPPort::remove_other_magic($obj1);
-ok(Devel::PPPort::as_string($obj1), 'hello');
+is(Devel::PPPort::as_string($obj1), 'hello');
# Remove magic that IS there
Devel::PPPort::remove_null_magic($obj1);
-ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
# Removing when no magic present
Devel::PPPort::remove_null_magic($obj1);
-ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
use Tie::Hash;
my %h;
@@ -584,34 +584,34 @@ $h{foo} = 'foo';
$h{bar} = '';
&Devel::PPPort::sv_catpv_mg($h{foo}, 'bar');
-ok($h{foo}, 'foobar');
+is($h{foo}, 'foobar');
&Devel::PPPort::sv_catpvn_mg($h{bar}, 'baz');
-ok($h{bar}, 'baz');
+is($h{bar}, 'baz');
&Devel::PPPort::sv_catsv_mg($h{foo}, '42');
-ok($h{foo}, 'foobar42');
+is($h{foo}, 'foobar42');
&Devel::PPPort::sv_setiv_mg($h{bar}, 42);
-ok($h{bar}, 42);
+is($h{bar}, 42);
&Devel::PPPort::sv_setnv_mg($h{PI}, 3.14159);
ok(abs($h{PI} - 3.14159) < 0.01);
&Devel::PPPort::sv_setpv_mg($h{mhx}, 'mhx');
-ok($h{mhx}, 'mhx');
+is($h{mhx}, 'mhx');
&Devel::PPPort::sv_setpvn_mg($h{mhx}, 'Marcus');
-ok($h{mhx}, 'Marcus');
+is($h{mhx}, 'Marcus');
&Devel::PPPort::sv_setsv_mg($h{sv}, 'SV');
-ok($h{sv}, 'SV');
+is($h{sv}, 'SV');
&Devel::PPPort::sv_setuv_mg($h{sv}, 4711);
-ok($h{sv}, 4711);
+is($h{sv}, 4711);
&Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl');
-ok($h{sv}, 'Perl');
+is($h{sv}, 'Perl');
# v1 is treated as a bareword in older perls...
my $ver = do { local $SIG{'__WARN__'} = sub {}; eval qq[v1.2.0] };
@@ -629,30 +629,30 @@ if ( "$]" < '5.007003' ) {
tie my $scalar, 'TieScalarCounter', 10;
my $fetch = $scalar;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvIV_nomg($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvUV_nomg($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvNV_nomg($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvPV_nomg_nolen($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvIV_nomg($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvUV_nomg($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvNV_nomg($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvPV_nomg_nolen($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
ok Devel::PPPort::magic_SvTRUE_nomg($scalar);
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
my $object = OverloadedObject->new('string', 5.5, 0);
- ok Devel::PPPort::magic_SvIV_nomg($object), 5;
- ok Devel::PPPort::magic_SvUV_nomg($object), 5;
- ok Devel::PPPort::magic_SvNV_nomg($object), 5.5;
- ok Devel::PPPort::magic_SvPV_nomg_nolen($object), 'string';
+ is Devel::PPPort::magic_SvIV_nomg($object), 5;
+ is Devel::PPPort::magic_SvUV_nomg($object), 5;
+ is Devel::PPPort::magic_SvNV_nomg($object), 5.5;
+ is Devel::PPPort::magic_SvPV_nomg_nolen($object), 'string';
ok !Devel::PPPort::magic_SvTRUE_nomg($object);
}
diff --git a/dist/Devel-PPPort/parts/inc/memory b/dist/Devel-PPPort/parts/inc/memory
index 9a5425e39e..aa986f5b6a 100644
--- a/dist/Devel-PPPort/parts/inc/memory
+++ b/dist/Devel-PPPort/parts/inc/memory
@@ -82,4 +82,4 @@ checkmem()
=tests plan => 1
-ok(Devel::PPPort::checkmem(), 6);
+is(Devel::PPPort::checkmem(), 6);
diff --git a/dist/Devel-PPPort/parts/inc/mess b/dist/Devel-PPPort/parts/inc/mess
index efad7bbea8..14c7def17a 100644
--- a/dist/Devel-PPPort/parts/inc/mess
+++ b/dist/Devel-PPPort/parts/inc/mess
@@ -327,8 +327,8 @@ my $obj = bless {}, 'Package';
undef $die;
ok !defined eval { Devel::PPPort::croak_sv("\xE1\n") };
-ok $@, "\xE1\n";
-ok $die, "\xE1\n";
+is $@, "\xE1\n";
+is $die, "\xE1\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(10) };
@@ -359,8 +359,8 @@ ok !defined eval {
$@ = "this must be visible\n";
Devel::PPPort::croak_sv($@)
};
-ok $@, "this must be visible\n";
-ok $die, "this must be visible\n";
+is $@, "this must be visible\n";
+is $die, "this must be visible\n";
undef $die;
$@ = 'should not be visible';
@@ -377,13 +377,13 @@ ok !defined eval {
$@ = "this must be visible\n";
Devel::PPPort::croak_sv_errsv()
};
-ok $@, "this must be visible\n";
-ok $die, "this must be visible\n";
+is $@, "this must be visible\n";
+is $die, "this must be visible\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv_with_counter("message\n") };
-ok $@, "message\n";
-ok Devel::PPPort::get_counter(), 1;
+is $@, "message\n";
+is Devel::PPPort::get_counter(), 1;
undef $die;
ok !defined eval { Devel::PPPort::croak_sv('') };
@@ -402,7 +402,7 @@ ok $die =~ /^\xC3\xA1 at \Q$0\E line /;
undef $warn;
Devel::PPPort::warn_sv("\xE1\n");
-ok $warn, "\xE1\n";
+is $warn, "\xE1\n";
undef $warn;
Devel::PPPort::warn_sv(10);
@@ -420,8 +420,8 @@ undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1");
ok $warn =~ /^\xC3\xA1 at \Q$0\E line /;
-ok Devel::PPPort::mess_sv("\xE1\n", 0), "\xE1\n";
-ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1\n"}, 1), "\xE1\n";
+is Devel::PPPort::mess_sv("\xE1\n", 0), "\xE1\n";
+is Devel::PPPort::mess_sv(do {my $tmp = "\xE1\n"}, 1), "\xE1\n";
ok Devel::PPPort::mess_sv(10, 0) =~ /^10 at \Q$0\E line /;
ok Devel::PPPort::mess_sv(do {my $tmp = 10}, 1) =~ /^10 at \Q$0\E line /;
@@ -441,12 +441,12 @@ if ("$]" >= '5.006') {
undef $die;
ok !defined eval { Devel::PPPort::croak_sv("\x{100}\n") };
if ("$]" < '5.007001' || "$]" > '5.007003') {
- ok $@, "\x{100}\n";
+ is $@, "\x{100}\n";
} else {
skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
- ok $die, "\x{100}\n";
+ is $die, "\x{100}\n";
} else {
skip 'skip: broken utf8 support in die hook', 1;
}
@@ -467,7 +467,7 @@ if ("$]" >= '5.006') {
if ("$]" < '5.007001' || "$]" > '5.008') {
undef $warn;
Devel::PPPort::warn_sv("\x{100}\n");
- ok $warn, "\x{100}\n";
+ is $warn, "\x{100}\n";
undef $warn;
Devel::PPPort::warn_sv("\x{100}");
@@ -476,8 +476,8 @@ if ("$]" >= '5.006') {
skip 'skip: broken utf8 support in warn hook', 2;
}
- ok Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
- ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}\n"}, 1), "\x{100}\n";
+ is Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
+ is Devel::PPPort::mess_sv(do {my $tmp = "\x{100}\n"}, 1), "\x{100}\n";
ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at \Q$0\E line /;
ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at \Q$0\E line /;
@@ -493,8 +493,8 @@ if (ord('A') != 65) {
{
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}\n"') };
- ok $@, "\xE1\n";
- ok $die, "\xE1\n";
+ is $@, "\xE1\n";
+ is $die, "\xE1\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}"') };
@@ -505,8 +505,8 @@ if (ord('A') != 65) {
undef $die;
my $expect = eval '"\N{U+C3}\N{U+A1}\n"';
ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1\n") };
- ok $@, $expect;
- ok $die, $expect;
+ is $@, $expect;
+ is $die, $expect;
}
{
@@ -519,7 +519,7 @@ if (ord('A') != 65) {
undef $warn;
Devel::PPPort::warn_sv(eval '"\N{U+E1}\n"');
- ok $warn, "\xE1\n";
+ is $warn, "\xE1\n";
undef $warn;
Devel::PPPort::warn_sv(eval '"\N{U+E1}"');
@@ -527,7 +527,7 @@ if (ord('A') != 65) {
undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1\n");
- ok $warn, eval '"\N{U+C3}\N{U+A1}\n"';
+ is $warn, eval '"\N{U+C3}\N{U+A1}\n"';
undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1");
@@ -537,14 +537,14 @@ if (ord('A') != 65) {
skip 'skip: no support for mess_sv', 8;
}
else {
- ok Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
- ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}\n"'}, 1), eval '"\N{U+E1}\n"';
+ is Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
+ is Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}\n"'}, 1), eval '"\N{U+E1}\n"';
ok Devel::PPPort::mess_sv(eval('"\N{U+E1}"'), 0) =~ eval 'qr/^\N{U+E1} at \Q$0\E line /';
ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}"'}, 1) =~ eval 'qr/^\N{U+E1} at \Q$0\E line /';
- ok Devel::PPPort::mess_sv("\xC3\xA1\n", 0), eval '"\N{U+C3}\N{U+A1}\n"';
- ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1\n"}, 1), eval '"\N{U+C3}\N{U+A1}\n"';
+ is Devel::PPPort::mess_sv("\xC3\xA1\n", 0), eval '"\N{U+C3}\N{U+A1}\n"';
+ is Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1\n"}, 1), eval '"\N{U+C3}\N{U+A1}\n"';
ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
diff --git a/dist/Devel-PPPort/parts/inc/misc b/dist/Devel-PPPort/parts/inc/misc
index f3973f4151..8e695f3d6d 100644
--- a/dist/Devel-PPPort/parts/inc/misc
+++ b/dist/Devel-PPPort/parts/inc/misc
@@ -2530,16 +2530,16 @@ ok(&Devel::PPPort::boolSV(1));
ok(!&Devel::PPPort::boolSV(0));
$_ = "Fred";
-ok(&Devel::PPPort::DEFSV(), "Fred");
-ok(&Devel::PPPort::UNDERBAR(), "Fred");
+is(&Devel::PPPort::DEFSV(), "Fred");
+is(&Devel::PPPort::UNDERBAR(), "Fred");
if (ivers($]) >= ivers(5.9.2) && ivers($]) < ivers(5.23)) {
eval q{
no warnings "deprecated";
no if $^V > v5.17.9, warnings => "experimental::lexical_topic";
my $_ = "Tony";
- ok(&Devel::PPPort::DEFSV(), "Fred");
- ok(&Devel::PPPort::UNDERBAR(), "Tony");
+ is(&Devel::PPPort::DEFSV(), "Fred");
+ is(&Devel::PPPort::UNDERBAR(), "Tony");
};
}
else {
@@ -2550,11 +2550,11 @@ else {
my @r = &Devel::PPPort::DEFSV_modify();
ok(@r == 3);
-ok($r[0], 'Fred');
-ok($r[1], 'DEFSV');
-ok($r[2], 'Fred');
+is($r[0], 'Fred');
+is($r[1], 'DEFSV');
+is($r[2], 'Fred');
-ok(&Devel::PPPort::DEFSV(), "Fred");
+is(&Devel::PPPort::DEFSV(), "Fred");
eval { 1 };
ok(!&Devel::PPPort::ERRSV());
@@ -2585,38 +2585,38 @@ ok(&Devel::PPPort::get_cv('my_cv', 0));
ok(!&Devel::PPPort::get_cv('not_my_cv', 0));
ok(&Devel::PPPort::get_cv('not_my_cv', 1));
-ok(Devel::PPPort::dXSTARG(42), 43);
-ok(Devel::PPPort::dAXMARK(4711), 4710);
+is(Devel::PPPort::dXSTARG(42), 43);
+is(Devel::PPPort::dAXMARK(4711), 4710);
-ok(Devel::PPPort::prepush(), 42);
+is(Devel::PPPort::prepush(), 42);
-ok(join(':', Devel::PPPort::xsreturn(0)), 'test1');
-ok(join(':', Devel::PPPort::xsreturn(1)), 'test1:test2');
+is(join(':', Devel::PPPort::xsreturn(0)), 'test1');
+is(join(':', Devel::PPPort::xsreturn(1)), 'test1:test2');
-ok(Devel::PPPort::PERL_ABS(42), 42);
-ok(Devel::PPPort::PERL_ABS(-13), 13);
+is(Devel::PPPort::PERL_ABS(42), 42);
+is(Devel::PPPort::PERL_ABS(-13), 13);
-ok(Devel::PPPort::SVf(42), ivers($]) >= ivers(5.4) ? '[42]' : '42');
-ok(Devel::PPPort::SVf('abc'), ivers($]) >= ivers(5.4) ? '[abc]' : 'abc');
+is(Devel::PPPort::SVf(42), ivers($]) >= ivers(5.4) ? '[42]' : '42');
+is(Devel::PPPort::SVf('abc'), ivers($]) >= ivers(5.4) ? '[abc]' : 'abc');
-ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
+is(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
-ok(&Devel::PPPort::ptrtests(), 63);
+is(&Devel::PPPort::ptrtests(), 63);
-ok(&Devel::PPPort::OpSIBLING_tests(), 0);
+is(&Devel::PPPort::OpSIBLING_tests(), 0);
if (ivers($]) >= ivers(5.9)) {
eval q{
- ok(&Devel::PPPort::check_HeUTF8("hello"), "norm");
- ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
+ is(&Devel::PPPort::check_HeUTF8("hello"), "norm");
+ is(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
};
} else {
skip("Too early perl version", 2);
}
@r = &Devel::PPPort::check_c_array();
-ok($r[0], 4);
-ok($r[1], "13");
+is($r[0], 4);
+is($r[1], "13");
ok(!Devel::PPPort::SvRXOK(""));
ok(!Devel::PPPort::SvRXOK(bless [], "Regexp"));
@@ -2769,7 +2769,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $eval_string = "Devel::PPPort::is${class}$suffix($hex)";
my $is = eval $eval_string || 0;
die "eval 'For $i: $eval_string' gave $@" if $@;
- ok($is, $should_be, "'$eval_string'");
+ is($is, $should_be, "'$eval_string'");
}
}
@@ -2801,7 +2801,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $eval_string = "$fcn(\"$utf8\", 0)";
my $is = eval $eval_string || 0;
die "eval 'For $i, $eval_string' gave $@" if $@;
- ok($is, $should_be, sprintf("For U+%04X '%s'", $native, $eval_string));
+ is($is, $should_be, sprintf("For U+%04X '%s'", $native, $eval_string));
}
# And for the high code points, test that a too short malformation (the
@@ -2817,7 +2817,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $eval_string = "$fcn(\"$utf8\", -1)";
my $is = eval "no warnings; $eval_string" || 0;
die "eval '$eval_string' gave $@" if $@;
- ok($is, 0, sprintf("For U+%04X '%s'", $native, $eval_string));
+ is($is, 0, sprintf("For U+%04X '%s'", $native, $eval_string));
}
}
}
@@ -2891,15 +2891,15 @@ for $name (keys %case_changing) {
my $ret = eval "Devel::PPPort::$fcn($original)";
my $fail = $@; # Have to save $@, as it gets destroyed
- ok ($fail, "", "$fcn($original) didn't fail");
+ is ($fail, "", "$fcn($original) didn't fail");
my $first = (ivers($]) != ivers(5.6))
? substr($utf8_changed, 0, 1)
: $utf8_changed, 0, 1;
- ok($ret->[0], ord $first,
+ is($ret->[0], ord $first,
"ord of $fcn($original) is $changed");
- ok($ret->[1], $utf8_changed,
+ is($ret->[1], $utf8_changed,
"UTF-8 of of $fcn($original) is correct");
- ok($ret->[2], $should_be_bytes,
+ is($ret->[2], $should_be_bytes,
"Length of $fcn($original) is $should_be_bytes");
}
@@ -2933,19 +2933,19 @@ for $name (keys %case_changing) {
my $ret = eval "no warnings; $eval_string" || 0;
my $fail = $@; # Have to save $@, as it gets destroyed
if ($truncate == 0) {
- ok ($fail, "", "Didn't fail on full length input");
+ is ($fail, "", "Didn't fail on full length input");
my $first = (ivers($]) != ivers(5.6))
? substr($utf8_changed, 0, 1)
: $utf8_changed, 0, 1;
- ok($ret->[0], ord $first,
+ is($ret->[0], ord $first,
"ord of $fcn($original) is $changed");
- ok($ret->[1], $utf8_changed,
+ is($ret->[1], $utf8_changed,
"UTF-8 of of $fcn($original) is correct");
- ok($ret->[2], $should_be_bytes,
+ is($ret->[2], $should_be_bytes,
"Length of $fcn($original) is $should_be_bytes");
}
else {
- ok ($fail, eval 'qr/Malformed UTF-8 character/',
+ is ($fail, eval 'qr/Malformed UTF-8 character/',
"Gave appropriate error for short char: $original");
skip("Expected failure means remaining tests for"
. " this aren't relevant", 3);
@@ -2955,5 +2955,5 @@ for $name (keys %case_changing) {
}
}
-ok(&Devel::PPPort::av_top_index([1,2,3]), 2);
-ok(&Devel::PPPort::av_tindex([1,2,3,4]), 3);
+is(&Devel::PPPort::av_top_index([1,2,3]), 2);
+is(&Devel::PPPort::av_tindex([1,2,3,4]), 3);
diff --git a/dist/Devel-PPPort/parts/inc/newCONSTSUB b/dist/Devel-PPPort/parts/inc/newCONSTSUB
index f5b744d7da..fe0a6ce171 100644
--- a/dist/Devel-PPPort/parts/inc/newCONSTSUB
+++ b/dist/Devel-PPPort/parts/inc/newCONSTSUB
@@ -98,10 +98,10 @@ call_newCONSTSUB_3()
=tests plan => 3
&Devel::PPPort::call_newCONSTSUB_1();
-ok(&Devel::PPPort::test_value_1(), 1);
+is(&Devel::PPPort::test_value_1(), 1);
&Devel::PPPort::call_newCONSTSUB_2();
-ok(&Devel::PPPort::test_value_2(), 2);
+is(&Devel::PPPort::test_value_2(), 2);
&Devel::PPPort::call_newCONSTSUB_3();
-ok(&Devel::PPPort::test_value_3(), 3);
+is(&Devel::PPPort::test_value_3(), 3);
diff --git a/dist/Devel-PPPort/parts/inc/newRV b/dist/Devel-PPPort/parts/inc/newRV
index 739bc21b81..6be9ca55a8 100644
--- a/dist/Devel-PPPort/parts/inc/newRV
+++ b/dist/Devel-PPPort/parts/inc/newRV
@@ -55,5 +55,5 @@ newRV_noinc_REFCNT()
=tests plan => 2
-ok(&Devel::PPPort::newRV_inc_REFCNT, 1);
-ok(&Devel::PPPort::newRV_noinc_REFCNT, 1);
+is(&Devel::PPPort::newRV_inc_REFCNT, 1);
+is(&Devel::PPPort::newRV_noinc_REFCNT, 1);
diff --git a/dist/Devel-PPPort/parts/inc/newSV_type b/dist/Devel-PPPort/parts/inc/newSV_type
index fd462e43bb..4b17419917 100644
--- a/dist/Devel-PPPort/parts/inc/newSV_type
+++ b/dist/Devel-PPPort/parts/inc/newSV_type
@@ -64,4 +64,4 @@ newSV_type()
=tests plan => 1
-ok(Devel::PPPort::newSV_type(), 4);
+is(Devel::PPPort::newSV_type(), 4);
diff --git a/dist/Devel-PPPort/parts/inc/newSVpv b/dist/Devel-PPPort/parts/inc/newSVpv
index daf7c1b263..22e2fb6daa 100644
--- a/dist/Devel-PPPort/parts/inc/newSVpv
+++ b/dist/Devel-PPPort/parts/inc/newSVpv
@@ -70,23 +70,23 @@ newSVpvn_utf8()
my @s = &Devel::PPPort::newSVpvn();
ok(@s == 5);
-ok($s[0], "test");
-ok($s[1], "te");
-ok($s[2], "");
+is($s[0], "test");
+is($s[1], "te");
+is($s[2], "");
ok(!defined($s[3]));
ok(!defined($s[4]));
@s = &Devel::PPPort::newSVpvn_flags();
ok(@s == 5);
-ok($s[0], "test");
-ok($s[1], "te");
-ok($s[2], "");
+is($s[0], "test");
+is($s[1], "te");
+is($s[2], "");
ok(!defined($s[3]));
ok(!defined($s[4]));
@s = &Devel::PPPort::newSVpvn_utf8();
ok(@s == 1);
-ok($s[0], "test");
+is($s[0], "test");
if ("$]" >= 5.008001) {
require utf8;
diff --git a/dist/Devel-PPPort/parts/inc/ppphtest b/dist/Devel-PPPort/parts/inc/ppphtest
index 03c3257bcd..9b13279f92 100644
--- a/dist/Devel-PPPort/parts/inc/ppphtest
+++ b/dist/Devel-PPPort/parts/inc/ppphtest
@@ -57,7 +57,7 @@ END {
ok(&Devel::PPPort::WriteFile("ppport.h"));
# Check GetFileContents()
-ok(-e "ppport.h", 1);
+is(-e "ppport.h", 1);
my $data;
@@ -67,8 +67,8 @@ while(<F>) {
}
close(F);
-ok(Devel::PPPort::GetFileContents("ppport.h"), $data);
-ok(Devel::PPPort::GetFileContents(), $data);
+is(Devel::PPPort::GetFileContents("ppport.h"), $data);
+is(Devel::PPPort::GetFileContents(), $data);
sub comment
{
@@ -166,7 +166,7 @@ for $t (@tests) {
$err =~ s/^/# *** /mg;
print "# *** ERROR ***\n$err\n";
}
- ok($@, '');
+ is($@, '');
for (keys %{$t->{files}}) {
unlink $_ or die "unlink('$_'): $!\n";
@@ -212,8 +212,8 @@ ok($o =~ /^This is.*ppport.*\d+\.\d+(?:_?\d+)?\.$/);
$o = ppport(qw(--nochanges));
ok($o =~ /^Scanning.*test\.xs/mi);
ok($o =~ /Analyzing.*test\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
-ok(matches($o, 'Analyzing', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, 'Analyzing', 'm'), 1);
ok($o =~ /Uses Perl_newSViv instead of newSViv/);
$o = ppport(qw(--quiet --nochanges));
@@ -230,7 +230,7 @@ Perl_newSViv();
my $o = ppport(qw(--copy=a));
ok($o =~ /^Scanning.*MyExt\.xs/mi);
ok($o =~ /Analyzing.*MyExt\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
ok($o =~ /^Needs to include.*ppport\.h/m);
ok($o !~ /^Uses grok_bin/m);
ok($o !~ /^Uses newSVpv/m);
@@ -242,7 +242,7 @@ ok(eq_files('MyExt.xsa', 'MyExt.ra'));
$o = ppport(qw(--copy=b --cplusplus));
ok($o =~ /^Scanning.*MyExt\.xs/mi);
ok($o =~ /Analyzing.*MyExt\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
ok($o =~ /^Needs to include.*ppport\.h/m);
ok($o !~ /^Uses grok_bin/m);
ok($o !~ /^Uses newSVpv/m);
@@ -364,7 +364,7 @@ mXPUSHp(foo);
my $o = ppport(qw(--nochanges));
ok($o =~ /^Scanning.*FooBar\.xs/mi);
ok($o =~ /Analyzing.*FooBar\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
ok($o !~ /^Looks good/m);
ok($o =~ /^Uses grok_bin/m);
@@ -384,7 +384,7 @@ ok($o =~ /Analyzing.*second\.h/mi);
ok($o =~ /^Scanning.*sub.*third\.c/mi);
ok($o =~ /Analyzing.*sub.*third\.c/mi);
ok($o !~ /^Scanning.*foobar/mi);
-ok(matches($o, '^Scanning', 'm'), 3);
+is(matches($o, '^Scanning', 'm'), 3);
---------------------------- First.xs -----------------------------------------
@@ -420,9 +420,9 @@ for (qw(main.xs mod1.c mod2.c mod3.c mod4.c mod5.c)) {
ok($o =~ /^Scanning.*\Q$_\E/mi);
ok($o =~ /Analyzing.*\Q$_\E/i);
}
-ok(matches($o, '^Scanning', 'm'), 6);
+is(matches($o, '^Scanning', 'm'), 6);
-ok(matches($o, '^Writing copy of', 'm'), 5);
+is(matches($o, '^Writing copy of', 'm'), 5);
ok(!-e "mod5.cf");
for (qw(main.xs mod1.c mod2.c mod3.c mod4.c)) {
@@ -631,7 +631,7 @@ SvPVutf8_force();
my $o = ppport(qw(--nochanges));
ok($o !~ /potentially required change/);
-ok(matches($o, '^Looks good', 'm'), 2);
+is(matches($o, '^Looks good', 'm'), 2);
---------------------------- FooBar.xs ----------------------------------------
@@ -654,20 +654,20 @@ call_pv();
my $o = ppport(qw(--api-info=INT2PTR));
my %found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
-ok(scalar keys %found, 1, "found 1 key");
+is(scalar keys %found, 1, "found 1 key");
ok(exists $found{INT2PTR});
-ok(matches($o, '^Supported at least since perl-5\.6\.0', 'm'), 1, "INT2PTR supported without ppport.h to 5.6.0");
-ok(matches($o, '^ppport.h additionally provides support at least back to perl-5\.003', 'm'), 1, "INT2PTR supported with ppport.h to 5.003");
+is(matches($o, '^Supported at least since perl-5\.6\.0', 'm'), 1, "INT2PTR supported without ppport.h to 5.6.0");
+is(matches($o, '^ppport.h additionally provides support at least back to perl-5\.003', 'm'), 1, "INT2PTR supported with ppport.h to 5.003");
$o = ppport(qw(--api-info=Zero));
%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
-ok(scalar keys %found, 1, "found 1 key");
+is(scalar keys %found, 1, "found 1 key");
ok(exists $found{Zero});
-ok(matches($o, '^Supported at least since perl-5.003', 'm'), 1, "Zero supported to 5.003");
+is(matches($o, '^Supported at least since perl-5.003', 'm'), 1, "Zero supported to 5.003");
$o = ppport(qw(--api-info=/Zero/));
%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
-ok(scalar keys %found, 2, "found 2 keys");
+is(scalar keys %found, 2, "found 2 keys");
ok(exists $found{Zero});
ok(exists $found{ZeroD});
@@ -684,32 +684,32 @@ for (@o) {
$p{$name} = defined $flags ? { map { ($_ => 1) } $flags =~ /(\w+)/g } : '';
}
ok(@o > 100);
-ok($fail, 0);
+is($fail, 0);
ok(exists $p{call_pv});
ok(not ref $p{call_pv});
ok(exists $p{grok_bin});
-ok(ref $p{grok_bin}, 'HASH');
-ok(scalar keys %{$p{grok_bin}}, 2);
+is(ref $p{grok_bin}, 'HASH');
+is(scalar keys %{$p{grok_bin}}, 2);
ok($p{grok_bin}{explicit});
ok($p{grok_bin}{depend});
ok(exists $p{gv_stashpvn});
-ok(ref $p{gv_stashpvn}, 'HASH');
-ok(scalar keys %{$p{gv_stashpvn}}, 2);
+is(ref $p{gv_stashpvn}, 'HASH');
+is(scalar keys %{$p{gv_stashpvn}}, 2);
ok($p{gv_stashpvn}{depend});
ok($p{gv_stashpvn}{hint});
ok(exists $p{sv_catpvf_mg});
-ok(ref $p{sv_catpvf_mg}, 'HASH');
-ok(scalar keys %{$p{sv_catpvf_mg}}, 2);
+is(ref $p{sv_catpvf_mg}, 'HASH');
+is(scalar keys %{$p{sv_catpvf_mg}}, 2);
ok($p{sv_catpvf_mg}{explicit});
ok($p{sv_catpvf_mg}{depend});
ok(exists $p{PL_signals});
-ok(ref $p{PL_signals}, 'HASH');
-ok(scalar keys %{$p{PL_signals}}, 1);
+is(ref $p{PL_signals}, 'HASH');
+is(scalar keys %{$p{PL_signals}}, 1);
ok($p{PL_signals}{explicit});
===============================================================================
@@ -725,13 +725,13 @@ for (@o) {
$p{$name} = $ver;
}
ok(@o > 100);
-ok($fail, 0);
+is($fail, 0);
ok(exists $p{utf8_distance});
-ok($p{utf8_distance}, '5.6.0');
+is($p{utf8_distance}, '5.6.0');
ok(exists $p{save_generic_svref});
-ok($p{save_generic_svref}, '5.005_03');
+is($p{save_generic_svref}, '5.005_03');
===============================================================================
@@ -740,17 +740,17 @@ ok($p{save_generic_svref}, '5.005_03');
my $o = ppport(qw(--nochanges));
ok($o =~ /^Scanning.*foo\.cpp/mi);
ok($o =~ /Analyzing.*foo\.cpp/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
-ok(matches($o, 'Analyzing', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, 'Analyzing', 'm'), 1);
$o = ppport(qw(--nochanges foo.cpp foo.o Makefile.PL));
ok($o =~ /Skipping the following files \(use --nofilter to avoid this\):/m);
-ok(matches($o, '^\|\s+foo\.o', 'mi'), 1);
-ok(matches($o, '^\|\s+Makefile\.PL', 'mi'), 1);
+is(matches($o, '^\|\s+foo\.o', 'mi'), 1);
+is(matches($o, '^\|\s+Makefile\.PL', 'mi'), 1);
ok($o =~ /^Scanning.*foo\.cpp/mi);
ok($o =~ /Analyzing.*foo\.cpp/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
-ok(matches($o, 'Analyzing', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, 'Analyzing', 'm'), 1);
$o = ppport(qw(--nochanges --nofilter foo.cpp foo.o Makefile.PL));
ok($o =~ /^Scanning.*foo\.cpp/mi);
@@ -759,8 +759,8 @@ ok($o =~ /^Scanning.*foo\.o/mi);
ok($o =~ /Analyzing.*foo\.o/mi);
ok($o =~ /^Scanning.*Makefile/mi);
ok($o =~ /Analyzing.*Makefile/mi);
-ok(matches($o, '^Scanning', 'm'), 3);
-ok(matches($o, 'Analyzing', 'm'), 3);
+is(matches($o, '^Scanning', 'm'), 3);
+is(matches($o, 'Analyzing', 'm'), 3);
---------------------------- foo.cpp ------------------------------------------
diff --git a/dist/Devel-PPPort/parts/inc/pv_tools b/dist/Devel-PPPort/parts/inc/pv_tools
index 31b330efef..c523d1c59a 100644
--- a/dist/Devel-PPPort/parts/inc/pv_tools
+++ b/dist/Devel-PPPort/parts/inc/pv_tools
@@ -257,18 +257,18 @@ ok($uni ? "$]" >= 5.006 : "$]" < 5.008);
my @r;
@r = &Devel::PPPort::pv_pretty();
-ok($r[0], $r[1]);
-ok($r[0], "foobarbaz");
-ok($r[2], $r[3]);
-ok($r[2], '<leftpv_p\retty\nright>');
-ok($r[4], $r[5]);
+is($r[0], $r[1]);
+is($r[0], "foobarbaz");
+is($r[2], $r[3]);
+is($r[2], '<leftpv_p\retty\nright>');
+is($r[4], $r[5]);
if(ord("A") == 65) {
is($r[4], $uni ? 'N\375 Batter\355' : 'N\303\275 Batter\303');
}
else {
skip("Skip for non-ASCII platform");
}
-ok($r[6], $r[7]);
+is($r[6], $r[7]);
if(ord("A") == 65) {
is($r[6], $uni ? '\301g\346tis Byrju...' : '\303\201g\303\246t...');
}
@@ -277,8 +277,8 @@ else {
}
@r = &Devel::PPPort::pv_display();
-ok($r[0], $r[1]);
-ok($r[0], '"foob\0rbaz"\0');
-ok($r[2], $r[3]);
+is($r[0], $r[1]);
+is($r[0], '"foob\0rbaz"\0');
+is($r[2], $r[3]);
ok($r[2] eq '"pv_di"...\0' ||
$r[2] eq '"pv_d"...\0'); # some perl implementations are broken... :(
diff --git a/dist/Devel-PPPort/parts/inc/pvs b/dist/Devel-PPPort/parts/inc/pvs
index b1be87b26b..5720df31ee 100644
--- a/dist/Devel-PPPort/parts/inc/pvs
+++ b/dist/Devel-PPPort/parts/inc/pvs
@@ -132,23 +132,23 @@ OUTPUT:
my $x = 'foo';
-ok(Devel::PPPort::newSVpvs(), "newSVpvs");
-ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags");
-ok(Devel::PPPort::newSVpvs_share(), 3);
+is(Devel::PPPort::newSVpvs(), "newSVpvs");
+is(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags");
+is(Devel::PPPort::newSVpvs_share(), 3);
Devel::PPPort::sv_catpvs($x);
-ok($x, "foosv_catpvs");
+is($x, "foosv_catpvs");
Devel::PPPort::sv_setpvs($x);
-ok($x, "sv_setpvs");
+is($x, "sv_setpvs");
my %h = ('hv_fetchs' => 42);
Devel::PPPort::hv_stores(\%h, 4711);
-ok(scalar keys %h, 2);
+is(scalar keys %h, 2);
ok(exists $h{'hv_stores'});
-ok($h{'hv_stores'}, 4711);
-ok(Devel::PPPort::hv_fetchs(\%h), 42);
-ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION);
-ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::);
+is($h{'hv_stores'}, 4711);
+is(Devel::PPPort::hv_fetchs(\%h), 42);
+is(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION);
+is(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::);
-ok(Devel::PPPort::get_cvs(), 3);
+is(Devel::PPPort::get_cvs(), 3);
diff --git a/dist/Devel-PPPort/parts/inc/shared_pv b/dist/Devel-PPPort/parts/inc/shared_pv
index 531f169e7f..6f87cf1df9 100644
--- a/dist/Devel-PPPort/parts/inc/shared_pv
+++ b/dist/Devel-PPPort/parts/inc/shared_pv
@@ -87,4 +87,4 @@ newSVpvn_share()
=tests plan => 1
-ok(&Devel::PPPort::newSVpvn_share(), 6);
+is(&Devel::PPPort::newSVpvn_share(), 6);
diff --git a/dist/Devel-PPPort/parts/inc/snprintf b/dist/Devel-PPPort/parts/inc/snprintf
index b700d8b8ef..f89abac063 100644
--- a/dist/Devel-PPPort/parts/inc/snprintf
+++ b/dist/Devel-PPPort/parts/inc/snprintf
@@ -59,5 +59,5 @@ my_snprintf()
=tests plan => 2
my($l, $s) = Devel::PPPort::my_snprintf();
-ok($l, 8);
-ok($s, "foobar42");
+is($l, 8);
+is($s, "foobar42");
diff --git a/dist/Devel-PPPort/parts/inc/sprintf b/dist/Devel-PPPort/parts/inc/sprintf
index e11bf3aa1d..e6f7390c07 100644
--- a/dist/Devel-PPPort/parts/inc/sprintf
+++ b/dist/Devel-PPPort/parts/inc/sprintf
@@ -57,5 +57,5 @@ my_sprintf()
=tests plan => 2
my($l, $s) = Devel::PPPort::my_sprintf();
-ok($l, 8);
-ok($s, "foobar42");
+is($l, 8);
+is($s, "foobar42");
diff --git a/dist/Devel-PPPort/parts/inc/strlfuncs b/dist/Devel-PPPort/parts/inc/strlfuncs
index 82b5e43541..b58d5e0103 100644
--- a/dist/Devel-PPPort/parts/inc/strlfuncs
+++ b/dist/Devel-PPPort/parts/inc/strlfuncs
@@ -103,5 +103,5 @@ my @r = Devel::PPPort::my_strlfunc();
ok(@e == @r);
for (0 .. $#e) {
- ok($r[$_], $e[$_]);
+ is($r[$_], $e[$_]);
}
diff --git a/dist/Devel-PPPort/parts/inc/sv_xpvf b/dist/Devel-PPPort/parts/inc/sv_xpvf
index b2560ab869..c71e805004 100644
--- a/dist/Devel-PPPort/parts/inc/sv_xpvf
+++ b/dist/Devel-PPPort/parts/inc/sv_xpvf
@@ -283,24 +283,24 @@ tie %h, 'Tie::StdHash';
$h{foo} = 'foo-';
$h{bar} = '';
-ok(&Devel::PPPort::vnewSVpvf(), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
-ok(&Devel::PPPort::sv_vcatpvf('1-2-3-'), "$]" >= 5.004 ? '1-2-3-Perl-42' : '1-2-3-%s-%d');
-ok(&Devel::PPPort::sv_vsetpvf('1-2-3-'), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
+is(&Devel::PPPort::vnewSVpvf(), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
+is(&Devel::PPPort::sv_vcatpvf('1-2-3-'), "$]" >= 5.004 ? '1-2-3-Perl-42' : '1-2-3-%s-%d');
+is(&Devel::PPPort::sv_vsetpvf('1-2-3-'), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
&Devel::PPPort::sv_catpvf_mg($h{foo});
-ok($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42' : 'foo-');
+is($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42' : 'foo-');
&Devel::PPPort::Perl_sv_catpvf_mg($h{foo});
-ok($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43' : 'foo-');
+is($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43' : 'foo-');
&Devel::PPPort::sv_catpvf_mg_nocontext($h{foo});
-ok($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43-Perl-44' : 'foo-');
+is($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43-Perl-44' : 'foo-');
&Devel::PPPort::sv_setpvf_mg($h{bar});
-ok($h{bar}, "$]" >= 5.004 ? 'mhx-42' : '');
+is($h{bar}, "$]" >= 5.004 ? 'mhx-42' : '');
&Devel::PPPort::Perl_sv_setpvf_mg($h{bar});
-ok($h{bar}, "$]" >= 5.004 ? 'foo-43' : '');
+is($h{bar}, "$]" >= 5.004 ? 'foo-43' : '');
&Devel::PPPort::sv_setpvf_mg_nocontext($h{bar});
-ok($h{bar}, "$]" >= 5.004 ? 'bar-44' : '');
+is($h{bar}, "$]" >= 5.004 ? 'bar-44' : '');
diff --git a/dist/Devel-PPPort/parts/inc/threads b/dist/Devel-PPPort/parts/inc/threads
index 64f22e90c5..786b72936c 100644
--- a/dist/Devel-PPPort/parts/inc/threads
+++ b/dist/Devel-PPPort/parts/inc/threads
@@ -77,6 +77,6 @@ with_THX_arg(error)
=tests plan => 2
-ok(&Devel::PPPort::no_THX_arg("42"), 43);
+is(&Devel::PPPort::no_THX_arg("42"), 43);
eval { &Devel::PPPort::with_THX_arg("yes\n"); };
ok($@ =~ /^yes/);
diff --git a/dist/Devel-PPPort/parts/inc/utf8 b/dist/Devel-PPPort/parts/inc/utf8
index 2821ba7f3b..ee30dc5ecf 100644
--- a/dist/Devel-PPPort/parts/inc/utf8
+++ b/dist/Devel-PPPort/parts/inc/utf8
@@ -645,15 +645,15 @@ if ("$]" <= '5.006' || "$]" == '5.007' ) {
exit;
}
-ok(&Devel::PPPort::UTF8_SAFE_SKIP("A", 0), 1);
-ok(&Devel::PPPort::UTF8_SAFE_SKIP("A", -1), 0);
+is(&Devel::PPPort::UTF8_SAFE_SKIP("A", 0), 1);
+is(&Devel::PPPort::UTF8_SAFE_SKIP("A", -1), 0);
-ok(&Devel::PPPort::isUTF8_CHAR("A", -1), 0);
-ok(&Devel::PPPort::isUTF8_CHAR("A", 0), 1);
-ok(&Devel::PPPort::isUTF8_CHAR("\x{100}", -1), 0);
-ok(&Devel::PPPort::isUTF8_CHAR("\x{100}", 0), 2);
+is(&Devel::PPPort::isUTF8_CHAR("A", -1), 0);
+is(&Devel::PPPort::isUTF8_CHAR("A", 0), 1);
+is(&Devel::PPPort::isUTF8_CHAR("\x{100}", -1), 0);
+is(&Devel::PPPort::isUTF8_CHAR("\x{100}", 0), 2);
-ok(&Devel::PPPort::UVCHR_IS_INVARIANT(ord("A")), 1);
+is(&Devel::PPPort::UVCHR_IS_INVARIANT(ord("A")), 1);
ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0xb6));
ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0x100));
@@ -661,19 +661,19 @@ if ("$]" < '5.006') {
skip("Perl version too early", 9);
}
else {
- ok(&Devel::PPPort::UVCHR_SKIP(ord("A")), 1);
- ok(&Devel::PPPort::UVCHR_SKIP(0xb6), 2, "This is a test");
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FF), 2);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFF), 3);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFF), 4);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFFF), 5);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFFFF), ord("A") == 65 ? 5 : 6);
- ok(&Devel::PPPort::UVCHR_SKIP(0x4000000), ord("A") == 65 ? 6 : 7);
+ is(&Devel::PPPort::UVCHR_SKIP(ord("A")), 1);
+ is(&Devel::PPPort::UVCHR_SKIP(0xb6), 2, "This is a test");
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FF), 2);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFF), 3);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFFF), 4);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFFFF), 5);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFFFFF), ord("A") == 65 ? 5 : 6);
+ is(&Devel::PPPort::UVCHR_SKIP(0x4000000), ord("A") == 65 ? 6 : 7);
if (ord("A") != 65) {
skip("Test not valid on EBCDIC", 1)
}
else {
- ok(&Devel::PPPort::UVCHR_SKIP(0xFFFFFFFF), 7);
+ is(&Devel::PPPort::UVCHR_SKIP(0xFFFFFFFF), 7);
}
}
@@ -681,34 +681,34 @@ if ("$]" < '5.008') {
skip("Perl version too early", 3);
}
else {
- ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{101}", 3, 1), 1);
- ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{102}", 3, 1), 0);
- ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "b\x{101}", 3, 1), 0);
+ is(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{101}", 3, 1), 1);
+ is(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{102}", 3, 1), 0);
+ is(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "b\x{101}", 3, 1), 0);
}
my $ret = &Devel::PPPort::utf8_to_uvchr("A");
-ok($ret->[0], ord("A"));
-ok($ret->[1], 1);
+is($ret->[0], ord("A"));
+is($ret->[1], 1);
$ret = &Devel::PPPort::utf8_to_uvchr("\0");
-ok($ret->[0], 0);
-ok($ret->[1], 1);
+is($ret->[0], 0);
+is($ret->[1], 1);
$ret = &Devel::PPPort::utf8_to_uvchr_buf("A", 0);
-ok($ret->[0], ord("A"));
-ok($ret->[1], 1);
+is($ret->[0], ord("A"));
+is($ret->[1], 1);
$ret = &Devel::PPPort::utf8_to_uvchr_buf("\0", 0);
-ok($ret->[0], 0);
-ok($ret->[1], 1);
+is($ret->[0], 0);
+is($ret->[1], 1);
if (ord("A") != 65) { # tests not valid for EBCDIC
skip("Perl version too early", 1 .. (2 + 4 + (7 * 5)));
}
else {
$ret = &Devel::PPPort::utf8_to_uvchr_buf("\xc4\x80", 0);
- ok($ret->[0], 0x100);
- ok($ret->[1], 2);
+ is($ret->[0], 0x100);
+ is($ret->[1], 2);
my @warnings;
local $SIG{__WARN__} = sub { push @warnings, @_; };
@@ -716,13 +716,13 @@ else {
{
BEGIN { 'warnings'->import('utf8') if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr("\xe0\0\x80");
- ok($ret->[0], 0);
- ok($ret->[1], -1);
+ is($ret->[0], 0);
+ is($ret->[1], -1);
BEGIN { 'warnings'->unimport() if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr("\xe0\0\x80");
- ok($ret->[0], 0xFFFD);
- ok($ret->[1], 1);
+ is($ret->[0], 0xFFFD);
+ is($ret->[1], 1);
}
my @buf_tests = (
@@ -795,18 +795,18 @@ else {
undef @warnings;
BEGIN { 'warnings'->import('utf8') if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr_buf($input, $adjustment);
- ok($ret->[0], 0, "returned value $display; warnings enabled");
- ok($ret->[1], -1, "returned length $display; warnings enabled");
+ is($ret->[0], 0, "returned value $display; warnings enabled");
+ is($ret->[1], -1, "returned length $display; warnings enabled");
my $all_warnings = join "; ", @warnings;
my $contains = grep { $_ =~ $warning } $all_warnings;
- ok($contains, 1, $display
+ is($contains, 1, $display
. "; Got: '$all_warnings', which should contain '$warning'");
undef @warnings;
BEGIN { 'warnings'->unimport('utf8') if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr_buf($input, $adjustment);
- ok($ret->[0], 0xFFFD, "returned value $display; warnings disabled");
- ok($ret->[1], $test->{'no_warnings_returned_length'},
+ is($ret->[0], 0xFFFD, "returned value $display; warnings disabled");
+ is($ret->[1], $test->{'no_warnings_returned_length'},
"returned length $display; warnings disabled");
}
}
@@ -814,38 +814,38 @@ else {
if ("$]" ge '5.008') {
BEGIN { if ("$]" ge '5.008') { require utf8; "utf8"->import() } }
- ok(Devel::PPPort::sv_len_utf8("aščť"), 4);
- ok(Devel::PPPort::sv_len_utf8_nomg("aščť"), 4);
+ is(Devel::PPPort::sv_len_utf8("aščť"), 4);
+ is(Devel::PPPort::sv_len_utf8_nomg("aščť"), 4);
my $str = "áíé";
utf8::downgrade($str);
- ok(Devel::PPPort::sv_len_utf8($str), 3);
+ is(Devel::PPPort::sv_len_utf8($str), 3);
utf8::downgrade($str);
- ok(Devel::PPPort::sv_len_utf8_nomg($str), 3);
+ is(Devel::PPPort::sv_len_utf8_nomg($str), 3);
utf8::upgrade($str);
- ok(Devel::PPPort::sv_len_utf8($str), 3);
+ is(Devel::PPPort::sv_len_utf8($str), 3);
utf8::upgrade($str);
- ok(Devel::PPPort::sv_len_utf8_nomg($str), 3);
+ is(Devel::PPPort::sv_len_utf8_nomg($str), 3);
tie my $scalar, 'TieScalarCounter', "é";
- ok(tied($scalar)->{fetch}, 0);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8($scalar), 2);
- ok(tied($scalar)->{fetch}, 1);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8($scalar), 3);
- ok(tied($scalar)->{fetch}, 2);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8($scalar), 4);
- ok(tied($scalar)->{fetch}, 3);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
- ok(tied($scalar)->{fetch}, 3);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
- ok(tied($scalar)->{fetch}, 3);
- ok(tied($scalar)->{store}, 0);
+ is(tied($scalar)->{fetch}, 0);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8($scalar), 2);
+ is(tied($scalar)->{fetch}, 1);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8($scalar), 3);
+ is(tied($scalar)->{fetch}, 2);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8($scalar), 4);
+ is(tied($scalar)->{fetch}, 3);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
+ is(tied($scalar)->{fetch}, 3);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
+ is(tied($scalar)->{fetch}, 3);
+ is(tied($scalar)->{store}, 0);
} else {
skip 'skip: no SV_NOSTEAL support', 23;
}
diff --git a/dist/Devel-PPPort/parts/inc/uv b/dist/Devel-PPPort/parts/inc/uv
index c1948c39a3..96145e6833 100644
--- a/dist/Devel-PPPort/parts/inc/uv
+++ b/dist/Devel-PPPort/parts/inc/uv
@@ -154,14 +154,14 @@ my_strnlen(s, max)
BEGIN { require warnings if "$]" > '5.006' }
-ok(&Devel::PPPort::sv_setuv(42), 42);
-ok(&Devel::PPPort::newSVuv(123), 123);
-ok(&Devel::PPPort::sv_2uv("4711"), 4711);
-ok(&Devel::PPPort::sv_2uv("1735928559"), 1735928559);
-ok(&Devel::PPPort::SvUVx("1735928559"), 1735928559);
-ok(&Devel::PPPort::SvUVx(1735928559), 1735928559);
-ok(&Devel::PPPort::SvUVx(0xdeadbeef), 0xdeadbeef);
-ok(&Devel::PPPort::XSRETURN_UV(), 42);
-ok(&Devel::PPPort::PUSHu(), 42);
-ok(&Devel::PPPort::XPUSHu(), 43);
-ok(&Devel::PPPort::my_strnlen("abc\0def", 7), 3);
+is(&Devel::PPPort::sv_setuv(42), 42);
+is(&Devel::PPPort::newSVuv(123), 123);
+is(&Devel::PPPort::sv_2uv("4711"), 4711);
+is(&Devel::PPPort::sv_2uv("1735928559"), 1735928559);
+is(&Devel::PPPort::SvUVx("1735928559"), 1735928559);
+is(&Devel::PPPort::SvUVx(1735928559), 1735928559);
+is(&Devel::PPPort::SvUVx(0xdeadbeef), 0xdeadbeef);
+is(&Devel::PPPort::XSRETURN_UV(), 42);
+is(&Devel::PPPort::PUSHu(), 42);
+is(&Devel::PPPort::XPUSHu(), 43);
+is(&Devel::PPPort::my_strnlen("abc\0def", 7), 3);
diff --git a/dist/Devel-PPPort/parts/inc/variables b/dist/Devel-PPPort/parts/inc/variables
index 9a6df02e92..0165a656a5 100644
--- a/dist/Devel-PPPort/parts/inc/variables
+++ b/dist/Devel-PPPort/parts/inc/variables
@@ -440,13 +440,13 @@ ok(Devel::PPPort::compare_PL_signals());
ok(!defined(&Devel::PPPort::PL_sv_undef()));
ok(&Devel::PPPort::PL_sv_yes());
ok(!&Devel::PPPort::PL_sv_no());
-ok(&Devel::PPPort::PL_na("abcd"), 4);
-ok(&Devel::PPPort::PL_Sv(), "mhx");
+is(&Devel::PPPort::PL_na("abcd"), 4);
+is(&Devel::PPPort::PL_Sv(), "mhx");
ok(defined &Devel::PPPort::PL_tokenbuf());
ok("$]" >= 5.009005 || &Devel::PPPort::PL_parser());
ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/);
ok(defined &Devel::PPPort::PL_hints());
-ok(&Devel::PPPort::PL_ppaddr("mhx"), "MHX");
+is(&Devel::PPPort::PL_ppaddr("mhx"), "MHX");
for (&Devel::PPPort::other_variables()) {
ok($_ != 0);
@@ -472,7 +472,7 @@ for (&Devel::PPPort::other_variables()) {
else {
ok(@w == 0);
}
- ok($fail, 0);
+ is($fail, 0);
}
ok(&Devel::PPPort::no_dummy_parser_vars(1) >= ("$]" < 5.009005 ? 1 : 0));
@@ -480,7 +480,7 @@ ok(&Devel::PPPort::no_dummy_parser_vars(1) >= ("$]" < 5.009005 ? 1 : 0));
eval { &Devel::PPPort::no_dummy_parser_vars(0) };
if ("$]" < 5.009005) {
- ok($@, '');
+ is($@, '');
}
else {
if ($@) {
diff --git a/dist/Devel-PPPort/parts/inc/warn b/dist/Devel-PPPort/parts/inc/warn
index b4a5695f8f..32c772ea2a 100644
--- a/dist/Devel-PPPort/parts/inc/warn
+++ b/dist/Devel-PPPort/parts/inc/warn
@@ -159,7 +159,7 @@ ok("$]" >= 5.004 ? $warning =~ /^Perl_warner_nocontext bar:42/ : $warning eq '')
$warning = '';
Devel::PPPort::ckWARN();
-ok($warning, '');
+is($warning, '');
$^W = 1;
diff --git a/dist/Devel-PPPort/t/HvNAME.t b/dist/Devel-PPPort/t/HvNAME.t
index f4dee5fd34..f0212e0451 100644
--- a/dist/Devel-PPPort/t/HvNAME.t
+++ b/dist/Devel-PPPort/t/HvNAME.t
@@ -52,9 +52,9 @@ bootstrap Devel::PPPort;
package main;
-ok(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
+is(Devel::PPPort::HvNAME_get(\%Devel::PPPort::), 'Devel::PPPort');
ok(!defined Devel::PPPort::HvNAME_get({}));
-ok(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
-ok(Devel::PPPort::HvNAMELEN_get({}), 0);
+is(Devel::PPPort::HvNAMELEN_get(\%Devel::PPPort::), length('Devel::PPPort'));
+is(Devel::PPPort::HvNAMELEN_get({}), 0);
diff --git a/dist/Devel-PPPort/t/SvPV.t b/dist/Devel-PPPort/t/SvPV.t
index 28d570e225..7da38e2545 100644
--- a/dist/Devel-PPPort/t/SvPV.t
+++ b/dist/Devel-PPPort/t/SvPV.t
@@ -54,71 +54,71 @@ package main;
my $mhx = "mhx";
-ok(&Devel::PPPort::SvPVbyte($mhx), 3);
+is(&Devel::PPPort::SvPVbyte($mhx), 3);
my $i = 42;
-ok(&Devel::PPPort::SvPV_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_const($mhx), $i++);
-ok(&Devel::PPPort::SvPV_mutable($mhx), $i++);
-ok(&Devel::PPPort::SvPV_flags($mhx), $i++);
-ok(&Devel::PPPort::SvPV_flags_const($mhx), $i++);
-
-ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_mutable($mhx), $i++);
-
-ok(&Devel::PPPort::SvPV_force_nomg($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_flags($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++);
-
-ok(&Devel::PPPort::SvPV_nolen_const($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
-ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_const($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_mutable($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const($mhx), 2);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
-
-$mhx = 42; ok(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
-$mhx = 42; ok(&Devel::PPPort::SvPV_nomg_nolen($mhx), 0);
+is(&Devel::PPPort::SvPV_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_const($mhx), $i++);
+is(&Devel::PPPort::SvPV_mutable($mhx), $i++);
+is(&Devel::PPPort::SvPV_flags($mhx), $i++);
+is(&Devel::PPPort::SvPV_flags_const($mhx), $i++);
+
+is(&Devel::PPPort::SvPV_flags_const_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_flags_mutable($mhx), $i++);
+is(&Devel::PPPort::SvPV_force($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_mutable($mhx), $i++);
+
+is(&Devel::PPPort::SvPV_force_nomg($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_flags($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_flags_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_force_flags_mutable($mhx), $i++);
+
+is(&Devel::PPPort::SvPV_nolen_const($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg_const($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), $i++);
+is(&Devel::PPPort::SvPV_nomg_nolen($mhx), $i++);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_const($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_mutable($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_flags($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_flags_const($mhx), 2);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_flags_const_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_flags_mutable($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_mutable($mhx), 2);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_force_nomg($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_nomg_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_flags($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_flags_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_force_flags_mutable($mhx), 2);
+
+$mhx = 42; is(&Devel::PPPort::SvPV_nolen_const($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg_const($mhx), 2);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg_const_nolen($mhx), 0);
+$mhx = 42; is(&Devel::PPPort::SvPV_nomg_nolen($mhx), 0);
my $str = "";
&Devel::PPPort::SvPV_force($str);
my($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 81, "x"x80);
-ok($str, "x"x80);
-ok($s2, "x"x80);
+is($str, "x"x80);
+is($s2, "x"x80);
ok($before < 81);
-ok($after, 81);
+is($after, 81);
$str = "x"x400;
&Devel::PPPort::SvPV_force($str);
($s2, $before, $after) = &Devel::PPPort::SvPV_renew($str, 41, "x"x40);
-ok($str, "x"x40);
-ok($s2, "x"x40);
+is($str, "x"x40);
+is($s2, "x"x40);
ok($before > 41);
-ok($after, 41);
+is($after, 41);
diff --git a/dist/Devel-PPPort/t/Sv_set.t b/dist/Devel-PPPort/t/Sv_set.t
index c56e23147b..e56e67ed9f 100644
--- a/dist/Devel-PPPort/t/Sv_set.t
+++ b/dist/Devel-PPPort/t/Sv_set.t
@@ -53,17 +53,17 @@ bootstrap Devel::PPPort;
package main;
my $foo = 5;
-ok(&Devel::PPPort::TestSvUV_set($foo, 12345), 42);
-ok(&Devel::PPPort::TestSvPVX_const("mhx"), 43);
-ok(&Devel::PPPort::TestSvPVX_mutable("mhx"), 44);
+is(&Devel::PPPort::TestSvUV_set($foo, 12345), 42);
+is(&Devel::PPPort::TestSvPVX_const("mhx"), 43);
+is(&Devel::PPPort::TestSvPVX_mutable("mhx"), 44);
my $bar = [];
bless $bar, 'foo';
-ok($bar->x(), 'foobar');
+is($bar->x(), 'foobar');
Devel::PPPort::TestSvSTASH_set($bar, 'bar');
-ok($bar->x(), 'hacker');
+is($bar->x(), 'hacker');
if ( "$]" < '5.007003' ) {
skip 'skip: no SV_NOSTEAL support', 10;
@@ -72,19 +72,19 @@ if ( "$]" < '5.007003' ) {
tie my $scalar, 'TieScalarCounter', 'string';
- ok tied($scalar)->{fetch}, 0;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 0;
+ is tied($scalar)->{store}, 0;
my $copy = Devel::PPPort::newSVsv_nomg($scalar);
- ok tied($scalar)->{fetch}, 0;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 0;
+ is tied($scalar)->{store}, 0;
my $fetch = $scalar;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
my $copy2 = Devel::PPPort::newSVsv_nomg($scalar);
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok $copy2, 'string';
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is $copy2, 'string';
}
package TieScalarCounter;
diff --git a/dist/Devel-PPPort/t/call.t b/dist/Devel-PPPort/t/call.t
index 273c8e6a2e..8b68428f93 100644
--- a/dist/Devel-PPPort/t/call.t
+++ b/dist/Devel-PPPort/t/call.t
@@ -96,12 +96,12 @@ for $test (
ok(eq_array( [ &Devel::PPPort::call_sv_G_METHOD('meth', $flags, $obj, @$args) ], $expected));
};
-ok(&Devel::PPPort::eval_pv('f()', 0), 'y');
-ok(&Devel::PPPort::eval_pv('f(qw(a b c))', 0), 'y');
+is(&Devel::PPPort::eval_pv('f()', 0), 'y');
+is(&Devel::PPPort::eval_pv('f(qw(a b c))', 0), 'y');
-ok(!defined $::{'less::'}, 1, "Hadn't loaded less yet");
+is(!defined $::{'less::'}, 1, "Hadn't loaded less yet");
Devel::PPPort::load_module(0, "less", undef);
-ok(defined $::{'less::'}, 1, "Have now loaded less");
+is(defined $::{'less::'}, 1, "Have now loaded less");
ok(eval { Devel::PPPort::eval_pv('die', 0); 1 });
ok(!eval { Devel::PPPort::eval_pv('die', 1); 1 });
@@ -116,15 +116,15 @@ ok($@ =~ /^string3 at \(eval [0-9]+\) line 1\.\n$/);
if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
my $hashref = { key => 'value' };
- ok(eval { Devel::PPPort::eval_pv('die $hashref', 1); 1 }, undef, 'check plain hashref is rethrown');
- ok(ref($@), 'HASH', 'check $@ is hashref') and
- ok($@->{key}, 'value', 'check $@ hashref has correct value');
+ is(eval { Devel::PPPort::eval_pv('die $hashref', 1); 1 }, undef, 'check plain hashref is rethrown');
+ is(ref($@), 'HASH', 'check $@ is hashref') and
+ is($@->{key}, 'value', 'check $@ hashref has correct value');
my $false = False->new;
ok(!$false);
- ok(eval { Devel::PPPort::eval_pv('die $false', 1); 1 }, undef, 'check false objects are rethrown');
- ok(ref($@), 'False', 'check that $@ contains False object');
- ok("$@", "$false", 'check we got the expected object');
+ is(eval { Devel::PPPort::eval_pv('die $false', 1); 1 }, undef, 'check false objects are rethrown');
+ is(ref($@), 'False', 'check that $@ contains False object');
+ is("$@", "$false", 'check we got the expected object');
} else {
skip 'skip: no support for references in $@', 7;
}
@@ -142,15 +142,15 @@ ok($@ =~ /^string3 at \(eval [0-9]+\) line 1\.\n$/);
if ("$]" >= '5.007003' or ("$]" >= '5.006001' and "$]" < '5.007')) {
my $hashref = { key => 'value' };
- ok(eval { Devel::PPPort::eval_sv('die $hashref', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check plain hashref is rethrown');
- ok(ref($@), 'HASH', 'check $@ is hashref') and
- ok($@->{key}, 'value', 'check $@ hashref has correct value');
+ is(eval { Devel::PPPort::eval_sv('die $hashref', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check plain hashref is rethrown');
+ is(ref($@), 'HASH', 'check $@ is hashref') and
+ is($@->{key}, 'value', 'check $@ hashref has correct value');
my $false = False->new;
ok(!$false);
- ok(eval { Devel::PPPort::eval_sv('die $false', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check false objects are rethrown');
- ok(ref($@), 'False', 'check that $@ contains False object');
- ok("$@", "$false", 'check we got the expected object');
+ is(eval { Devel::PPPort::eval_sv('die $false', &Devel::PPPort::G_RETHROW); 1 }, undef, 'check false objects are rethrown');
+ is(ref($@), 'False', 'check that $@ contains False object');
+ is("$@", "$false", 'check we got the expected object');
} else {
skip 'skip: no support for references in $@', 7;
}
diff --git a/dist/Devel-PPPort/t/cop.t b/dist/Devel-PPPort/t/cop.t
index a78fa9de9b..649b45d78e 100644
--- a/dist/Devel-PPPort/t/cop.t
+++ b/dist/Devel-PPPort/t/cop.t
@@ -58,7 +58,7 @@ my $package;
$package = &Devel::PPPort::CopSTASHPV();
}
print "# $package\n";
-ok($package, "MyPackage");
+is($package, "MyPackage");
my $file = &Devel::PPPort::CopFILE();
print "# $file\n";
diff --git a/dist/Devel-PPPort/t/exception.t b/dist/Devel-PPPort/t/exception.t
index 6d99402121..09633631fd 100644
--- a/dist/Devel-PPPort/t/exception.t
+++ b/dist/Devel-PPPort/t/exception.t
@@ -57,15 +57,15 @@ my $rv;
$Devel::PPPort::exception_caught = undef;
$rv = eval { &Devel::PPPort::exception(0) };
-ok($@, '');
+is($@, '');
ok(defined $rv);
-ok($rv, 42);
-ok($Devel::PPPort::exception_caught, 0);
+is($rv, 42);
+is($Devel::PPPort::exception_caught, 0);
$Devel::PPPort::exception_caught = undef;
$rv = eval { &Devel::PPPort::exception(1) };
-ok($@, "boo\n");
+is($@, "boo\n");
ok(not defined $rv);
-ok($Devel::PPPort::exception_caught, 1);
+is($Devel::PPPort::exception_caught, 1);
diff --git a/dist/Devel-PPPort/t/format.t b/dist/Devel-PPPort/t/format.t
index 07fe3d25bd..db8386809b 100644
--- a/dist/Devel-PPPort/t/format.t
+++ b/dist/Devel-PPPort/t/format.t
@@ -64,8 +64,8 @@ my $num = 1.12345678901234567890;
eval { Devel::PPPort::croak_NVgf($num) };
ok($@ =~ /^1.1234567890/);
-ok(Devel::PPPort::sprintf_iv(-8), 'XX_-8_XX');
-ok(Devel::PPPort::sprintf_uv(15), 'XX_15_XX');
+is(Devel::PPPort::sprintf_iv(-8), 'XX_-8_XX');
+is(Devel::PPPort::sprintf_uv(15), 'XX_15_XX');
my $ivsize = $Config::Config{ivsize};
my $ivmax = ($ivsize == 4) ? '2147483647' : ($ivsize == 8) ? '9223372036854775807' : 0;
@@ -73,7 +73,7 @@ my $uvmax = ($ivsize == 4) ? '4294967295' : ($ivsize == 8) ? '184467440737095516
if ($ivmax == 0) {
skip 'skip: unknown ivsize', 2;
} else {
- ok(Devel::PPPort::sprintf_ivmax(), $ivmax);
- ok(Devel::PPPort::sprintf_uvmax(), $uvmax);
+ is(Devel::PPPort::sprintf_ivmax(), $ivmax);
+ is(Devel::PPPort::sprintf_uvmax(), $uvmax);
}
diff --git a/dist/Devel-PPPort/t/grok.t b/dist/Devel-PPPort/t/grok.t
index ac5fd34108..98c54a4954 100644
--- a/dist/Devel-PPPort/t/grok.t
+++ b/dist/Devel-PPPort/t/grok.t
@@ -52,15 +52,15 @@ bootstrap Devel::PPPort;
package main;
-ok(&Devel::PPPort::grok_number("42"), 42);
+is(&Devel::PPPort::grok_number("42"), 42);
ok(!defined(&Devel::PPPort::grok_number("A")));
-ok(&Devel::PPPort::grok_bin("10000001"), 129);
-ok(&Devel::PPPort::grok_hex("deadbeef"), 0xdeadbeef);
-ok(&Devel::PPPort::grok_oct("377"), 255);
+is(&Devel::PPPort::grok_bin("10000001"), 129);
+is(&Devel::PPPort::grok_hex("deadbeef"), 0xdeadbeef);
+is(&Devel::PPPort::grok_oct("377"), 255);
-ok(&Devel::PPPort::Perl_grok_number("42"), 42);
+is(&Devel::PPPort::Perl_grok_number("42"), 42);
ok(!defined(&Devel::PPPort::Perl_grok_number("A")));
-ok(&Devel::PPPort::Perl_grok_bin("10000001"), 129);
-ok(&Devel::PPPort::Perl_grok_hex("deadbeef"), 0xdeadbeef);
-ok(&Devel::PPPort::Perl_grok_oct("377"), 255);
+is(&Devel::PPPort::Perl_grok_bin("10000001"), 129);
+is(&Devel::PPPort::Perl_grok_hex("deadbeef"), 0xdeadbeef);
+is(&Devel::PPPort::Perl_grok_oct("377"), 255);
diff --git a/dist/Devel-PPPort/t/gv.t b/dist/Devel-PPPort/t/gv.t
index 97d4ec293f..6e80768798 100644
--- a/dist/Devel-PPPort/t/gv.t
+++ b/dist/Devel-PPPort/t/gv.t
@@ -52,16 +52,16 @@ bootstrap Devel::PPPort;
package main;
-ok(Devel::PPPort::GvSVn(), 1);
+is(Devel::PPPort::GvSVn(), 1);
-ok(Devel::PPPort::isGV_with_GP(), 2);
+is(Devel::PPPort::isGV_with_GP(), 2);
-ok(Devel::PPPort::get_cvn_flags(), 3);
+is(Devel::PPPort::get_cvn_flags(), 3);
-ok(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
+is(Devel::PPPort::gv_fetchpvn_flags(), \*Devel::PPPort::VERSION);
-ok(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION);
+is(Devel::PPPort::gv_fetchsv("Devel::PPPort::VERSION"), \*Devel::PPPort::VERSION);
-ok(Devel::PPPort::gv_init_type("sanity_check", 0, 0), "*main::sanity_check");
+is(Devel::PPPort::gv_init_type("sanity_check", 0, 0), "*main::sanity_check");
ok($::{sanity_check});
diff --git a/dist/Devel-PPPort/t/mPUSH.t b/dist/Devel-PPPort/t/mPUSH.t
index 75b6605305..fd4b499c41 100644
--- a/dist/Devel-PPPort/t/mPUSH.t
+++ b/dist/Devel-PPPort/t/mPUSH.t
@@ -52,15 +52,15 @@ bootstrap Devel::PPPort;
package main;
-ok(join(':', &Devel::PPPort::mPUSHs()), "foo:bar:42");
-ok(join(':', &Devel::PPPort::mPUSHp()), "one:two:three");
-ok(join(':', &Devel::PPPort::mPUSHn()), "0.5:-0.25:0.125");
-ok(join(':', &Devel::PPPort::mPUSHi()), "-1:2:-3");
-ok(join(':', &Devel::PPPort::mPUSHu()), "1:2:3");
+is(join(':', &Devel::PPPort::mPUSHs()), "foo:bar:42");
+is(join(':', &Devel::PPPort::mPUSHp()), "one:two:three");
+is(join(':', &Devel::PPPort::mPUSHn()), "0.5:-0.25:0.125");
+is(join(':', &Devel::PPPort::mPUSHi()), "-1:2:-3");
+is(join(':', &Devel::PPPort::mPUSHu()), "1:2:3");
-ok(join(':', &Devel::PPPort::mXPUSHs()), "foo:bar:42");
-ok(join(':', &Devel::PPPort::mXPUSHp()), "one:two:three");
-ok(join(':', &Devel::PPPort::mXPUSHn()), "0.5:-0.25:0.125");
-ok(join(':', &Devel::PPPort::mXPUSHi()), "-1:2:-3");
-ok(join(':', &Devel::PPPort::mXPUSHu()), "1:2:3");
+is(join(':', &Devel::PPPort::mXPUSHs()), "foo:bar:42");
+is(join(':', &Devel::PPPort::mXPUSHp()), "one:two:three");
+is(join(':', &Devel::PPPort::mXPUSHn()), "0.5:-0.25:0.125");
+is(join(':', &Devel::PPPort::mXPUSHi()), "-1:2:-3");
+is(join(':', &Devel::PPPort::mXPUSHu()), "1:2:3");
diff --git a/dist/Devel-PPPort/t/magic.t b/dist/Devel-PPPort/t/magic.t
index 2987746dd5..973f7f6ee6 100644
--- a/dist/Devel-PPPort/t/magic.t
+++ b/dist/Devel-PPPort/t/magic.t
@@ -54,27 +54,27 @@ package main;
# Find proper magic
ok(my $obj1 = Devel::PPPort->new_with_mg());
-ok(Devel::PPPort::as_string($obj1), 'hello');
+is(Devel::PPPort::as_string($obj1), 'hello');
# Find with no magic
my $obj = bless {}, 'Fake::Class';
-ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
# Find with other magic (not the magic we are looking for)
ok($obj = Devel::PPPort->new_with_other_mg());
-ok(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj), "Sorry, your princess is in another castle.");
# Okay, attempt to remove magic that isn't there
Devel::PPPort::remove_other_magic($obj1);
-ok(Devel::PPPort::as_string($obj1), 'hello');
+is(Devel::PPPort::as_string($obj1), 'hello');
# Remove magic that IS there
Devel::PPPort::remove_null_magic($obj1);
-ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
# Removing when no magic present
Devel::PPPort::remove_null_magic($obj1);
-ok(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
+is(Devel::PPPort::as_string($obj1), "Sorry, your princess is in another castle.");
use Tie::Hash;
my %h;
@@ -83,34 +83,34 @@ $h{foo} = 'foo';
$h{bar} = '';
&Devel::PPPort::sv_catpv_mg($h{foo}, 'bar');
-ok($h{foo}, 'foobar');
+is($h{foo}, 'foobar');
&Devel::PPPort::sv_catpvn_mg($h{bar}, 'baz');
-ok($h{bar}, 'baz');
+is($h{bar}, 'baz');
&Devel::PPPort::sv_catsv_mg($h{foo}, '42');
-ok($h{foo}, 'foobar42');
+is($h{foo}, 'foobar42');
&Devel::PPPort::sv_setiv_mg($h{bar}, 42);
-ok($h{bar}, 42);
+is($h{bar}, 42);
&Devel::PPPort::sv_setnv_mg($h{PI}, 3.14159);
ok(abs($h{PI} - 3.14159) < 0.01);
&Devel::PPPort::sv_setpv_mg($h{mhx}, 'mhx');
-ok($h{mhx}, 'mhx');
+is($h{mhx}, 'mhx');
&Devel::PPPort::sv_setpvn_mg($h{mhx}, 'Marcus');
-ok($h{mhx}, 'Marcus');
+is($h{mhx}, 'Marcus');
&Devel::PPPort::sv_setsv_mg($h{sv}, 'SV');
-ok($h{sv}, 'SV');
+is($h{sv}, 'SV');
&Devel::PPPort::sv_setuv_mg($h{sv}, 4711);
-ok($h{sv}, 4711);
+is($h{sv}, 4711);
&Devel::PPPort::sv_usepvn_mg($h{sv}, 'Perl');
-ok($h{sv}, 'Perl');
+is($h{sv}, 'Perl');
# v1 is treated as a bareword in older perls...
my $ver = do { local $SIG{'__WARN__'} = sub {}; eval qq[v1.2.0] };
@@ -128,30 +128,30 @@ if ( "$]" < '5.007003' ) {
tie my $scalar, 'TieScalarCounter', 10;
my $fetch = $scalar;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvIV_nomg($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvUV_nomg($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvNV_nomg($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
- ok Devel::PPPort::magic_SvPV_nomg_nolen($scalar), 10;
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvIV_nomg($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvUV_nomg($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvNV_nomg($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
+ is Devel::PPPort::magic_SvPV_nomg_nolen($scalar), 10;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
ok Devel::PPPort::magic_SvTRUE_nomg($scalar);
- ok tied($scalar)->{fetch}, 1;
- ok tied($scalar)->{store}, 0;
+ is tied($scalar)->{fetch}, 1;
+ is tied($scalar)->{store}, 0;
my $object = OverloadedObject->new('string', 5.5, 0);
- ok Devel::PPPort::magic_SvIV_nomg($object), 5;
- ok Devel::PPPort::magic_SvUV_nomg($object), 5;
- ok Devel::PPPort::magic_SvNV_nomg($object), 5.5;
- ok Devel::PPPort::magic_SvPV_nomg_nolen($object), 'string';
+ is Devel::PPPort::magic_SvIV_nomg($object), 5;
+ is Devel::PPPort::magic_SvUV_nomg($object), 5;
+ is Devel::PPPort::magic_SvNV_nomg($object), 5.5;
+ is Devel::PPPort::magic_SvPV_nomg_nolen($object), 'string';
ok !Devel::PPPort::magic_SvTRUE_nomg($object);
}
diff --git a/dist/Devel-PPPort/t/memory.t b/dist/Devel-PPPort/t/memory.t
index cf9a038fbc..45bda3b30d 100644
--- a/dist/Devel-PPPort/t/memory.t
+++ b/dist/Devel-PPPort/t/memory.t
@@ -52,5 +52,5 @@ bootstrap Devel::PPPort;
package main;
-ok(Devel::PPPort::checkmem(), 6);
+is(Devel::PPPort::checkmem(), 6);
diff --git a/dist/Devel-PPPort/t/mess.t b/dist/Devel-PPPort/t/mess.t
index a0279cafa2..986d79bf2d 100644
--- a/dist/Devel-PPPort/t/mess.t
+++ b/dist/Devel-PPPort/t/mess.t
@@ -66,8 +66,8 @@ my $obj = bless {}, 'Package';
undef $die;
ok !defined eval { Devel::PPPort::croak_sv("\xE1\n") };
-ok $@, "\xE1\n";
-ok $die, "\xE1\n";
+is $@, "\xE1\n";
+is $die, "\xE1\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(10) };
@@ -98,8 +98,8 @@ ok !defined eval {
$@ = "this must be visible\n";
Devel::PPPort::croak_sv($@)
};
-ok $@, "this must be visible\n";
-ok $die, "this must be visible\n";
+is $@, "this must be visible\n";
+is $die, "this must be visible\n";
undef $die;
$@ = 'should not be visible';
@@ -116,13 +116,13 @@ ok !defined eval {
$@ = "this must be visible\n";
Devel::PPPort::croak_sv_errsv()
};
-ok $@, "this must be visible\n";
-ok $die, "this must be visible\n";
+is $@, "this must be visible\n";
+is $die, "this must be visible\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv_with_counter("message\n") };
-ok $@, "message\n";
-ok Devel::PPPort::get_counter(), 1;
+is $@, "message\n";
+is Devel::PPPort::get_counter(), 1;
undef $die;
ok !defined eval { Devel::PPPort::croak_sv('') };
@@ -141,7 +141,7 @@ ok $die =~ /^\xC3\xA1 at \Q$0\E line /;
undef $warn;
Devel::PPPort::warn_sv("\xE1\n");
-ok $warn, "\xE1\n";
+is $warn, "\xE1\n";
undef $warn;
Devel::PPPort::warn_sv(10);
@@ -159,8 +159,8 @@ undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1");
ok $warn =~ /^\xC3\xA1 at \Q$0\E line /;
-ok Devel::PPPort::mess_sv("\xE1\n", 0), "\xE1\n";
-ok Devel::PPPort::mess_sv(do {my $tmp = "\xE1\n"}, 1), "\xE1\n";
+is Devel::PPPort::mess_sv("\xE1\n", 0), "\xE1\n";
+is Devel::PPPort::mess_sv(do {my $tmp = "\xE1\n"}, 1), "\xE1\n";
ok Devel::PPPort::mess_sv(10, 0) =~ /^10 at \Q$0\E line /;
ok Devel::PPPort::mess_sv(do {my $tmp = 10}, 1) =~ /^10 at \Q$0\E line /;
@@ -180,12 +180,12 @@ if ("$]" >= '5.006') {
undef $die;
ok !defined eval { Devel::PPPort::croak_sv("\x{100}\n") };
if ("$]" < '5.007001' || "$]" > '5.007003') {
- ok $@, "\x{100}\n";
+ is $@, "\x{100}\n";
} else {
skip 'skip: broken utf8 support in die hook', 1;
}
if ("$]" < '5.007001' || "$]" > '5.008') {
- ok $die, "\x{100}\n";
+ is $die, "\x{100}\n";
} else {
skip 'skip: broken utf8 support in die hook', 1;
}
@@ -206,7 +206,7 @@ if ("$]" >= '5.006') {
if ("$]" < '5.007001' || "$]" > '5.008') {
undef $warn;
Devel::PPPort::warn_sv("\x{100}\n");
- ok $warn, "\x{100}\n";
+ is $warn, "\x{100}\n";
undef $warn;
Devel::PPPort::warn_sv("\x{100}");
@@ -215,8 +215,8 @@ if ("$]" >= '5.006') {
skip 'skip: broken utf8 support in warn hook', 2;
}
- ok Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
- ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}\n"}, 1), "\x{100}\n";
+ is Devel::PPPort::mess_sv("\x{100}\n", 0), "\x{100}\n";
+ is Devel::PPPort::mess_sv(do {my $tmp = "\x{100}\n"}, 1), "\x{100}\n";
ok Devel::PPPort::mess_sv("\x{100}", 0) =~ /^\x{100} at \Q$0\E line /;
ok Devel::PPPort::mess_sv(do {my $tmp = "\x{100}"}, 1) =~ /^\x{100} at \Q$0\E line /;
@@ -232,8 +232,8 @@ if (ord('A') != 65) {
{
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}\n"') };
- ok $@, "\xE1\n";
- ok $die, "\xE1\n";
+ is $@, "\xE1\n";
+ is $die, "\xE1\n";
undef $die;
ok !defined eval { Devel::PPPort::croak_sv(eval '"\N{U+E1}"') };
@@ -244,8 +244,8 @@ if (ord('A') != 65) {
undef $die;
my $expect = eval '"\N{U+C3}\N{U+A1}\n"';
ok !defined eval { Devel::PPPort::croak_sv("\xC3\xA1\n") };
- ok $@, $expect;
- ok $die, $expect;
+ is $@, $expect;
+ is $die, $expect;
}
{
@@ -258,7 +258,7 @@ if (ord('A') != 65) {
undef $warn;
Devel::PPPort::warn_sv(eval '"\N{U+E1}\n"');
- ok $warn, "\xE1\n";
+ is $warn, "\xE1\n";
undef $warn;
Devel::PPPort::warn_sv(eval '"\N{U+E1}"');
@@ -266,7 +266,7 @@ if (ord('A') != 65) {
undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1\n");
- ok $warn, eval '"\N{U+C3}\N{U+A1}\n"';
+ is $warn, eval '"\N{U+C3}\N{U+A1}\n"';
undef $warn;
Devel::PPPort::warn_sv("\xC3\xA1");
@@ -276,14 +276,14 @@ if (ord('A') != 65) {
skip 'skip: no support for mess_sv', 8;
}
else {
- ok Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
- ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}\n"'}, 1), eval '"\N{U+E1}\n"';
+ is Devel::PPPort::mess_sv(eval('"\N{U+E1}\n"'), 0), eval '"\N{U+E1}\n"';
+ is Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}\n"'}, 1), eval '"\N{U+E1}\n"';
ok Devel::PPPort::mess_sv(eval('"\N{U+E1}"'), 0) =~ eval 'qr/^\N{U+E1} at \Q$0\E line /';
ok Devel::PPPort::mess_sv(do {my $tmp = eval '"\N{U+E1}"'}, 1) =~ eval 'qr/^\N{U+E1} at \Q$0\E line /';
- ok Devel::PPPort::mess_sv("\xC3\xA1\n", 0), eval '"\N{U+C3}\N{U+A1}\n"';
- ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1\n"}, 1), eval '"\N{U+C3}\N{U+A1}\n"';
+ is Devel::PPPort::mess_sv("\xC3\xA1\n", 0), eval '"\N{U+C3}\N{U+A1}\n"';
+ is Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1\n"}, 1), eval '"\N{U+C3}\N{U+A1}\n"';
ok Devel::PPPort::mess_sv("\xC3\xA1", 0) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
ok Devel::PPPort::mess_sv(do {my $tmp = "\xC3\xA1"}, 1) =~ eval 'qr/^\N{U+C3}\N{U+A1} at \Q$0\E line /';
diff --git a/dist/Devel-PPPort/t/misc.t b/dist/Devel-PPPort/t/misc.t
index c006162cc9..ee2514730c 100644
--- a/dist/Devel-PPPort/t/misc.t
+++ b/dist/Devel-PPPort/t/misc.t
@@ -58,16 +58,16 @@ ok(&Devel::PPPort::boolSV(1));
ok(!&Devel::PPPort::boolSV(0));
$_ = "Fred";
-ok(&Devel::PPPort::DEFSV(), "Fred");
-ok(&Devel::PPPort::UNDERBAR(), "Fred");
+is(&Devel::PPPort::DEFSV(), "Fred");
+is(&Devel::PPPort::UNDERBAR(), "Fred");
if (ivers($]) >= ivers(5.9.2) && ivers($]) < ivers(5.23)) {
eval q{
no warnings "deprecated";
no if $^V > v5.17.9, warnings => "experimental::lexical_topic";
my $_ = "Tony";
- ok(&Devel::PPPort::DEFSV(), "Fred");
- ok(&Devel::PPPort::UNDERBAR(), "Tony");
+ is(&Devel::PPPort::DEFSV(), "Fred");
+ is(&Devel::PPPort::UNDERBAR(), "Tony");
};
}
else {
@@ -78,11 +78,11 @@ else {
my @r = &Devel::PPPort::DEFSV_modify();
ok(@r == 3);
-ok($r[0], 'Fred');
-ok($r[1], 'DEFSV');
-ok($r[2], 'Fred');
+is($r[0], 'Fred');
+is($r[1], 'DEFSV');
+is($r[2], 'Fred');
-ok(&Devel::PPPort::DEFSV(), "Fred");
+is(&Devel::PPPort::DEFSV(), "Fred");
eval { 1 };
ok(!&Devel::PPPort::ERRSV());
@@ -113,38 +113,38 @@ ok(&Devel::PPPort::get_cv('my_cv', 0));
ok(!&Devel::PPPort::get_cv('not_my_cv', 0));
ok(&Devel::PPPort::get_cv('not_my_cv', 1));
-ok(Devel::PPPort::dXSTARG(42), 43);
-ok(Devel::PPPort::dAXMARK(4711), 4710);
+is(Devel::PPPort::dXSTARG(42), 43);
+is(Devel::PPPort::dAXMARK(4711), 4710);
-ok(Devel::PPPort::prepush(), 42);
+is(Devel::PPPort::prepush(), 42);
-ok(join(':', Devel::PPPort::xsreturn(0)), 'test1');
-ok(join(':', Devel::PPPort::xsreturn(1)), 'test1:test2');
+is(join(':', Devel::PPPort::xsreturn(0)), 'test1');
+is(join(':', Devel::PPPort::xsreturn(1)), 'test1:test2');
-ok(Devel::PPPort::PERL_ABS(42), 42);
-ok(Devel::PPPort::PERL_ABS(-13), 13);
+is(Devel::PPPort::PERL_ABS(42), 42);
+is(Devel::PPPort::PERL_ABS(-13), 13);
-ok(Devel::PPPort::SVf(42), ivers($]) >= ivers(5.4) ? '[42]' : '42');
-ok(Devel::PPPort::SVf('abc'), ivers($]) >= ivers(5.4) ? '[abc]' : 'abc');
+is(Devel::PPPort::SVf(42), ivers($]) >= ivers(5.4) ? '[42]' : '42');
+is(Devel::PPPort::SVf('abc'), ivers($]) >= ivers(5.4) ? '[abc]' : 'abc');
-ok(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
+is(&Devel::PPPort::Perl_ppaddr_t("FOO"), "foo");
-ok(&Devel::PPPort::ptrtests(), 63);
+is(&Devel::PPPort::ptrtests(), 63);
-ok(&Devel::PPPort::OpSIBLING_tests(), 0);
+is(&Devel::PPPort::OpSIBLING_tests(), 0);
if (ivers($]) >= ivers(5.9)) {
eval q{
- ok(&Devel::PPPort::check_HeUTF8("hello"), "norm");
- ok(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
+ is(&Devel::PPPort::check_HeUTF8("hello"), "norm");
+ is(&Devel::PPPort::check_HeUTF8("\N{U+263a}"), "utf8");
};
} else {
skip("Too early perl version", 2);
}
@r = &Devel::PPPort::check_c_array();
-ok($r[0], 4);
-ok($r[1], "13");
+is($r[0], 4);
+is($r[1], "13");
ok(!Devel::PPPort::SvRXOK(""));
ok(!Devel::PPPort::SvRXOK(bless [], "Regexp"));
@@ -297,7 +297,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $eval_string = "Devel::PPPort::is${class}$suffix($hex)";
my $is = eval $eval_string || 0;
die "eval 'For $i: $eval_string' gave $@" if $@;
- ok($is, $should_be, "'$eval_string'");
+ is($is, $should_be, "'$eval_string'");
}
}
@@ -329,7 +329,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $eval_string = "$fcn(\"$utf8\", 0)";
my $is = eval $eval_string || 0;
die "eval 'For $i, $eval_string' gave $@" if $@;
- ok($is, $should_be, sprintf("For U+%04X '%s'", $native, $eval_string));
+ is($is, $should_be, sprintf("For U+%04X '%s'", $native, $eval_string));
}
# And for the high code points, test that a too short malformation (the
@@ -345,7 +345,7 @@ for $i (sort { $a <=> $b } keys %code_points_to_test) {
my $eval_string = "$fcn(\"$utf8\", -1)";
my $is = eval "no warnings; $eval_string" || 0;
die "eval '$eval_string' gave $@" if $@;
- ok($is, 0, sprintf("For U+%04X '%s'", $native, $eval_string));
+ is($is, 0, sprintf("For U+%04X '%s'", $native, $eval_string));
}
}
}
@@ -419,15 +419,15 @@ for $name (keys %case_changing) {
my $ret = eval "Devel::PPPort::$fcn($original)";
my $fail = $@; # Have to save $@, as it gets destroyed
- ok ($fail, "", "$fcn($original) didn't fail");
+ is ($fail, "", "$fcn($original) didn't fail");
my $first = (ivers($]) != ivers(5.6))
? substr($utf8_changed, 0, 1)
: $utf8_changed, 0, 1;
- ok($ret->[0], ord $first,
+ is($ret->[0], ord $first,
"ord of $fcn($original) is $changed");
- ok($ret->[1], $utf8_changed,
+ is($ret->[1], $utf8_changed,
"UTF-8 of of $fcn($original) is correct");
- ok($ret->[2], $should_be_bytes,
+ is($ret->[2], $should_be_bytes,
"Length of $fcn($original) is $should_be_bytes");
}
@@ -461,19 +461,19 @@ for $name (keys %case_changing) {
my $ret = eval "no warnings; $eval_string" || 0;
my $fail = $@; # Have to save $@, as it gets destroyed
if ($truncate == 0) {
- ok ($fail, "", "Didn't fail on full length input");
+ is ($fail, "", "Didn't fail on full length input");
my $first = (ivers($]) != ivers(5.6))
? substr($utf8_changed, 0, 1)
: $utf8_changed, 0, 1;
- ok($ret->[0], ord $first,
+ is($ret->[0], ord $first,
"ord of $fcn($original) is $changed");
- ok($ret->[1], $utf8_changed,
+ is($ret->[1], $utf8_changed,
"UTF-8 of of $fcn($original) is correct");
- ok($ret->[2], $should_be_bytes,
+ is($ret->[2], $should_be_bytes,
"Length of $fcn($original) is $should_be_bytes");
}
else {
- ok ($fail, eval 'qr/Malformed UTF-8 character/',
+ is ($fail, eval 'qr/Malformed UTF-8 character/',
"Gave appropriate error for short char: $original");
skip("Expected failure means remaining tests for"
. " this aren't relevant", 3);
@@ -483,6 +483,6 @@ for $name (keys %case_changing) {
}
}
-ok(&Devel::PPPort::av_top_index([1,2,3]), 2);
-ok(&Devel::PPPort::av_tindex([1,2,3,4]), 3);
+is(&Devel::PPPort::av_top_index([1,2,3]), 2);
+is(&Devel::PPPort::av_tindex([1,2,3,4]), 3);
diff --git a/dist/Devel-PPPort/t/newCONSTSUB.t b/dist/Devel-PPPort/t/newCONSTSUB.t
index 763df33efc..f279875d45 100644
--- a/dist/Devel-PPPort/t/newCONSTSUB.t
+++ b/dist/Devel-PPPort/t/newCONSTSUB.t
@@ -53,11 +53,11 @@ bootstrap Devel::PPPort;
package main;
&Devel::PPPort::call_newCONSTSUB_1();
-ok(&Devel::PPPort::test_value_1(), 1);
+is(&Devel::PPPort::test_value_1(), 1);
&Devel::PPPort::call_newCONSTSUB_2();
-ok(&Devel::PPPort::test_value_2(), 2);
+is(&Devel::PPPort::test_value_2(), 2);
&Devel::PPPort::call_newCONSTSUB_3();
-ok(&Devel::PPPort::test_value_3(), 3);
+is(&Devel::PPPort::test_value_3(), 3);
diff --git a/dist/Devel-PPPort/t/newRV.t b/dist/Devel-PPPort/t/newRV.t
index 3a873aebea..211cdd617e 100644
--- a/dist/Devel-PPPort/t/newRV.t
+++ b/dist/Devel-PPPort/t/newRV.t
@@ -52,6 +52,6 @@ bootstrap Devel::PPPort;
package main;
-ok(&Devel::PPPort::newRV_inc_REFCNT, 1);
-ok(&Devel::PPPort::newRV_noinc_REFCNT, 1);
+is(&Devel::PPPort::newRV_inc_REFCNT, 1);
+is(&Devel::PPPort::newRV_noinc_REFCNT, 1);
diff --git a/dist/Devel-PPPort/t/newSV_type.t b/dist/Devel-PPPort/t/newSV_type.t
index 01544a92ac..1f82d4a721 100644
--- a/dist/Devel-PPPort/t/newSV_type.t
+++ b/dist/Devel-PPPort/t/newSV_type.t
@@ -52,5 +52,5 @@ bootstrap Devel::PPPort;
package main;
-ok(Devel::PPPort::newSV_type(), 4);
+is(Devel::PPPort::newSV_type(), 4);
diff --git a/dist/Devel-PPPort/t/newSVpv.t b/dist/Devel-PPPort/t/newSVpv.t
index 80a67a9ec7..a0a54e085c 100644
--- a/dist/Devel-PPPort/t/newSVpv.t
+++ b/dist/Devel-PPPort/t/newSVpv.t
@@ -54,23 +54,23 @@ package main;
my @s = &Devel::PPPort::newSVpvn();
ok(@s == 5);
-ok($s[0], "test");
-ok($s[1], "te");
-ok($s[2], "");
+is($s[0], "test");
+is($s[1], "te");
+is($s[2], "");
ok(!defined($s[3]));
ok(!defined($s[4]));
@s = &Devel::PPPort::newSVpvn_flags();
ok(@s == 5);
-ok($s[0], "test");
-ok($s[1], "te");
-ok($s[2], "");
+is($s[0], "test");
+is($s[1], "te");
+is($s[2], "");
ok(!defined($s[3]));
ok(!defined($s[4]));
@s = &Devel::PPPort::newSVpvn_utf8();
ok(@s == 1);
-ok($s[0], "test");
+is($s[0], "test");
if ("$]" >= 5.008001) {
require utf8;
diff --git a/dist/Devel-PPPort/t/ppphtest.t b/dist/Devel-PPPort/t/ppphtest.t
index 0d133d5542..70a1b4437b 100644
--- a/dist/Devel-PPPort/t/ppphtest.t
+++ b/dist/Devel-PPPort/t/ppphtest.t
@@ -98,7 +98,7 @@ END {
ok(&Devel::PPPort::WriteFile("ppport.h"));
# Check GetFileContents()
-ok(-e "ppport.h", 1);
+is(-e "ppport.h", 1);
my $data;
@@ -108,8 +108,8 @@ while(<F>) {
}
close(F);
-ok(Devel::PPPort::GetFileContents("ppport.h"), $data);
-ok(Devel::PPPort::GetFileContents(), $data);
+is(Devel::PPPort::GetFileContents("ppport.h"), $data);
+is(Devel::PPPort::GetFileContents(), $data);
sub comment
{
@@ -207,7 +207,7 @@ for $t (@tests) {
$err =~ s/^/# *** /mg;
print "# *** ERROR ***\n$err\n";
}
- ok($@, '');
+ is($@, '');
for (keys %{$t->{files}}) {
unlink $_ or die "unlink('$_'): $!\n";
@@ -253,8 +253,8 @@ ok($o =~ /^This is.*ppport.*\d+\.\d+(?:_?\d+)?\.$/);
$o = ppport(qw(--nochanges));
ok($o =~ /^Scanning.*test\.xs/mi);
ok($o =~ /Analyzing.*test\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
-ok(matches($o, 'Analyzing', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, 'Analyzing', 'm'), 1);
ok($o =~ /Uses Perl_newSViv instead of newSViv/);
$o = ppport(qw(--quiet --nochanges));
@@ -271,7 +271,7 @@ Perl_newSViv();
my $o = ppport(qw(--copy=a));
ok($o =~ /^Scanning.*MyExt\.xs/mi);
ok($o =~ /Analyzing.*MyExt\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
ok($o =~ /^Needs to include.*ppport\.h/m);
ok($o !~ /^Uses grok_bin/m);
ok($o !~ /^Uses newSVpv/m);
@@ -283,7 +283,7 @@ ok(eq_files('MyExt.xsa', 'MyExt.ra'));
$o = ppport(qw(--copy=b --cplusplus));
ok($o =~ /^Scanning.*MyExt\.xs/mi);
ok($o =~ /Analyzing.*MyExt\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
ok($o =~ /^Needs to include.*ppport\.h/m);
ok($o !~ /^Uses grok_bin/m);
ok($o !~ /^Uses newSVpv/m);
@@ -405,7 +405,7 @@ mXPUSHp(foo);
my $o = ppport(qw(--nochanges));
ok($o =~ /^Scanning.*FooBar\.xs/mi);
ok($o =~ /Analyzing.*FooBar\.xs/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
ok($o !~ /^Looks good/m);
ok($o =~ /^Uses grok_bin/m);
@@ -425,7 +425,7 @@ ok($o =~ /Analyzing.*second\.h/mi);
ok($o =~ /^Scanning.*sub.*third\.c/mi);
ok($o =~ /Analyzing.*sub.*third\.c/mi);
ok($o !~ /^Scanning.*foobar/mi);
-ok(matches($o, '^Scanning', 'm'), 3);
+is(matches($o, '^Scanning', 'm'), 3);
---------------------------- First.xs -----------------------------------------
@@ -461,9 +461,9 @@ for (qw(main.xs mod1.c mod2.c mod3.c mod4.c mod5.c)) {
ok($o =~ /^Scanning.*\Q$_\E/mi);
ok($o =~ /Analyzing.*\Q$_\E/i);
}
-ok(matches($o, '^Scanning', 'm'), 6);
+is(matches($o, '^Scanning', 'm'), 6);
-ok(matches($o, '^Writing copy of', 'm'), 5);
+is(matches($o, '^Writing copy of', 'm'), 5);
ok(!-e "mod5.cf");
for (qw(main.xs mod1.c mod2.c mod3.c mod4.c)) {
@@ -672,7 +672,7 @@ SvPVutf8_force();
my $o = ppport(qw(--nochanges));
ok($o !~ /potentially required change/);
-ok(matches($o, '^Looks good', 'm'), 2);
+is(matches($o, '^Looks good', 'm'), 2);
---------------------------- FooBar.xs ----------------------------------------
@@ -695,20 +695,20 @@ call_pv();
my $o = ppport(qw(--api-info=INT2PTR));
my %found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
-ok(scalar keys %found, 1, "found 1 key");
+is(scalar keys %found, 1, "found 1 key");
ok(exists $found{INT2PTR});
-ok(matches($o, '^Supported at least since perl-5\.6\.0', 'm'), 1, "INT2PTR supported without ppport.h to 5.6.0");
-ok(matches($o, '^ppport.h additionally provides support at least back to perl-5\.003', 'm'), 1, "INT2PTR supported with ppport.h to 5.003");
+is(matches($o, '^Supported at least since perl-5\.6\.0', 'm'), 1, "INT2PTR supported without ppport.h to 5.6.0");
+is(matches($o, '^ppport.h additionally provides support at least back to perl-5\.003', 'm'), 1, "INT2PTR supported with ppport.h to 5.003");
$o = ppport(qw(--api-info=Zero));
%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
-ok(scalar keys %found, 1, "found 1 key");
+is(scalar keys %found, 1, "found 1 key");
ok(exists $found{Zero});
-ok(matches($o, '^Supported at least since perl-5.003', 'm'), 1, "Zero supported to 5.003");
+is(matches($o, '^Supported at least since perl-5.003', 'm'), 1, "Zero supported to 5.003");
$o = ppport(qw(--api-info=/Zero/));
%found = map {($_ => 1)} $o =~ /^===\s+(\w+)\s+===/mg;
-ok(scalar keys %found, 2, "found 2 keys");
+is(scalar keys %found, 2, "found 2 keys");
ok(exists $found{Zero});
ok(exists $found{ZeroD});
@@ -725,32 +725,32 @@ for (@o) {
$p{$name} = defined $flags ? { map { ($_ => 1) } $flags =~ /(\w+)/g } : '';
}
ok(@o > 100);
-ok($fail, 0);
+is($fail, 0);
ok(exists $p{call_pv});
ok(not ref $p{call_pv});
ok(exists $p{grok_bin});
-ok(ref $p{grok_bin}, 'HASH');
-ok(scalar keys %{$p{grok_bin}}, 2);
+is(ref $p{grok_bin}, 'HASH');
+is(scalar keys %{$p{grok_bin}}, 2);
ok($p{grok_bin}{explicit});
ok($p{grok_bin}{depend});
ok(exists $p{gv_stashpvn});
-ok(ref $p{gv_stashpvn}, 'HASH');
-ok(scalar keys %{$p{gv_stashpvn}}, 2);
+is(ref $p{gv_stashpvn}, 'HASH');
+is(scalar keys %{$p{gv_stashpvn}}, 2);
ok($p{gv_stashpvn}{depend});
ok($p{gv_stashpvn}{hint});
ok(exists $p{sv_catpvf_mg});
-ok(ref $p{sv_catpvf_mg}, 'HASH');
-ok(scalar keys %{$p{sv_catpvf_mg}}, 2);
+is(ref $p{sv_catpvf_mg}, 'HASH');
+is(scalar keys %{$p{sv_catpvf_mg}}, 2);
ok($p{sv_catpvf_mg}{explicit});
ok($p{sv_catpvf_mg}{depend});
ok(exists $p{PL_signals});
-ok(ref $p{PL_signals}, 'HASH');
-ok(scalar keys %{$p{PL_signals}}, 1);
+is(ref $p{PL_signals}, 'HASH');
+is(scalar keys %{$p{PL_signals}}, 1);
ok($p{PL_signals}{explicit});
===============================================================================
@@ -766,13 +766,13 @@ for (@o) {
$p{$name} = $ver;
}
ok(@o > 100);
-ok($fail, 0);
+is($fail, 0);
ok(exists $p{utf8_distance});
-ok($p{utf8_distance}, '5.6.0');
+is($p{utf8_distance}, '5.6.0');
ok(exists $p{save_generic_svref});
-ok($p{save_generic_svref}, '5.005_03');
+is($p{save_generic_svref}, '5.005_03');
===============================================================================
@@ -781,17 +781,17 @@ ok($p{save_generic_svref}, '5.005_03');
my $o = ppport(qw(--nochanges));
ok($o =~ /^Scanning.*foo\.cpp/mi);
ok($o =~ /Analyzing.*foo\.cpp/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
-ok(matches($o, 'Analyzing', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, 'Analyzing', 'm'), 1);
$o = ppport(qw(--nochanges foo.cpp foo.o Makefile.PL));
ok($o =~ /Skipping the following files \(use --nofilter to avoid this\):/m);
-ok(matches($o, '^\|\s+foo\.o', 'mi'), 1);
-ok(matches($o, '^\|\s+Makefile\.PL', 'mi'), 1);
+is(matches($o, '^\|\s+foo\.o', 'mi'), 1);
+is(matches($o, '^\|\s+Makefile\.PL', 'mi'), 1);
ok($o =~ /^Scanning.*foo\.cpp/mi);
ok($o =~ /Analyzing.*foo\.cpp/mi);
-ok(matches($o, '^Scanning', 'm'), 1);
-ok(matches($o, 'Analyzing', 'm'), 1);
+is(matches($o, '^Scanning', 'm'), 1);
+is(matches($o, 'Analyzing', 'm'), 1);
$o = ppport(qw(--nochanges --nofilter foo.cpp foo.o Makefile.PL));
ok($o =~ /^Scanning.*foo\.cpp/mi);
@@ -800,8 +800,8 @@ ok($o =~ /^Scanning.*foo\.o/mi);
ok($o =~ /Analyzing.*foo\.o/mi);
ok($o =~ /^Scanning.*Makefile/mi);
ok($o =~ /Analyzing.*Makefile/mi);
-ok(matches($o, '^Scanning', 'm'), 3);
-ok(matches($o, 'Analyzing', 'm'), 3);
+is(matches($o, '^Scanning', 'm'), 3);
+is(matches($o, 'Analyzing', 'm'), 3);
---------------------------- foo.cpp ------------------------------------------
diff --git a/dist/Devel-PPPort/t/pv_tools.t b/dist/Devel-PPPort/t/pv_tools.t
index 613e646b7b..d887eeac57 100644
--- a/dist/Devel-PPPort/t/pv_tools.t
+++ b/dist/Devel-PPPort/t/pv_tools.t
@@ -60,18 +60,18 @@ ok($uni ? "$]" >= 5.006 : "$]" < 5.008);
my @r;
@r = &Devel::PPPort::pv_pretty();
-ok($r[0], $r[1]);
-ok($r[0], "foobarbaz");
-ok($r[2], $r[3]);
-ok($r[2], '<leftpv_p\retty\nright>');
-ok($r[4], $r[5]);
+is($r[0], $r[1]);
+is($r[0], "foobarbaz");
+is($r[2], $r[3]);
+is($r[2], '<leftpv_p\retty\nright>');
+is($r[4], $r[5]);
if(ord("A") == 65) {
is($r[4], $uni ? 'N\375 Batter\355' : 'N\303\275 Batter\303');
}
else {
skip("Skip for non-ASCII platform");
}
-ok($r[6], $r[7]);
+is($r[6], $r[7]);
if(ord("A") == 65) {
is($r[6], $uni ? '\301g\346tis Byrju...' : '\303\201g\303\246t...');
}
@@ -80,9 +80,9 @@ else {
}
@r = &Devel::PPPort::pv_display();
-ok($r[0], $r[1]);
-ok($r[0], '"foob\0rbaz"\0');
-ok($r[2], $r[3]);
+is($r[0], $r[1]);
+is($r[0], '"foob\0rbaz"\0');
+is($r[2], $r[3]);
ok($r[2] eq '"pv_di"...\0' ||
$r[2] eq '"pv_d"...\0'); # some perl implementations are broken... :(
diff --git a/dist/Devel-PPPort/t/pvs.t b/dist/Devel-PPPort/t/pvs.t
index 7238262e32..7b96bb531d 100644
--- a/dist/Devel-PPPort/t/pvs.t
+++ b/dist/Devel-PPPort/t/pvs.t
@@ -54,24 +54,24 @@ package main;
my $x = 'foo';
-ok(Devel::PPPort::newSVpvs(), "newSVpvs");
-ok(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags");
-ok(Devel::PPPort::newSVpvs_share(), 3);
+is(Devel::PPPort::newSVpvs(), "newSVpvs");
+is(Devel::PPPort::newSVpvs_flags(), "newSVpvs_flags");
+is(Devel::PPPort::newSVpvs_share(), 3);
Devel::PPPort::sv_catpvs($x);
-ok($x, "foosv_catpvs");
+is($x, "foosv_catpvs");
Devel::PPPort::sv_setpvs($x);
-ok($x, "sv_setpvs");
+is($x, "sv_setpvs");
my %h = ('hv_fetchs' => 42);
Devel::PPPort::hv_stores(\%h, 4711);
-ok(scalar keys %h, 2);
+is(scalar keys %h, 2);
ok(exists $h{'hv_stores'});
-ok($h{'hv_stores'}, 4711);
-ok(Devel::PPPort::hv_fetchs(\%h), 42);
-ok(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION);
-ok(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::);
+is($h{'hv_stores'}, 4711);
+is(Devel::PPPort::hv_fetchs(\%h), 42);
+is(Devel::PPPort::gv_fetchpvs(), \*Devel::PPPort::VERSION);
+is(Devel::PPPort::gv_stashpvs(), \%Devel::PPPort::);
-ok(Devel::PPPort::get_cvs(), 3);
+is(Devel::PPPort::get_cvs(), 3);
diff --git a/dist/Devel-PPPort/t/shared_pv.t b/dist/Devel-PPPort/t/shared_pv.t
index a17f2284fe..c705b18bef 100644
--- a/dist/Devel-PPPort/t/shared_pv.t
+++ b/dist/Devel-PPPort/t/shared_pv.t
@@ -52,5 +52,5 @@ bootstrap Devel::PPPort;
package main;
-ok(&Devel::PPPort::newSVpvn_share(), 6);
+is(&Devel::PPPort::newSVpvn_share(), 6);
diff --git a/dist/Devel-PPPort/t/snprintf.t b/dist/Devel-PPPort/t/snprintf.t
index 12ac152a9b..5e6bb33a6b 100644
--- a/dist/Devel-PPPort/t/snprintf.t
+++ b/dist/Devel-PPPort/t/snprintf.t
@@ -53,6 +53,6 @@ bootstrap Devel::PPPort;
package main;
my($l, $s) = Devel::PPPort::my_snprintf();
-ok($l, 8);
-ok($s, "foobar42");
+is($l, 8);
+is($s, "foobar42");
diff --git a/dist/Devel-PPPort/t/sprintf.t b/dist/Devel-PPPort/t/sprintf.t
index cba5ce7222..51a42b08c1 100644
--- a/dist/Devel-PPPort/t/sprintf.t
+++ b/dist/Devel-PPPort/t/sprintf.t
@@ -53,6 +53,6 @@ bootstrap Devel::PPPort;
package main;
my($l, $s) = Devel::PPPort::my_sprintf();
-ok($l, 8);
-ok($s, "foobar42");
+is($l, 8);
+is($s, "foobar42");
diff --git a/dist/Devel-PPPort/t/strlfuncs.t b/dist/Devel-PPPort/t/strlfuncs.t
index 1882399a47..dee840c360 100644
--- a/dist/Devel-PPPort/t/strlfuncs.t
+++ b/dist/Devel-PPPort/t/strlfuncs.t
@@ -64,6 +64,6 @@ my @r = Devel::PPPort::my_strlfunc();
ok(@e == @r);
for (0 .. $#e) {
- ok($r[$_], $e[$_]);
+ is($r[$_], $e[$_]);
}
diff --git a/dist/Devel-PPPort/t/sv_xpvf.t b/dist/Devel-PPPort/t/sv_xpvf.t
index 7e4814c059..3ab10c9617 100644
--- a/dist/Devel-PPPort/t/sv_xpvf.t
+++ b/dist/Devel-PPPort/t/sv_xpvf.t
@@ -58,25 +58,25 @@ tie %h, 'Tie::StdHash';
$h{foo} = 'foo-';
$h{bar} = '';
-ok(&Devel::PPPort::vnewSVpvf(), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
-ok(&Devel::PPPort::sv_vcatpvf('1-2-3-'), "$]" >= 5.004 ? '1-2-3-Perl-42' : '1-2-3-%s-%d');
-ok(&Devel::PPPort::sv_vsetpvf('1-2-3-'), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
+is(&Devel::PPPort::vnewSVpvf(), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
+is(&Devel::PPPort::sv_vcatpvf('1-2-3-'), "$]" >= 5.004 ? '1-2-3-Perl-42' : '1-2-3-%s-%d');
+is(&Devel::PPPort::sv_vsetpvf('1-2-3-'), "$]" >= 5.004 ? 'Perl-42' : '%s-%d');
&Devel::PPPort::sv_catpvf_mg($h{foo});
-ok($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42' : 'foo-');
+is($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42' : 'foo-');
&Devel::PPPort::Perl_sv_catpvf_mg($h{foo});
-ok($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43' : 'foo-');
+is($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43' : 'foo-');
&Devel::PPPort::sv_catpvf_mg_nocontext($h{foo});
-ok($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43-Perl-44' : 'foo-');
+is($h{foo}, "$]" >= 5.004 ? 'foo-Perl-42-Perl-43-Perl-44' : 'foo-');
&Devel::PPPort::sv_setpvf_mg($h{bar});
-ok($h{bar}, "$]" >= 5.004 ? 'mhx-42' : '');
+is($h{bar}, "$]" >= 5.004 ? 'mhx-42' : '');
&Devel::PPPort::Perl_sv_setpvf_mg($h{bar});
-ok($h{bar}, "$]" >= 5.004 ? 'foo-43' : '');
+is($h{bar}, "$]" >= 5.004 ? 'foo-43' : '');
&Devel::PPPort::sv_setpvf_mg_nocontext($h{bar});
-ok($h{bar}, "$]" >= 5.004 ? 'bar-44' : '');
+is($h{bar}, "$]" >= 5.004 ? 'bar-44' : '');
diff --git a/dist/Devel-PPPort/t/testutil.pl b/dist/Devel-PPPort/t/testutil.pl
index eeaa701cf3..942d254ba7 100644
--- a/dist/Devel-PPPort/t/testutil.pl
+++ b/dist/Devel-PPPort/t/testutil.pl
@@ -175,10 +175,6 @@ sub _where {
}
sub ok ($@) {
- if (@_ > 1) { # ok() really was modern 'is', though limited
- local $Level = $Level + 1;
- return is(@_);
- }
my ($pass, $name, @mess) = @_;
_ok($pass, _where(), $name, @mess);
}
diff --git a/dist/Devel-PPPort/t/threads.t b/dist/Devel-PPPort/t/threads.t
index 67a3b4409d..0e16cc719c 100644
--- a/dist/Devel-PPPort/t/threads.t
+++ b/dist/Devel-PPPort/t/threads.t
@@ -52,7 +52,7 @@ bootstrap Devel::PPPort;
package main;
-ok(&Devel::PPPort::no_THX_arg("42"), 43);
+is(&Devel::PPPort::no_THX_arg("42"), 43);
eval { &Devel::PPPort::with_THX_arg("yes\n"); };
ok($@ =~ /^yes/);
diff --git a/dist/Devel-PPPort/t/utf8.t b/dist/Devel-PPPort/t/utf8.t
index c9034266a2..bcd22b89d7 100644
--- a/dist/Devel-PPPort/t/utf8.t
+++ b/dist/Devel-PPPort/t/utf8.t
@@ -60,15 +60,15 @@ if ("$]" <= '5.006' || "$]" == '5.007' ) {
exit;
}
-ok(&Devel::PPPort::UTF8_SAFE_SKIP("A", 0), 1);
-ok(&Devel::PPPort::UTF8_SAFE_SKIP("A", -1), 0);
+is(&Devel::PPPort::UTF8_SAFE_SKIP("A", 0), 1);
+is(&Devel::PPPort::UTF8_SAFE_SKIP("A", -1), 0);
-ok(&Devel::PPPort::isUTF8_CHAR("A", -1), 0);
-ok(&Devel::PPPort::isUTF8_CHAR("A", 0), 1);
-ok(&Devel::PPPort::isUTF8_CHAR("\x{100}", -1), 0);
-ok(&Devel::PPPort::isUTF8_CHAR("\x{100}", 0), 2);
+is(&Devel::PPPort::isUTF8_CHAR("A", -1), 0);
+is(&Devel::PPPort::isUTF8_CHAR("A", 0), 1);
+is(&Devel::PPPort::isUTF8_CHAR("\x{100}", -1), 0);
+is(&Devel::PPPort::isUTF8_CHAR("\x{100}", 0), 2);
-ok(&Devel::PPPort::UVCHR_IS_INVARIANT(ord("A")), 1);
+is(&Devel::PPPort::UVCHR_IS_INVARIANT(ord("A")), 1);
ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0xb6));
ok(! &Devel::PPPort::UVCHR_IS_INVARIANT(0x100));
@@ -76,19 +76,19 @@ if ("$]" < '5.006') {
skip("Perl version too early", 9);
}
else {
- ok(&Devel::PPPort::UVCHR_SKIP(ord("A")), 1);
- ok(&Devel::PPPort::UVCHR_SKIP(0xb6), 2, "This is a test");
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FF), 2);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFF), 3);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFF), 4);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFFF), 5);
- ok(&Devel::PPPort::UVCHR_SKIP(0x3FFFFFF), ord("A") == 65 ? 5 : 6);
- ok(&Devel::PPPort::UVCHR_SKIP(0x4000000), ord("A") == 65 ? 6 : 7);
+ is(&Devel::PPPort::UVCHR_SKIP(ord("A")), 1);
+ is(&Devel::PPPort::UVCHR_SKIP(0xb6), 2, "This is a test");
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FF), 2);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFF), 3);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFFF), 4);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFFFF), 5);
+ is(&Devel::PPPort::UVCHR_SKIP(0x3FFFFFF), ord("A") == 65 ? 5 : 6);
+ is(&Devel::PPPort::UVCHR_SKIP(0x4000000), ord("A") == 65 ? 6 : 7);
if (ord("A") != 65) {
skip("Test not valid on EBCDIC", 1)
}
else {
- ok(&Devel::PPPort::UVCHR_SKIP(0xFFFFFFFF), 7);
+ is(&Devel::PPPort::UVCHR_SKIP(0xFFFFFFFF), 7);
}
}
@@ -96,34 +96,34 @@ if ("$]" < '5.008') {
skip("Perl version too early", 3);
}
else {
- ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{101}", 3, 1), 1);
- ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{102}", 3, 1), 0);
- ok(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "b\x{101}", 3, 1), 0);
+ is(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{101}", 3, 1), 1);
+ is(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "a\x{102}", 3, 1), 0);
+ is(&Devel::PPPort::foldEQ_utf8("A\x{100}", 3, 1, "b\x{101}", 3, 1), 0);
}
my $ret = &Devel::PPPort::utf8_to_uvchr("A");
-ok($ret->[0], ord("A"));
-ok($ret->[1], 1);
+is($ret->[0], ord("A"));
+is($ret->[1], 1);
$ret = &Devel::PPPort::utf8_to_uvchr("\0");
-ok($ret->[0], 0);
-ok($ret->[1], 1);
+is($ret->[0], 0);
+is($ret->[1], 1);
$ret = &Devel::PPPort::utf8_to_uvchr_buf("A", 0);
-ok($ret->[0], ord("A"));
-ok($ret->[1], 1);
+is($ret->[0], ord("A"));
+is($ret->[1], 1);
$ret = &Devel::PPPort::utf8_to_uvchr_buf("\0", 0);
-ok($ret->[0], 0);
-ok($ret->[1], 1);
+is($ret->[0], 0);
+is($ret->[1], 1);
if (ord("A") != 65) { # tests not valid for EBCDIC
skip("Perl version too early", 1 .. (2 + 4 + (7 * 5)));
}
else {
$ret = &Devel::PPPort::utf8_to_uvchr_buf("\xc4\x80", 0);
- ok($ret->[0], 0x100);
- ok($ret->[1], 2);
+ is($ret->[0], 0x100);
+ is($ret->[1], 2);
my @warnings;
local $SIG{__WARN__} = sub { push @warnings, @_; };
@@ -131,13 +131,13 @@ else {
{
BEGIN { 'warnings'->import('utf8') if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr("\xe0\0\x80");
- ok($ret->[0], 0);
- ok($ret->[1], -1);
+ is($ret->[0], 0);
+ is($ret->[1], -1);
BEGIN { 'warnings'->unimport() if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr("\xe0\0\x80");
- ok($ret->[0], 0xFFFD);
- ok($ret->[1], 1);
+ is($ret->[0], 0xFFFD);
+ is($ret->[1], 1);
}
my @buf_tests = (
@@ -210,18 +210,18 @@ else {
undef @warnings;
BEGIN { 'warnings'->import('utf8') if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr_buf($input, $adjustment);
- ok($ret->[0], 0, "returned value $display; warnings enabled");
- ok($ret->[1], -1, "returned length $display; warnings enabled");
+ is($ret->[0], 0, "returned value $display; warnings enabled");
+ is($ret->[1], -1, "returned length $display; warnings enabled");
my $all_warnings = join "; ", @warnings;
my $contains = grep { $_ =~ $warning } $all_warnings;
- ok($contains, 1, $display
+ is($contains, 1, $display
. "; Got: '$all_warnings', which should contain '$warning'");
undef @warnings;
BEGIN { 'warnings'->unimport('utf8') if "$]" > '5.006' }
$ret = &Devel::PPPort::utf8_to_uvchr_buf($input, $adjustment);
- ok($ret->[0], 0xFFFD, "returned value $display; warnings disabled");
- ok($ret->[1], $test->{'no_warnings_returned_length'},
+ is($ret->[0], 0xFFFD, "returned value $display; warnings disabled");
+ is($ret->[1], $test->{'no_warnings_returned_length'},
"returned length $display; warnings disabled");
}
}
@@ -229,38 +229,38 @@ else {
if ("$]" ge '5.008') {
BEGIN { if ("$]" ge '5.008') { require utf8; "utf8"->import() } }
- ok(Devel::PPPort::sv_len_utf8("aščť"), 4);
- ok(Devel::PPPort::sv_len_utf8_nomg("aščť"), 4);
+ is(Devel::PPPort::sv_len_utf8("aščť"), 4);
+ is(Devel::PPPort::sv_len_utf8_nomg("aščť"), 4);
my $str = "áíé";
utf8::downgrade($str);
- ok(Devel::PPPort::sv_len_utf8($str), 3);
+ is(Devel::PPPort::sv_len_utf8($str), 3);
utf8::downgrade($str);
- ok(Devel::PPPort::sv_len_utf8_nomg($str), 3);
+ is(Devel::PPPort::sv_len_utf8_nomg($str), 3);
utf8::upgrade($str);
- ok(Devel::PPPort::sv_len_utf8($str), 3);
+ is(Devel::PPPort::sv_len_utf8($str), 3);
utf8::upgrade($str);
- ok(Devel::PPPort::sv_len_utf8_nomg($str), 3);
+ is(Devel::PPPort::sv_len_utf8_nomg($str), 3);
tie my $scalar, 'TieScalarCounter', "é";
- ok(tied($scalar)->{fetch}, 0);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8($scalar), 2);
- ok(tied($scalar)->{fetch}, 1);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8($scalar), 3);
- ok(tied($scalar)->{fetch}, 2);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8($scalar), 4);
- ok(tied($scalar)->{fetch}, 3);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
- ok(tied($scalar)->{fetch}, 3);
- ok(tied($scalar)->{store}, 0);
- ok(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
- ok(tied($scalar)->{fetch}, 3);
- ok(tied($scalar)->{store}, 0);
+ is(tied($scalar)->{fetch}, 0);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8($scalar), 2);
+ is(tied($scalar)->{fetch}, 1);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8($scalar), 3);
+ is(tied($scalar)->{fetch}, 2);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8($scalar), 4);
+ is(tied($scalar)->{fetch}, 3);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
+ is(tied($scalar)->{fetch}, 3);
+ is(tied($scalar)->{store}, 0);
+ is(Devel::PPPort::sv_len_utf8_nomg($scalar), 4);
+ is(tied($scalar)->{fetch}, 3);
+ is(tied($scalar)->{store}, 0);
} else {
skip 'skip: no SV_NOSTEAL support', 23;
}
diff --git a/dist/Devel-PPPort/t/uv.t b/dist/Devel-PPPort/t/uv.t
index 39e44beb3c..e915cfd0bc 100644
--- a/dist/Devel-PPPort/t/uv.t
+++ b/dist/Devel-PPPort/t/uv.t
@@ -54,15 +54,15 @@ package main;
BEGIN { require warnings if "$]" > '5.006' }
-ok(&Devel::PPPort::sv_setuv(42), 42);
-ok(&Devel::PPPort::newSVuv(123), 123);
-ok(&Devel::PPPort::sv_2uv("4711"), 4711);
-ok(&Devel::PPPort::sv_2uv("1735928559"), 1735928559);
-ok(&Devel::PPPort::SvUVx("1735928559"), 1735928559);
-ok(&Devel::PPPort::SvUVx(1735928559), 1735928559);
-ok(&Devel::PPPort::SvUVx(0xdeadbeef), 0xdeadbeef);
-ok(&Devel::PPPort::XSRETURN_UV(), 42);
-ok(&Devel::PPPort::PUSHu(), 42);
-ok(&Devel::PPPort::XPUSHu(), 43);
-ok(&Devel::PPPort::my_strnlen("abc\0def", 7), 3);
+is(&Devel::PPPort::sv_setuv(42), 42);
+is(&Devel::PPPort::newSVuv(123), 123);
+is(&Devel::PPPort::sv_2uv("4711"), 4711);
+is(&Devel::PPPort::sv_2uv("1735928559"), 1735928559);
+is(&Devel::PPPort::SvUVx("1735928559"), 1735928559);
+is(&Devel::PPPort::SvUVx(1735928559), 1735928559);
+is(&Devel::PPPort::SvUVx(0xdeadbeef), 0xdeadbeef);
+is(&Devel::PPPort::XSRETURN_UV(), 42);
+is(&Devel::PPPort::PUSHu(), 42);
+is(&Devel::PPPort::XPUSHu(), 43);
+is(&Devel::PPPort::my_strnlen("abc\0def", 7), 3);
diff --git a/dist/Devel-PPPort/t/variables.t b/dist/Devel-PPPort/t/variables.t
index 842b75c51c..fb836f1be4 100644
--- a/dist/Devel-PPPort/t/variables.t
+++ b/dist/Devel-PPPort/t/variables.t
@@ -57,13 +57,13 @@ ok(Devel::PPPort::compare_PL_signals());
ok(!defined(&Devel::PPPort::PL_sv_undef()));
ok(&Devel::PPPort::PL_sv_yes());
ok(!&Devel::PPPort::PL_sv_no());
-ok(&Devel::PPPort::PL_na("abcd"), 4);
-ok(&Devel::PPPort::PL_Sv(), "mhx");
+is(&Devel::PPPort::PL_na("abcd"), 4);
+is(&Devel::PPPort::PL_Sv(), "mhx");
ok(defined &Devel::PPPort::PL_tokenbuf());
ok("$]" >= 5.009005 || &Devel::PPPort::PL_parser());
ok(&Devel::PPPort::PL_hexdigit() =~ /^[0-9a-zA-Z]+$/);
ok(defined &Devel::PPPort::PL_hints());
-ok(&Devel::PPPort::PL_ppaddr("mhx"), "MHX");
+is(&Devel::PPPort::PL_ppaddr("mhx"), "MHX");
for (&Devel::PPPort::other_variables()) {
ok($_ != 0);
@@ -89,7 +89,7 @@ for (&Devel::PPPort::other_variables()) {
else {
ok(@w == 0);
}
- ok($fail, 0);
+ is($fail, 0);
}
ok(&Devel::PPPort::no_dummy_parser_vars(1) >= ("$]" < 5.009005 ? 1 : 0));
@@ -97,7 +97,7 @@ ok(&Devel::PPPort::no_dummy_parser_vars(1) >= ("$]" < 5.009005 ? 1 : 0));
eval { &Devel::PPPort::no_dummy_parser_vars(0) };
if ("$]" < 5.009005) {
- ok($@, '');
+ is($@, '');
}
else {
if ($@) {
diff --git a/dist/Devel-PPPort/t/warn.t b/dist/Devel-PPPort/t/warn.t
index 0707e763e5..734332a25a 100644
--- a/dist/Devel-PPPort/t/warn.t
+++ b/dist/Devel-PPPort/t/warn.t
@@ -72,7 +72,7 @@ ok("$]" >= 5.004 ? $warning =~ /^Perl_warner_nocontext bar:42/ : $warning eq '')
$warning = '';
Devel::PPPort::ckWARN();
-ok($warning, '');
+is($warning, '');
$^W = 1;