From: Jesse Luehrs Date: Thu, 25 Jun 2009 15:27:51 +0000 (-0500) Subject: add a few more tests for inline instance methods X-Git-Tag: 0.89~28 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10e9f05ddc8e2412ac23034fafa46525b9be2019;p=gitmo%2FClass-MOP.git add a few more tests for inline instance methods --- diff --git a/t/061_instance_inline.t b/t/061_instance_inline.t index 62f0eec..9e2e265 100644 --- a/t/061_instance_inline.t +++ b/t/061_instance_inline.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::More tests => 6; +use Test::More tests => 8; use Test::Exception; use Class::MOP::Instance; @@ -12,7 +12,11 @@ my $C = 'Class::MOP::Instance'; my $instance = '$self'; my $slot_name = 'foo'; my $value = '$value'; + my $class = '$class'; + is($C->inline_create_instance($class), + 'bless {} => $class', + '... got the right code for create_instance'); is($C->inline_get_slot_value($instance, $slot_name), '$self->{"foo"}', '... got the right code for get_slot_value'); @@ -36,6 +40,9 @@ my $C = 'Class::MOP::Instance'; is($C->inline_strengthen_slot_value($instance, $slot_name), '$self->{"foo"} = $self->{"foo"}', '... got the right code for strengthen_slot_value'); + is($C->inline_rebless_instance_structure($instance, $class), + 'bless $self => $class', + '... got the right code for rebless_instance_structure'); }