From: Rafael Garcia-Suarez Date: Fri, 20 Apr 2007 13:42:21 +0000 (+0000) Subject: Don't use Test::More in core tests (at least, where X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5f5ae4a7c00fa8527fbc1cf66da85ee1690fc1a7;p=p5sagit%2Fp5-mst-13.2.git Don't use Test::More in core tests (at least, where that's possible, that is where is_deeply() isn't used) p4raw-id: //depot/perl@30993 --- diff --git a/t/mro/c3_with_overload.t b/t/mro/c3_with_overload.t index 88170f3..498ce2f 100644 --- a/t/mro/c3_with_overload.t +++ b/t/mro/c3_with_overload.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 7; +require q(./test.pl); plan(tests => 7); { package BaseTest; diff --git a/t/mro/inconsistent_c3.t b/t/mro/inconsistent_c3.t index 07f83c2..14f652c 100644 --- a/t/mro/inconsistent_c3.t +++ b/t/mro/inconsistent_c3.t @@ -9,7 +9,7 @@ BEGIN { } } -use Test::More tests => 1; +require q(./test.pl); plan(tests => 1); =pod diff --git a/t/mro/method_caching.t b/t/mro/method_caching.t index 8013a0a..dd70da6 100644 --- a/t/mro/method_caching.t +++ b/t/mro/method_caching.t @@ -12,7 +12,7 @@ BEGIN { } } -use Test::More; +require './test.pl'; { package MCTest::Base; @@ -40,7 +40,7 @@ my @testsubs = ( sub { *XYZ = sub { $_[1]+8 }; ${MCTest::Base::}{foo} = \&XYZ; is(MCTest::Derived->foo(0), 8); }, ); -plan tests => scalar(@testsubs) + 1; +plan(tests => scalar(@testsubs) + 1); is(MCTest::Derived->foo(0), 1); $_->() for (@testsubs); diff --git a/t/mro/next_method_edge_cases.t b/t/mro/next_method_edge_cases.t index 496537c..91c2c85 100644 --- a/t/mro/next_method_edge_cases.t +++ b/t/mro/next_method_edge_cases.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 11; +require q(./test.pl); plan(tests => 11); { @@ -41,7 +41,7 @@ use Test::More tests => 11; # test it working with with Sub::Name SKIP: { eval 'use Sub::Name'; - skip "Sub::Name is required for this test", 3 if $@; + skip("Sub::Name is required for this test", 3) if $@; my $m = sub { (shift)->next::method() }; Sub::Name::subname('Bar::bar', $m); diff --git a/t/mro/next_method_in_anon.t b/t/mro/next_method_in_anon.t index e135d54..b6f0451 100644 --- a/t/mro/next_method_in_anon.t +++ b/t/mro/next_method_in_anon.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 2; +require q(./test.pl); plan(tests => 2); =pod diff --git a/t/mro/next_method_in_eval.t b/t/mro/next_method_in_eval.t index d55ce80..f8c13a6 100644 --- a/t/mro/next_method_in_eval.t +++ b/t/mro/next_method_in_eval.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 1; +require q(./test.pl); plan(tests => 1); =pod diff --git a/t/mro/next_method_used_with_NEXT.t b/t/mro/next_method_used_with_NEXT.t index f7a8c11..e8d85fc 100644 --- a/t/mro/next_method_used_with_NEXT.t +++ b/t/mro/next_method_used_with_NEXT.t @@ -2,14 +2,10 @@ use strict; use warnings; +use NEXT; -use Test::More; - -BEGIN { - eval "use NEXT"; - plan skip_all => "NEXT required for this test" if $@; - plan tests => 4; -} +require './test.pl'; +plan(tests => 4); { package Foo; @@ -38,7 +34,6 @@ BEGIN { package Baz; use strict; use warnings; - require NEXT; # load this as late as possible so we can catch the test skip use base 'Bar', 'Fuz'; diff --git a/t/mro/overload_c3.t b/t/mro/overload_c3.t index e227dcd..a62e631 100644 --- a/t/mro/overload_c3.t +++ b/t/mro/overload_c3.t @@ -9,7 +9,7 @@ BEGIN { } } -use Test::More tests => 7; +require q(./test.pl); plan(tests => 7); { package BaseTest; diff --git a/t/mro/overload_dfs.t b/t/mro/overload_dfs.t index 98f9a2c..89f11d0 100644 --- a/t/mro/overload_dfs.t +++ b/t/mro/overload_dfs.t @@ -9,7 +9,7 @@ BEGIN { } } -use Test::More tests => 7; +require q(./test.pl); plan(tests => 7); { package BaseTest; diff --git a/t/mro/recursion_c3.t b/t/mro/recursion_c3.t index 60b174b..7aa4a7b 100644 --- a/t/mro/recursion_c3.t +++ b/t/mro/recursion_c3.t @@ -9,11 +9,11 @@ BEGIN { } } -use Test::More; +require './test.pl'; use mro; -plan skip_all => "Your system has no SIGALRM" if !exists $SIG{ALRM}; -plan tests => 8; +plan(skip_all => "Your system has no SIGALRM") if !exists $SIG{ALRM}; +plan(tests => 8); =pod diff --git a/t/mro/recursion_dfs.t b/t/mro/recursion_dfs.t index a3d610e..313a4ed 100644 --- a/t/mro/recursion_dfs.t +++ b/t/mro/recursion_dfs.t @@ -9,11 +9,11 @@ BEGIN { } } -use Test::More; +require './test.pl'; use mro; -plan skip_all => "Your system has no SIGALRM" if !exists $SIG{ALRM}; -plan tests => 8; +plan(skip_all => "Your system has no SIGALRM") if !exists $SIG{ALRM}; +plan(tests => 8); =pod