[Moose-commits] r7359 - Class-MOP/trunk/t

autarch at code2.0beta.co.uk autarch at code2.0beta.co.uk
Thu Jan 22 21:44:48 GMT 2009


Author: autarch
Date: 2009-01-22 13:44:48 -0800 (Thu, 22 Jan 2009)
New Revision: 7359

Modified:
   Class-MOP/trunk/t/306_is_class_loaded.t
Log:
Skip all the tests unless using XS and Perl < 5.10.

Clarify what needs to be fixed.


Modified: Class-MOP/trunk/t/306_is_class_loaded.t
===================================================================
--- Class-MOP/trunk/t/306_is_class_loaded.t	2009-01-22 21:38:26 UTC (rev 7358)
+++ Class-MOP/trunk/t/306_is_class_loaded.t	2009-01-22 21:44:48 UTC (rev 7359)
@@ -4,22 +4,28 @@
 use FindBin qw/$Bin/;
 use lib "$Bin/lib";
 
-use Test::More tests => 1;
+use Test::More;
 use Class::MOP ();
 
-# Just defining this sub appears to shit in TestClassLoaded's symbol
-# tables (see the SCALAR package symbol you end up with).
-# This confuses the XS is_class_loaded method, which looks for _any_
-# symbol, not just code symbols of VERSION/AUTHORITY etc.
+plan 'skip_all' => 'This test is only meaningful for an XS-enabled CMOP with Perl < 5.10'
+    unless $Class::MOP::USING_XS && ! Class::MOP::IS_RUNNING_ON_5_10();
 
-sub fnar {
+plan tests => 1;
+
+# With pre-5.10 Perl, just defining this sub appears to shit in
+# TestClassLoaded's symbol tables (see the SCALAR package symbol you
+# end up with).  This confuses the XS is_class_loaded method, which
+# looks for _any_ symbol, not just code symbols of VERSION/AUTHORITY
+# etc.
+
+sub whatever {
     TestClassLoaded::this_method_does_not_even_exist();
 }
 
 Class::MOP::load_class('TestClassLoaded');
 
 TODO: {
-    local $TODO = 'Borked';
+    local $TODO = 'The XS is_class_loaded is confused by the bogus method defined in whatever()';
     ok(
         TestClassLoaded->can('a_method'),
         'TestClassLoader::a_method is defined'




More information about the Moose-commits mailing list