From: Dave Rolsky Date: Thu, 22 Jan 2009 21:44:48 +0000 (+0000) Subject: Skip all the tests unless using XS and Perl < 5.10. X-Git-Tag: 0.76~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7699d1772dda291822343eba6f950f5ef2f15961;p=gitmo%2FClass-MOP.git Skip all the tests unless using XS and Perl < 5.10. Clarify what needs to be fixed. --- diff --git a/t/306_is_class_loaded.t b/t/306_is_class_loaded.t index 34f1125..3ed06c0 100644 --- a/t/306_is_class_loaded.t +++ b/t/306_is_class_loaded.t @@ -4,22 +4,28 @@ use warnings; 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'