From: gfx Date: Sun, 31 Jan 2010 08:54:15 +0000 (+0900) Subject: More tests for magic handling X-Git-Tag: 0.48~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=feb3c29755237ea9a9f12b9053b9664fd436dfc4;hp=85a74fcf70600193f68dca0ca705bcf01e937d69 More tests for magic handling --- diff --git a/t/001_mouse/066-magic.t b/t/001_mouse/066-magic.t index b4460d0..d268ba3 100644 --- a/t/001_mouse/066-magic.t +++ b/t/001_mouse/066-magic.t @@ -1,7 +1,7 @@ #!perl use strict; use warnings; -use Test::More tests => 3; +use Test::More tests => 6; use Tie::Scalar; @@ -40,3 +40,11 @@ ts_init $x, 42; is(eval{ $o->bar($x) }, 42) or diag("Error: $@"); +$o = eval{ + ts_init(my $a, 10); + ts_init(my $b, 42); + MyClass->new(foo => $a, bar => $b); +}; +ok $o; +is eval{ $o->foo }, 10; +is eval{ $o->bar }, 42;