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
=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');