From: Graham Knop Date: Tue, 19 Apr 2016 12:02:18 +0000 (-0400) Subject: stop relying on . in @INC X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3022feba60cf5c52620c9f2b0e075668d644de07;p=gitmo%2FClass-C3-XS.git stop relying on . in @INC --- diff --git a/t/05_MRO.t b/t/05_MRO.t index ef400e0..f2af23c 100644 --- a/t/05_MRO.t +++ b/t/05_MRO.t @@ -3,20 +3,41 @@ use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 1; +use Class::C3::XS; BEGIN { - use_ok('Class::C3::XS'); - use_ok('t::lib::F'); + package ClassA; + our @ISA; +} +BEGIN { + package ClassB; + our @ISA; +} +BEGIN { + package ClassC; + our @ISA; +} +BEGIN { + package ClassD; + our @ISA = qw(ClassA ClassB); +} +BEGIN { + package ClassE; + our @ISA = qw(ClassA ClassC); +} +BEGIN { + package ClassF; + 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 @@ -24,7 +45,6 @@ From the parrot test t/pmc/object-meths.t =cut is_deeply( - [ Class::C3::XS::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::XS::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 94faabc..0000000 --- a/t/lib/A.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::A; -our @ISA = qw//; -1; diff --git a/t/lib/B.pm b/t/lib/B.pm deleted file mode 100644 index 5d02adf..0000000 --- a/t/lib/B.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::B; -our @ISA = qw//; -1; diff --git a/t/lib/C.pm b/t/lib/C.pm deleted file mode 100644 index f770021..0000000 --- a/t/lib/C.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::C; -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 d9562d6..0000000 --- a/t/lib/D.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::D; -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 fa0e58d..0000000 --- a/t/lib/E.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::E; -our @ISA = qw//; -1; diff --git a/t/lib/F.pm b/t/lib/F.pm deleted file mode 100644 index b0c3eb5..0000000 --- a/t/lib/F.pm +++ /dev/null @@ -1,3 +0,0 @@ -package t::lib::F; -use base ('t::lib::C', 't::lib::D'); -1;