X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fnative_traits%2Ftrait_array.t;h=086b1430aeec5f845d888c27da4b3a5cf9ba1874;hb=53f4ad9f2ae455791a399329647c2ffc6f5ecfb4;hp=f44d0b15e36f0b15b28f139bc827f4fc47773329;hpb=175f9180c857e51468ce43c37c3c53d01fa8c916;p=gitmo%2FMoose.git diff --git a/t/native_traits/trait_array.t b/t/native_traits/trait_array.t index f44d0b1..086b143 100644 --- a/t/native_traits/trait_array.t +++ b/t/native_traits/trait_array.t @@ -697,4 +697,22 @@ sub run_tests { $class; } +{ + my ( $class, $handles ) = build_class( isa => 'ArrayRef' ); + my $obj = $class->new; + with_immutable { + is( + exception { $obj->accessor( 0, undef ) }, + undef, + 'can use accessor to set value to undef' + ); + is( + exception { $obj->accessor_curried_1(undef) }, + undef, + 'can use curried accessor to set value to undef' + ); + } + $class; +} + done_testing;