From: Dave Rolsky Date: Sun, 8 Feb 2009 14:53:48 +0000 (+0000) Subject: move 306 test to 083 where the other class loading/is it loaded tests live X-Git-Tag: 0.77~17 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b85752335dd4db0ac64d66747e28cc17ab9e4382;p=gitmo%2FClass-MOP.git move 306 test to 083 where the other class loading/is it loaded tests live --- diff --git a/t/083_load_class.t b/t/083_load_class.t index 9b1d7fd..a091147 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 => 28; +use Test::More tests => 29; use Test::Exception; require Class::MOP; @@ -82,4 +82,12 @@ throws_ok { Class::MOP::load_first_existing_class("Does::Not::Exist", "Also::Does::Not::Exist") } qr/Could not load class \(Does::Not::Exist.*Could not load class \(Also::Does::Not::Exist/s, 'Multiple non-existant classes cause exception'; +{ + sub whatever { + TestClassLoaded::this_method_does_not_even_exist(); + } + + ok( ! Class::MOP::is_class_loaded('TestClassLoaded'), + 'the mere mention of TestClassLoaded in the whatever sub does not make us think it has been loaded' ); +} diff --git a/t/306_is_class_loaded.t b/t/306_is_class_loaded.t deleted file mode 100644 index eecc09e..0000000 --- a/t/306_is_class_loaded.t +++ /dev/null @@ -1,25 +0,0 @@ -use strict; -use warnings; - -use FindBin qw/$Bin/; -use lib "$Bin/lib"; - -use Test::More; -use Class::MOP (); - -plan tests => 1; - -# There was a bug that manifest on Perl < 5.10 when running under -# XS. The mere mention of TestClassLoaded below broke the -# is_class_loaded check. - -sub whatever { - TestClassLoaded::this_method_does_not_even_exist(); -} - -Class::MOP::load_class('TestClassLoaded'); - -ok( TestClassLoaded->can('a_method'), - 'TestClassLoader::a_method is defined' ); - -