stop relying on . in @INC
Graham Knop [Tue, 19 Apr 2016 11:43:31 +0000 (07:43 -0400)]
t/05_MRO.t
t/lib/A.pm [deleted file]
t/lib/B.pm [deleted file]
t/lib/C.pm [deleted file]
t/lib/D.pm [deleted file]
t/lib/E.pm [deleted file]
t/lib/F.pm [deleted file]

index 2faeb6d..7d1630f 100644 (file)
@@ -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 (file)
index b1b188b..0000000
+++ /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 (file)
index e226e9a..0000000
+++ /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 (file)
index e2aa113..0000000
+++ /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 (file)
index ed386f6..0000000
+++ /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 (file)
index 3a58814..0000000
+++ /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 (file)
index 34ba923..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-package t::lib::F;
-use Class::C3;
-use base ('t::lib::C', 't::lib::D');
-1;