From: Peter Rabbitson Date: Wed, 31 Oct 2012 07:55:45 +0000 (+0100) Subject: Disable error message tests on older perls until Class::XSA is fixed X-Git-Tag: v0.10007~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2FClass-Accessor-Grouped.git;a=commitdiff_plain;h=395c3fdb628229ddbb881fe3d57de536e67289cd Disable error message tests on older perls until Class::XSA is fixed --- diff --git a/Changes b/Changes index b2fa5ee..28af314 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Class::Accessor::Grouped. + - Disable tests on perls where Class::XSAccessor emits broken + error messages (RT#74883, RT#80519) + 0.10006 2011-12-30 03:52 (UTC) - Silence warnings resulting from incomplete can() overrides hiding get/set_simple methods diff --git a/t/accessors_ro.t b/t/accessors_ro.t index 741d79d..6834fb9 100644 --- a/t/accessors_ro.t +++ b/t/accessors_ro.t @@ -2,6 +2,7 @@ use Test::More tests => 48; use Test::Exception; use strict; use warnings; +use Config; use lib 't/lib'; # we test the pure-perl versions only, but allow overrides @@ -78,14 +79,25 @@ for my $name (sort keys %$test_accessors) { : qr/cannot alter the value of '\Q$field\E'/ ; - # die on set via name/alias - throws_ok { - $obj->$name('b'); - } $ro_regex; - - throws_ok { - $obj->$alias('b'); - } $ro_regex; + { + local $TODO = "Class::XSAccessor emits broken error messages on 5.10 or -DDEBUGGING 5.8" + if ( + $test_accessors->{$name}{is_xs} + and + $] < '5.011' + and + ( $] > '5.009' or $Config{config_args} =~ /DEBUGGING/ ) + ); + + # die on set via name/alias + throws_ok { + $obj->$name('b'); + } $ro_regex; + + throws_ok { + $obj->$alias('b'); + } $ro_regex; + } # value should be unchanged is($obj->$name, 'a'); diff --git a/t/accessors_wo.t b/t/accessors_wo.t index a4bab8e..68c3eea 100644 --- a/t/accessors_wo.t +++ b/t/accessors_wo.t @@ -2,6 +2,7 @@ use Test::More tests => 38; use Test::Exception; use strict; use warnings; +use Config; use lib 't/lib'; # we test the pure-perl versions only, but allow overrides @@ -76,13 +77,24 @@ for my $name (sort keys %$test_accessors) { ; # die on get via name/alias - throws_ok { - $obj->$name; - } $wo_regex; - - throws_ok { - $obj->$alias; - } $wo_regex; + { + local $TODO = "Class::XSAccessor emits broken error messages on 5.10 or -DDEBUGGING 5.8" + if ( + $test_accessors->{$name}{is_xs} + and + $] < '5.011' + and + ( $] > '5.009' or $Config{config_args} =~ /DEBUGGING/ ) + ); + + throws_ok { + $obj->$name; + } $wo_regex; + + throws_ok { + $obj->$alias; + } $wo_regex; + } }; # important