From: gfx Date: Tue, 17 Nov 2009 05:28:37 +0000 (+0900) Subject: Add tests for constructor_class/destructor_class as attributes X-Git-Tag: 0.40_07~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d88e198a05d60ce534fbbbaccfc5b1da822418ab;p=gitmo%2FMouse.git Add tests for constructor_class/destructor_class as attributes --- diff --git a/t/001_mouse/808-create_class.t b/t/001_mouse/808-create_class.t index 7d561e0..2c9b63d 100644 --- a/t/001_mouse/808-create_class.t +++ b/t/001_mouse/808-create_class.t @@ -1,7 +1,7 @@ use strict; use warnings; use Mouse (); -use Test::More tests => 23; +use Test::More tests => 25; use Test::Exception; # error handling @@ -83,6 +83,14 @@ ok !$anon_pkg1->can('meta'); ok $anon_pkg2->can('meta'), 'cache => 1 makes it immortal'; +my $anon = Mouse::Meta::Class->create_anon_class( + constructor_class => 'ConstructorX', + destructor_class => 'DestructorX', +); + +is $anon->constructor_class, 'ConstructorX'; +is $anon->destructor_class, 'DestructorX'; + my $obj; { my $anon = Mouse::Meta::Class->create_anon_class(superclasses => ['Mouse::Object']);