stop relying on . in @INC
Graham Knop [Tue, 19 Apr 2016 12:02:18 +0000 (08:02 -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 ef400e0..f2af23c 100644 (file)
@@ -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 (file)
index 94faabc..0000000
+++ /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 (file)
index 5d02adf..0000000
+++ /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 (file)
index f770021..0000000
+++ /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 (file)
index d9562d6..0000000
+++ /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 (file)
index fa0e58d..0000000
+++ /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 (file)
index b0c3eb5..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-package t::lib::F;
-use base ('t::lib::C', 't::lib::D');
-1;