6 use Test::More tests => 7;
9 use_ok('Algorithm::C3');
14 This example is take from: http://www.python.org/2.3/mro.html
28 Level 3 | O | (more general)
34 Level 2 3 | D | 4| E | | F | 5 |
40 Level 1 1 | B | | C | 2 |
45 Level 0 0 | A | (more specialized)
68 use base ('Test::D', 'Test::F');
71 use base ('Test::D', 'Test::E');
74 use base ('Test::B', 'Test::C');
78 [ Algorithm::C3::merge('Test::F', 'supers') ],
79 [ qw(Test::F Test::O) ],
80 '... got the right C3 merge order for Test::F');
83 [ Algorithm::C3::merge('Test::E', 'supers') ],
84 [ qw(Test::E Test::O) ],
85 '... got the right C3 merge order for Test::E');
88 [ Algorithm::C3::merge('Test::D', 'supers') ],
89 [ qw(Test::D Test::O) ],
90 '... got the right C3 merge order for Test::D');
93 [ Algorithm::C3::merge('Test::C', 'supers') ],
94 [ qw(Test::C Test::D Test::F Test::O) ],
95 '... got the right C3 merge order for Test::C');
98 [ Algorithm::C3::merge('Test::B', 'supers') ],
99 [ qw(Test::B Test::D Test::E Test::O) ],
100 '... got the right C3 merge order for Test::B');
103 [ Algorithm::C3::merge('Test::A', 'supers') ],
104 [ qw(Test::A Test::B Test::C Test::D Test::E Test::F Test::O) ],
105 '... got the right C3 merge order for Test::A');