import some mro tests
[gitmo/Class-C3-XS.git] / t / 05_MRO.t
diff --git a/t/05_MRO.t b/t/05_MRO.t
new file mode 100644 (file)
index 0000000..ef400e0
--- /dev/null
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+
+BEGIN {
+    use_ok('Class::C3::XS');
+    use_ok('t::lib::F');    
+}
+
+=pod 
+
+From the parrot test t/pmc/object-meths.t
+
+ A   B A   E
+  \ /   \ /
+   C     D
+    \   /
+     \ /
+      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');  
+