From: Jesse Luehrs Date: Sat, 13 Nov 2010 15:56:23 +0000 (-0600) Subject: actually, these shouldn't be leaking, with the way T:LT works X-Git-Tag: 0.14~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bb19eac124cdc5a0f51da2e09bbe2a57d4817c9f;p=gitmo%2FPackage-Stash-XS.git actually, these shouldn't be leaking, with the way T:LT works --- diff --git a/t/20-leaks.t b/t/20-leaks.t index 4e48bd3..bdfd37a 100644 --- a/t/20-leaks.t +++ b/t/20-leaks.t @@ -48,24 +48,24 @@ use Symbol; { my $foo = Package::Stash->new('Foo'); - leaks_cmp_ok { + no_leaks_ok { $foo->add_package_symbol('$scalar'); $foo->add_package_symbol('@array'); $foo->add_package_symbol('%hash'); $foo->add_package_symbol('io'); - } '==', 4, "add_package_symbol doesn't leak"; + } "add_package_symbol doesn't leak"; } { my $foo = Package::Stash->new('Foo'); - leaks_cmp_ok { + no_leaks_ok { $foo->add_package_symbol('$scalar_init' => 1); $foo->add_package_symbol('@array_init' => []); $foo->add_package_symbol('%hash_init' => {}); # hmmm, wonder why this coderef isn't treated as a leak $foo->add_package_symbol('&code_init' => sub { "foo" }); $foo->add_package_symbol('io_init' => Symbol::geniosym); - } '==', 9, "add_package_symbol doesn't leak"; + } "add_package_symbol doesn't leak"; is(exception { is(Foo->code_init, 'foo', "sub installed correctly") }, undef, "code_init exists");