add generated MANIFEST
[gitmo/Class-C3.git] / t / 03_MRO.t
index 0b098cf..a13294f 100644 (file)
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 5;
+use Test::More tests => 8;
 
 BEGIN {
     use_ok('Class::C3');
@@ -94,6 +94,8 @@ Level 0                0 | A |
     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) ],
@@ -107,3 +109,9 @@ is(Test::A->O_or_F, 'Test::F', '... got the right method dispatch');
 # 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');