Don't use Test::More in core tests (at least, where
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 20 Apr 2007 13:42:21 +0000 (13:42 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 20 Apr 2007 13:42:21 +0000 (13:42 +0000)
that's possible, that is where is_deeply() isn't used)

p4raw-id: //depot/perl@30993

t/mro/c3_with_overload.t
t/mro/inconsistent_c3.t
t/mro/method_caching.t
t/mro/next_method_edge_cases.t
t/mro/next_method_in_anon.t
t/mro/next_method_in_eval.t
t/mro/next_method_used_with_NEXT.t
t/mro/overload_c3.t
t/mro/overload_dfs.t
t/mro/recursion_c3.t
t/mro/recursion_dfs.t

index 88170f3..498ce2f 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 7;
+require q(./test.pl); plan(tests => 7);
 
 {
     package BaseTest;
index 07f83c2..14f652c 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     }
 }
 
-use Test::More tests => 1;
+require q(./test.pl); plan(tests => 1);
 
 =pod
 
index 8013a0a..dd70da6 100644 (file)
@@ -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);
index 496537c..91c2c85 100644 (file)
@@ -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);
index e135d54..b6f0451 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 2;
+require q(./test.pl); plan(tests => 2);
 
 =pod
 
index d55ce80..f8c13a6 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 1;
+require q(./test.pl); plan(tests => 1);
 
 =pod
 
index f7a8c11..e8d85fc 100644 (file)
@@ -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';
     
index e227dcd..a62e631 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     }
 }
 
-use Test::More tests => 7;
+require q(./test.pl); plan(tests => 7);
 
 {
     package BaseTest;
index 98f9a2c..89f11d0 100644 (file)
@@ -9,7 +9,7 @@ BEGIN {
     }
 }
 
-use Test::More tests => 7;
+require q(./test.pl); plan(tests => 7);
 
 {
     package BaseTest;
index 60b174b..7aa4a7b 100644 (file)
@@ -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
 
index a3d610e..313a4ed 100644 (file)
@@ -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