summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-21 09:08:04 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-04-21 09:08:04 +0000
commitc94dd5be9196e7fc999830ac8069b03bb8f510be (patch)
tree81d7e73ad7c941ff0aa3b605c46503fdb8c3e178 /t
parent640da897d5acac197d270d816dc0d8bad1c1cedb (diff)
downloadperl-c94dd5be9196e7fc999830ac8069b03bb8f510be.tar.gz
Completely remove Test::More from the MRO tests, by Brandon Black
p4raw-id: //depot/perl@31004
Diffstat (limited to 't')
-rw-r--r--t/mro/basic.t26
-rw-r--r--t/mro/basic_01_c3.t14
-rw-r--r--t/mro/basic_01_dfs.t14
-rw-r--r--t/mro/basic_02_c3.t44
-rw-r--r--t/mro/basic_02_dfs.t44
-rw-r--r--t/mro/basic_03_c3.t14
-rw-r--r--t/mro/basic_03_dfs.t14
-rw-r--r--t/mro/basic_04_c3.t14
-rw-r--r--t/mro/basic_04_dfs.t14
-rw-r--r--t/mro/basic_05_c3.t14
-rw-r--r--t/mro/basic_05_dfs.t14
-rw-r--r--t/mro/complex_c3.t74
-rw-r--r--t/mro/complex_dfs.t74
-rw-r--r--t/mro/dbic_c3.t14
-rw-r--r--t/mro/dbic_dfs.t14
-rw-r--r--t/mro/next_method.t8
-rw-r--r--t/mro/next_skip.t8
-rw-r--r--t/mro/vulcan_c3.t15
-rw-r--r--t/mro/vulcan_dfs.t15
19 files changed, 172 insertions, 276 deletions
diff --git a/t/mro/basic.t b/t/mro/basic.t
index 303708e1bd..3f1d1cf3c6 100644
--- a/t/mro/basic.t
+++ b/t/mro/basic.t
@@ -3,16 +3,7 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-
-use Test::More;
-
-plan tests => 8;
+require q(./test.pl); plan(tests => 8);
{
package MRO_A;
@@ -30,19 +21,22 @@ plan tests => 8;
}
is(mro::get_mro('MRO_F'), 'dfs');
-is_deeply(mro::get_linear_isa('MRO_F'),
+ok(eq_array(
+ mro::get_linear_isa('MRO_F'),
[qw/MRO_F MRO_D MRO_A MRO_B MRO_C MRO_E/]
-);
+));
mro::set_mro('MRO_F', 'c3');
is(mro::get_mro('MRO_F'), 'c3');
-is_deeply(mro::get_linear_isa('MRO_F'),
+ok(eq_array(
+ mro::get_linear_isa('MRO_F'),
[qw/MRO_F MRO_D MRO_E MRO_A MRO_B MRO_C/]
-);
+));
my @isarev = sort { $a cmp $b } mro::get_isarev('MRO_B');
-is_deeply(\@isarev,
+ok(eq_array(
+ \@isarev,
[qw/MRO_D MRO_E MRO_F/]
-);
+));
ok(!mro::is_universal('MRO_B'));
diff --git a/t/mro/basic_01_c3.t b/t/mro/basic_01_c3.t
index 95d347967f..2bcb22556a 100644
--- a/t/mro/basic_01_c3.t
+++ b/t/mro/basic_01_c3.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 4;
+require q(./test.pl); plan(tests => 4);
=pod
@@ -43,10 +37,10 @@ This tests the classic diamond inheritence pattern.
use mro 'c3';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Diamond_D'),
- [ qw(Diamond_D Diamond_B Diamond_C Diamond_A) ],
- '... got the right MRO for Diamond_D');
+ [ qw(Diamond_D Diamond_B Diamond_C Diamond_A) ]
+), '... got the right MRO for Diamond_D');
is(Diamond_D->hello, 'Diamond_C::hello', '... method resolved itself as expected');
is(Diamond_D->can('hello')->(), 'Diamond_C::hello', '... can(method) resolved itself as expected');
diff --git a/t/mro/basic_01_dfs.t b/t/mro/basic_01_dfs.t
index 11c15a264c..dfa6d3b982 100644
--- a/t/mro/basic_01_dfs.t
+++ b/t/mro/basic_01_dfs.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 4;
+require q(./test.pl); plan(tests => 4);
=pod
@@ -43,10 +37,10 @@ This tests the classic diamond inheritence pattern.
use mro 'dfs';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Diamond_D'),
- [ qw(Diamond_D Diamond_B Diamond_A Diamond_C) ],
- '... got the right MRO for Diamond_D');
+ [ qw(Diamond_D Diamond_B Diamond_A Diamond_C) ]
+), '... got the right MRO for Diamond_D');
is(Diamond_D->hello, 'Diamond_A::hello', '... method resolved itself as expected');
is(Diamond_D->can('hello')->(), 'Diamond_A::hello', '... can(method) resolved itself as expected');
diff --git a/t/mro/basic_02_c3.t b/t/mro/basic_02_c3.t
index 86fbc32f66..b2c3ce4cd1 100644
--- a/t/mro/basic_02_c3.t
+++ b/t/mro/basic_02_c3.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 10;
+require q(./test.pl); plan(tests => 10);
=pod
@@ -85,35 +79,35 @@ Level 0 0 | A | (more specialized)
use mro 'c3';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::F'),
- [ qw(Test::F Test::O) ],
- '... got the right MRO for Test::F');
+ [ qw(Test::F Test::O) ]
+), '... got the right MRO for Test::F');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::E'),
- [ qw(Test::E Test::O) ],
- '... got the right MRO for Test::E');
+ [ qw(Test::E Test::O) ]
+), '... got the right MRO for Test::E');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::D'),
- [ qw(Test::D Test::O) ],
- '... got the right MRO for Test::D');
+ [ qw(Test::D Test::O) ]
+), '... got the right MRO for Test::D');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::C'),
- [ qw(Test::C Test::D Test::F Test::O) ],
- '... got the right MRO for Test::C');
+ [ qw(Test::C Test::D Test::F Test::O) ]
+), '... got the right MRO for Test::C');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::B'),
- [ qw(Test::B Test::D Test::E Test::O) ],
- '... got the right MRO for Test::B');
+ [ qw(Test::B Test::D Test::E Test::O) ]
+), '... got the right MRO for Test::B');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::A'),
- [ qw(Test::A Test::B Test::C Test::D Test::E Test::F Test::O) ],
- '... got the right MRO for Test::A');
+ [ qw(Test::A Test::B Test::C Test::D Test::E Test::F Test::O) ]
+), '... got the right MRO for Test::A');
is(Test::A->C_or_D, 'Test::C', '... got the expected method output');
is(Test::A->can('C_or_D')->(), 'Test::C', '... can got the expected method output');
diff --git a/t/mro/basic_02_dfs.t b/t/mro/basic_02_dfs.t
index bbce6a05a0..a4bad46db4 100644
--- a/t/mro/basic_02_dfs.t
+++ b/t/mro/basic_02_dfs.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 10;
+require q(./test.pl); plan(tests => 10);
=pod
@@ -85,35 +79,35 @@ Level 0 0 | A | (more specialized)
use mro 'dfs';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::F'),
- [ qw(Test::F Test::O) ],
- '... got the right MRO for Test::F');
+ [ qw(Test::F Test::O) ]
+), '... got the right MRO for Test::F');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::E'),
- [ qw(Test::E Test::O) ],
- '... got the right MRO for Test::E');
+ [ qw(Test::E Test::O) ]
+), '... got the right MRO for Test::E');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::D'),
- [ qw(Test::D Test::O) ],
- '... got the right MRO for Test::D');
+ [ qw(Test::D Test::O) ]
+), '... got the right MRO for Test::D');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::C'),
- [ qw(Test::C Test::D Test::O Test::F) ],
- '... got the right MRO for Test::C');
+ [ qw(Test::C Test::D Test::O Test::F) ]
+), '... got the right MRO for Test::C');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::B'),
- [ qw(Test::B Test::D Test::O Test::E) ],
- '... got the right MRO for Test::B');
+ [ qw(Test::B Test::D Test::O Test::E) ]
+), '... got the right MRO for Test::B');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::A'),
- [ qw(Test::A Test::B Test::D Test::O Test::E Test::C Test::F) ],
- '... got the right MRO for Test::A');
+ [ qw(Test::A Test::B Test::D Test::O Test::E Test::C Test::F) ]
+), '... got the right MRO for Test::A');
is(Test::A->C_or_D, 'Test::D', '... got the expected method output');
is(Test::A->can('C_or_D')->(), 'Test::D', '... can got the expected method output');
diff --git a/t/mro/basic_03_c3.t b/t/mro/basic_03_c3.t
index 08dfea8666..f6606f65d2 100644
--- a/t/mro/basic_03_c3.t
+++ b/t/mro/basic_03_c3.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 4;
+require q(./test.pl); plan(tests => 4);
=pod
@@ -92,10 +86,10 @@ Level 0 0 | A |
use mro 'c3';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::A'),
- [ qw(Test::A Test::B Test::E Test::C Test::D Test::F Test::O) ],
- '... got the right MRO for Test::A');
+ [ qw(Test::A Test::B Test::E Test::C Test::D Test::F Test::O) ]
+), '... got the right MRO for Test::A');
is(Test::A->O_or_D, 'Test::D', '... got the right method dispatch');
is(Test::A->O_or_F, 'Test::F', '... got the right method dispatch');
diff --git a/t/mro/basic_03_dfs.t b/t/mro/basic_03_dfs.t
index d2af5b2ac9..5794d8ff7f 100644
--- a/t/mro/basic_03_dfs.t
+++ b/t/mro/basic_03_dfs.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 4;
+require q(./test.pl); plan(tests => 4);
=pod
@@ -92,10 +86,10 @@ Level 0 0 | A |
use mro 'dfs';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::A'),
- [ qw(Test::A Test::B Test::E Test::O Test::D Test::C Test::F) ],
- '... got the right MRO for Test::A');
+ [ qw(Test::A Test::B Test::E Test::O Test::D Test::C Test::F) ]
+), '... got the right MRO for Test::A');
is(Test::A->O_or_D, 'Test::O', '... got the right method dispatch');
is(Test::A->O_or_F, 'Test::O', '... got the right method dispatch');
diff --git a/t/mro/basic_04_c3.t b/t/mro/basic_04_c3.t
index f7e92ecfc2..dbfc883892 100644
--- a/t/mro/basic_04_c3.t
+++ b/t/mro/basic_04_c3.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 1;
+require q(./test.pl); plan(tests => 1);
=pod
@@ -33,8 +27,8 @@ From the parrot test t/pmc/object-meths.t
package t::lib::F; use mro 'c3'; use base ('t::lib::C', 't::lib::D');
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('t::lib::F'),
- [ qw(t::lib::F t::lib::C t::lib::D t::lib::A t::lib::B t::lib::E) ],
- '... got the right MRO for t::lib::F');
+ [ qw(t::lib::F t::lib::C t::lib::D t::lib::A t::lib::B t::lib::E) ]
+), '... got the right MRO for t::lib::F');
diff --git a/t/mro/basic_04_dfs.t b/t/mro/basic_04_dfs.t
index bb6a352c76..e49f4f46a1 100644
--- a/t/mro/basic_04_dfs.t
+++ b/t/mro/basic_04_dfs.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 1;
+require q(./test.pl); plan(tests => 1);
=pod
@@ -33,8 +27,8 @@ From the parrot test t/pmc/object-meths.t
package t::lib::F; use mro 'dfs'; use base ('t::lib::C', 't::lib::D');
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('t::lib::F'),
- [ qw(t::lib::F t::lib::C t::lib::A t::lib::B t::lib::D t::lib::E) ],
- '... got the right MRO for t::lib::F');
+ [ qw(t::lib::F t::lib::C t::lib::A t::lib::B t::lib::D t::lib::E) ]
+), '... got the right MRO for t::lib::F');
diff --git a/t/mro/basic_05_c3.t b/t/mro/basic_05_c3.t
index 91f2e35eb2..1558585a02 100644
--- a/t/mro/basic_05_c3.t
+++ b/t/mro/basic_05_c3.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 2;
+require q(./test.pl); plan(tests => 2);
=pod
@@ -51,10 +45,10 @@ while building DBIx::Class. Thanks Matt!!!!
sub foo { 'Diamond_D::foo => ' . (shift)->SUPER::foo }
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Diamond_D'),
- [ qw(Diamond_D Diamond_C Diamond_B Diamond_A) ],
- '... got the right MRO for Diamond_D');
+ [ qw(Diamond_D Diamond_C Diamond_B Diamond_A) ]
+), '... got the right MRO for Diamond_D');
is(Diamond_D->foo,
'Diamond_D::foo => Diamond_B::foo => Diamond_A::foo',
diff --git a/t/mro/basic_05_dfs.t b/t/mro/basic_05_dfs.t
index 187a640396..0fee5c589d 100644
--- a/t/mro/basic_05_dfs.t
+++ b/t/mro/basic_05_dfs.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 2;
+require q(./test.pl); plan(tests => 2);
=pod
@@ -51,10 +45,10 @@ while building DBIx::Class. Thanks Matt!!!!
sub foo { 'Diamond_D::foo => ' . (shift)->SUPER::foo }
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Diamond_D'),
- [ qw(Diamond_D Diamond_C Diamond_A Diamond_B) ],
- '... got the right MRO for Diamond_D');
+ [ qw(Diamond_D Diamond_C Diamond_A Diamond_B) ]
+), '... got the right MRO for Diamond_D');
is(Diamond_D->foo,
'Diamond_D::foo => Diamond_A::foo',
diff --git a/t/mro/complex_c3.t b/t/mro/complex_c3.t
index 72c9c02181..9d8e18e69a 100644
--- a/t/mro/complex_c3.t
+++ b/t/mro/complex_c3.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 12;
+require q(./test.pl); plan(tests => 12);
=pod
@@ -90,59 +84,59 @@ KJIHGFEDABC
sub testmeth { shift->next::method }
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::A'),
- [ qw(Test::A) ],
- '... got the right C3 merge order for Test::A');
+ [ qw(Test::A) ]
+), '... got the right C3 merge order for Test::A');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::B'),
- [ qw(Test::B) ],
- '... got the right C3 merge order for Test::B');
+ [ qw(Test::B) ]
+), '... got the right C3 merge order for Test::B');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::C'),
- [ qw(Test::C) ],
- '... got the right C3 merge order for Test::C');
+ [ qw(Test::C) ]
+), '... got the right C3 merge order for Test::C');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::D'),
- [ qw(Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::D');
+ [ qw(Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::D');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::E'),
- [ qw(Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::E');
+ [ qw(Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::E');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::F'),
- [ qw(Test::F Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::F');
+ [ qw(Test::F Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::F');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::G'),
- [ qw(Test::G Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::G');
+ [ qw(Test::G Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::G');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::H'),
- [ qw(Test::H Test::G Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::H');
+ [ qw(Test::H Test::G Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::H');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::I'),
- [ qw(Test::I Test::H Test::G Test::F Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::I');
+ [ qw(Test::I Test::H Test::G Test::F Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::I');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::J'),
- [ qw(Test::J Test::F Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::J');
+ [ qw(Test::J Test::F Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::J');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::K'),
- [ qw(Test::K Test::J Test::I Test::H Test::G Test::F Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right C3 merge order for Test::K');
+ [ qw(Test::K Test::J Test::I Test::H Test::G Test::F Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right C3 merge order for Test::K');
is(Test::K->testmeth(), "right", 'next::method working ok');
diff --git a/t/mro/complex_dfs.t b/t/mro/complex_dfs.t
index d864555f91..905ac2d69f 100644
--- a/t/mro/complex_dfs.t
+++ b/t/mro/complex_dfs.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 11;
+require q(./test.pl); plan(tests => 11);
=pod
@@ -87,57 +81,57 @@ KJIHGFEDABC
use base qw/Test::J Test::I/;
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::A'),
- [ qw(Test::A) ],
- '... got the right DFS merge order for Test::A');
+ [ qw(Test::A) ]
+), '... got the right DFS merge order for Test::A');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::B'),
- [ qw(Test::B) ],
- '... got the right DFS merge order for Test::B');
+ [ qw(Test::B) ]
+), '... got the right DFS merge order for Test::B');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::C'),
- [ qw(Test::C) ],
- '... got the right DFS merge order for Test::C');
+ [ qw(Test::C) ]
+), '... got the right DFS merge order for Test::C');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::D'),
- [ qw(Test::D Test::A Test::B Test::C) ],
- '... got the right DFS merge order for Test::D');
+ [ qw(Test::D Test::A Test::B Test::C) ]
+), '... got the right DFS merge order for Test::D');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::E'),
- [ qw(Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right DFS merge order for Test::E');
+ [ qw(Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right DFS merge order for Test::E');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::F'),
- [ qw(Test::F Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right DFS merge order for Test::F');
+ [ qw(Test::F Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right DFS merge order for Test::F');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::G'),
- [ qw(Test::G Test::D Test::A Test::B Test::C) ],
- '... got the right DFS merge order for Test::G');
+ [ qw(Test::G Test::D Test::A Test::B Test::C) ]
+), '... got the right DFS merge order for Test::G');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::H'),
- [ qw(Test::H Test::G Test::D Test::A Test::B Test::C) ],
- '... got the right DFS merge order for Test::H');
+ [ qw(Test::H Test::G Test::D Test::A Test::B Test::C) ]
+), '... got the right DFS merge order for Test::H');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::I'),
- [ qw(Test::I Test::H Test::G Test::D Test::A Test::B Test::C Test::F Test::E) ],
- '... got the right DFS merge order for Test::I');
+ [ qw(Test::I Test::H Test::G Test::D Test::A Test::B Test::C Test::F Test::E) ]
+), '... got the right DFS merge order for Test::I');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::J'),
- [ qw(Test::J Test::F Test::E Test::D Test::A Test::B Test::C) ],
- '... got the right DFS merge order for Test::J');
+ [ qw(Test::J Test::F Test::E Test::D Test::A Test::B Test::C) ]
+), '... got the right DFS merge order for Test::J');
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Test::K'),
- [ qw(Test::K Test::J Test::F Test::E Test::D Test::A Test::B Test::C Test::I Test::H Test::G) ],
- '... got the right DFS merge order for Test::K');
+ [ qw(Test::K Test::J Test::F Test::E Test::D Test::A Test::B Test::C Test::I Test::H Test::G) ]
+), '... got the right DFS merge order for Test::K');
diff --git a/t/mro/dbic_c3.t b/t/mro/dbic_c3.t
index a59f334fb4..51d878464f 100644
--- a/t/mro/dbic_c3.t
+++ b/t/mro/dbic_c3.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 1;
+require q(./test.pl); plan(tests => 1);
=pod
@@ -96,7 +90,7 @@ The xx:: prefixes are just to be sure these bogus declarations never stomp on re
package xx::DBIx::Class::Relationship::CascadeActions; our @ISA = (); use mro 'c3';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('xx::DBIx::Class::Core'),
[qw/
xx::DBIx::Class::Core
@@ -121,5 +115,5 @@ is_deeply(
xx::DBIx::Class
xx::DBIx::Class::Componentised
xx::Class::Data::Accessor
- /],
- '... got the right C3 merge order for xx::DBIx::Class::Core');
+ /]
+), '... got the right C3 merge order for xx::DBIx::Class::Core');
diff --git a/t/mro/dbic_dfs.t b/t/mro/dbic_dfs.t
index f82314718e..6d5ff7d4da 100644
--- a/t/mro/dbic_dfs.t
+++ b/t/mro/dbic_dfs.t
@@ -2,14 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 1;
+require q(./test.pl); plan(tests => 1);
=pod
@@ -96,7 +90,7 @@ The xx:: prefixes are just to be sure these bogus declarations never stomp on re
package xx::DBIx::Class::Relationship::CascadeActions; our @ISA = (); use mro 'dfs';
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('xx::DBIx::Class::Core'),
[qw/
xx::DBIx::Class::Core
@@ -121,5 +115,5 @@ is_deeply(
xx::DBIx::Class::ResultSourceProxy::Table
xx::DBIx::Class::AccessorGroup
xx::DBIx::Class::ResultSourceProxy
- /],
- '... got the right DFS merge order for xx::DBIx::Class::Core');
+ /]
+), '... got the right DFS merge order for xx::DBIx::Class::Core');
diff --git a/t/mro/next_method.t b/t/mro/next_method.t
index b0bb789bcf..ffeda1e37a 100644
--- a/t/mro/next_method.t
+++ b/t/mro/next_method.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 5;
+require q(./test.pl); plan(tests => 5);
=pod
@@ -45,10 +45,10 @@ This tests the classic diamond inheritence pattern.
sub foo { 'Diamond_D::foo => ' . (shift)->next::method() }
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Diamond_D'),
- [ qw(Diamond_D Diamond_B Diamond_C Diamond_A) ],
- '... got the right MRO for Diamond_D');
+ [ qw(Diamond_D Diamond_B Diamond_C Diamond_A) ]
+), '... got the right MRO for Diamond_D');
is(Diamond_D->hello, 'Diamond_C::hello => Diamond_A::hello', '... method resolved itself as expected');
diff --git a/t/mro/next_skip.t b/t/mro/next_skip.t
index 6bd73d0180..42a276e8e6 100644
--- a/t/mro/next_skip.t
+++ b/t/mro/next_skip.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 10;
+require q(./test.pl); plan(tests => 10);
=pod
@@ -56,10 +56,10 @@ This tests the classic diamond inheritence pattern.
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Diamond_D'),
- [ qw(Diamond_D Diamond_B Diamond_C Diamond_A) ],
- '... got the right MRO for Diamond_D');
+ [ qw(Diamond_D Diamond_B Diamond_C Diamond_A) ]
+), '... got the right MRO for Diamond_D');
is(Diamond_D->foo, 'Diamond_D::foo => Diamond_C::foo', '... skipped B and went to C correctly');
is(Diamond_D->bar, 'Diamond_D::bar => Diamond_A::bar', '... skipped B & C and went to A correctly');
diff --git a/t/mro/vulcan_c3.t b/t/mro/vulcan_c3.t
index 9ac1c45cd2..f0fffde0df 100644
--- a/t/mro/vulcan_c3.t
+++ b/t/mro/vulcan_c3.t
@@ -2,15 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 1;
-use mro;
+require q(./test.pl); plan(tests => 1);
=pod
@@ -67,7 +60,7 @@ example taken from: L<http://gauss.gwydiondylan.org/books/drm/drm_50.html>
use base ('Intelligent', 'Humanoid');
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Vulcan'),
- [ qw(Vulcan Intelligent Sentient Humanoid BiPedal LifeForm Object) ],
- '... got the right MRO for the Vulcan Dylan Example');
+ [ qw(Vulcan Intelligent Sentient Humanoid BiPedal LifeForm Object) ]
+), '... got the right MRO for the Vulcan Dylan Example');
diff --git a/t/mro/vulcan_dfs.t b/t/mro/vulcan_dfs.t
index 4941294233..28372adcea 100644
--- a/t/mro/vulcan_dfs.t
+++ b/t/mro/vulcan_dfs.t
@@ -2,15 +2,8 @@
use strict;
use warnings;
-BEGIN {
- unless (-d 'blib') {
- chdir 't' if -d 't';
- @INC = '../lib';
- }
-}
-use Test::More tests => 1;
-use mro;
+require q(./test.pl); plan(tests => 1);
=pod
@@ -67,7 +60,7 @@ example taken from: L<http://gauss.gwydiondylan.org/books/drm/drm_50.html>
use base ('Intelligent', 'Humanoid');
}
-is_deeply(
+ok(eq_array(
mro::get_linear_isa('Vulcan'),
- [ qw(Vulcan Intelligent Sentient LifeForm Object Humanoid BiPedal) ],
- '... got the right MRO for the Vulcan Dylan Example');
+ [ qw(Vulcan Intelligent Sentient LifeForm Object Humanoid BiPedal) ]
+), '... got the right MRO for the Vulcan Dylan Example');