From: Jesse Luehrs Date: Wed, 15 Jun 2011 22:03:04 +0000 (-0500) Subject: test for hash accessor bug (rt 68837) X-Git-Tag: 2.0102~20 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=76ae56f182054960e8ffd9663a4ba77306e458df;p=gitmo%2FMoose.git test for hash accessor bug (rt 68837) --- diff --git a/t/native_traits/trait_hash.t b/t/native_traits/trait_hash.t index 107b851..d319ee8 100644 --- a/t/native_traits/trait_hash.t +++ b/t/native_traits/trait_hash.t @@ -292,4 +292,15 @@ sub run_tests { $class; } +{ + my ($class, $handles) = build_class(isa => 'HashRef'); + my $obj = $class->new; + with_immutable { + is(exception { $obj->option_accessor('foo', undef) }, undef, + "can use accessor to set to undef"); + is(exception { $obj->quantity(undef) }, undef, + "can use accessor to set to undef"); + } $class; +} + done_testing;