From: Graham Knop Date: Tue, 19 Apr 2016 11:43:31 +0000 (-0400) Subject: stop relying on . in @INC X-Git-Tag: v0.31~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=47a367d0930224e392be71678bddff77e4ddee82;p=gitmo%2FClass-C3.git stop relying on . in @INC --- diff --git a/t/05_MRO.t b/t/05_MRO.t index 2faeb6d..7d1630f 100644 --- a/t/05_MRO.t +++ b/t/05_MRO.t @@ -3,19 +3,43 @@ use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 1; BEGIN { - use_ok('t::lib::F'); + package ClassA; + use Class::C3; +} +BEGIN { + package ClassB; + use Class::C3; +} +BEGIN { + package ClassC; + use Class::C3; +} +BEGIN { + package ClassD; + use Class::C3; + our @ISA = qw(ClassA ClassB); +} +BEGIN { + package ClassE; + use Class::C3; + our @ISA = qw(ClassA ClassC); +} +BEGIN { + package ClassF; + use Class::C3; + our @ISA = qw(ClassD ClassE); } -=pod +=pod From the parrot test t/pmc/object-meths.t - A B A E + A B A C \ / \ / - C D + D E \ / \ / F @@ -25,7 +49,6 @@ From the parrot test t/pmc/object-meths.t Class::C3::initialize(); is_deeply( - [ Class::C3::calculateMRO('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'); - + [ Class::C3::calculateMRO('ClassF') ], + [ qw(ClassF ClassD ClassE ClassA ClassB ClassC) ], + '... got the right MRO for ClassF'); diff --git a/t/lib/A.pm b/t/lib/A.pm deleted file mode 100644 index b1b188b..0000000 --- a/t/lib/A.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::A; -use Class::C3; -1; diff --git a/t/lib/B.pm b/t/lib/B.pm deleted file mode 100644 index e226e9a..0000000 --- a/t/lib/B.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::B; -use Class::C3; -1; diff --git a/t/lib/C.pm b/t/lib/C.pm deleted file mode 100644 index e2aa113..0000000 --- a/t/lib/C.pm +++ /dev/null @@ -1,4 +0,0 @@ -package t::lib::C; -use Class::C3; -use base ('t::lib::A', 't::lib::B'); -1; diff --git a/t/lib/D.pm b/t/lib/D.pm deleted file mode 100644 index ed386f6..0000000 --- a/t/lib/D.pm +++ /dev/null @@ -1,4 +0,0 @@ -package t::lib::D; -use Class::C3; -use base ('t::lib::A', 't::lib::E'); -1; diff --git a/t/lib/E.pm b/t/lib/E.pm deleted file mode 100644 index 3a58814..0000000 --- a/t/lib/E.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::E; -use Class::C3; -1; diff --git a/t/lib/F.pm b/t/lib/F.pm deleted file mode 100644 index 34ba923..0000000 --- a/t/lib/F.pm +++ /dev/null @@ -1,4 +0,0 @@ -package t::lib::F; -use Class::C3; -use base ('t::lib::C', 't::lib::D'); -1;