use strict;
use warnings;
-use Test::More tests => 5;
+use Test::More tests => 8;
BEGIN {
use_ok('Class::C3');
use Class::C3;
}
+Class::C3::initialize();
+
is_deeply(
[ Class::C3::calculateMRO('Test::A') ],
[ qw(Test::A Test::B Test::E Test::C Test::D Test::F Test::O) ],
# would actually call Test::D before Test::C and Test::D is a
# subclass of Test::C
is(Test::A->C_or_D, 'Test::C', '... got the right method dispatch');
+
+Class::C3::uninitialize();
+
+is(Test::A->O_or_D, 'Test::O', '... old dispatch order is restored');
+is(Test::A->O_or_F, 'Test::O', '... old dispatch order is restored');
+is(Test::A->C_or_D, 'Test::D', '... old dispatch order is restored');