X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F083_load_class.t;h=e93c427f1e4df0b668571f8a523a6ac9d884bdde;hb=164bf00ba31a0c8e486033690a54fea2112fe207;hp=a091147f3d3f18e26e8e3a8b1269e9eda96b9bd2;hpb=b85752335dd4db0ac64d66747e28cc17ab9e4382;p=gitmo%2FClass-MOP.git diff --git a/t/083_load_class.t b/t/083_load_class.t index a091147..e93c427 100644 --- a/t/083_load_class.t +++ b/t/083_load_class.t @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 29; +use Test::More tests => 33; use Test::Exception; require Class::MOP; @@ -91,3 +91,26 @@ throws_ok { 'the mere mention of TestClassLoaded in the whatever sub does not make us think it has been loaded' ); } +{ + require TestClassLoaded::Sub; + ok( ! Class::MOP::is_class_loaded('TestClassLoaded'), + 'requiring TestClassLoaded::Sub does not make us think TestClassLoaded is loaded' ); +} + +{ + require TestClassLoaded; + ok( Class::MOP::is_class_loaded('TestClassLoaded'), + 'We see that TestClassLoaded is loaded after requiring it (it has methods but no $VERSION or @ISA)' ); +} + +{ + require TestClassLoaded2; + ok( Class::MOP::is_class_loaded('TestClassLoaded2'), + 'We see that TestClassLoaded2 is loaded after requiring it (it has a $VERSION but no methods or @ISA)' ); +} + +{ + require TestClassLoaded3; + ok( Class::MOP::is_class_loaded('TestClassLoaded3'), + 'We see that TestClassLoaded3 is loaded after requiring it (it has an @ISA but no methods or $VERSION)' ); +}