8 use Class::MOP::Instance;
10 my $C = 'Class::MOP::Instance';
13 my $instance = '$self';
14 my $slot_name = 'foo';
18 is($C->inline_create_instance($class),
20 '... got the right code for create_instance');
21 is($C->inline_get_slot_value($instance, $slot_name),
23 '... got the right code for get_slot_value');
25 is($C->inline_set_slot_value($instance, $slot_name, $value),
26 q[$self->{"foo"} = $value],
27 '... got the right code for set_slot_value');
29 is($C->inline_initialize_slot($instance, $slot_name),
31 '... got the right code for initialize_slot');
33 is($C->inline_is_slot_initialized($instance, $slot_name),
34 q[exists $self->{"foo"}],
35 '... got the right code for get_slot_value');
37 is($C->inline_weaken_slot_value($instance, $slot_name),
38 q[Scalar::Util::weaken( $self->{"foo"} )],
39 '... got the right code for weaken_slot_value');
41 is($C->inline_strengthen_slot_value($instance, $slot_name),
42 q[$self->{"foo"} = $self->{"foo"}],
43 '... got the right code for strengthen_slot_value');
44 is($C->inline_rebless_instance_structure($instance, $class),
45 q[bless $self => $class],
46 '... got the right code for rebless_instance_structure');