From: Jesse Luehrs Date: Fri, 12 Nov 2010 23:11:19 +0000 (-0600) Subject: remove some undocumented apis from our tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf86f222cc8af90405b4cb27d206d22717a6eda9;p=gitmo%2FClass-MOP.git remove some undocumented apis from our tests --- diff --git a/t/073_make_mutable.t b/t/073_make_mutable.t index 1454e29..52b3c35 100644 --- a/t/073_make_mutable.t +++ b/t/073_make_mutable.t @@ -65,7 +65,7 @@ use Class::MOP; isa_ok($meta, 'Class::MOP::Class', '... Baz->meta isa Class::MOP::Class'); - ok( $meta->add_method('xyz', sub{'xxx'}), '... added method'); + $meta->add_method('xyz', sub{'xxx'}); is( Baz->xyz, 'xxx', '... method xyz works'); ok($meta->add_attribute('fickle', accessor => 'fickle'), '... added attribute'); @@ -73,7 +73,7 @@ use Class::MOP; ok($meta->remove_attribute('fickle'), '... removed attribute'); my $reef = \ 'reef'; - ok($meta->add_package_symbol('$ref', $reef), '... added package symbol'); + $meta->add_package_symbol('$ref', $reef); is($meta->get_package_symbol('$ref'), $reef, '... values match'); is( exception { $meta->remove_package_symbol('$ref') }, undef, '... removed it' ); isnt($meta->get_package_symbol('$ref'), $reef, '... values match'); @@ -153,7 +153,7 @@ use Class::MOP; isa_ok($meta, 'Class::MOP::Class', '... Anon class isa Class::MOP::Class'); - ok( $meta->add_method('xyz', sub{'xxx'}), '... added method'); + $meta->add_method('xyz', sub{'xxx'}); is( $instance->xyz , 'xxx', '... method xyz works'); ok( $meta->remove_method('xyz'), '... removed method'); @@ -162,7 +162,7 @@ use Class::MOP; ok($meta->remove_attribute('fickle'), '... removed attribute'); my $reef = \ 'reef'; - ok($meta->add_package_symbol('$ref', $reef), '... added package symbol'); + $meta->add_package_symbol('$ref', $reef); is($meta->get_package_symbol('$ref'), $reef, '... values match'); is( exception { $meta->remove_package_symbol('$ref') }, undef, '... removed it' ); isnt($meta->get_package_symbol('$ref'), $reef, '... values match'); diff --git a/t/081_meta_package_extension.t b/t/081_meta_package_extension.t index 4fcac76..6bf3f6b 100644 --- a/t/081_meta_package_extension.t +++ b/t/081_meta_package_extension.t @@ -32,7 +32,7 @@ use Class::MOP; sub add_package_symbol { my ($self, $variable, $initial_value) = @_; - my ($name, $sigil, $type) = $self->_deconstruct_variable_name($variable); + (my $name = $variable) =~ s/^[\$\@\%\&]//; my $glob = gensym(); *{$glob} = $initial_value if defined $initial_value;