summaryrefslogtreecommitdiffstats
path: root/xt/author/leaks.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-01-04 01:25:27 -0600
committerJesse Luehrs <doy@tozt.net>2013-01-04 01:25:27 -0600
commitb7924c9c88494859022597f01517d84df753cd81 (patch)
treef6b3fc1b21c812cb6d5d9d93053b7dafebb66073 /xt/author/leaks.t
parentdb7c38b0b0dcd88368ad5b88df89772f63292386 (diff)
downloadpackage-stash-xs-b7924c9c88494859022597f01517d84df753cd81.tar.gz
package-stash-xs-b7924c9c88494859022597f01517d84df753cd81.zip
split some more of these tests up
Diffstat (limited to 'xt/author/leaks.t')
-rw-r--r--xt/author/leaks.t42
1 files changed, 37 insertions, 5 deletions
diff --git a/xt/author/leaks.t b/xt/author/leaks.t
index 18ec601..eb9ec6c 100644
--- a/xt/author/leaks.t
+++ b/xt/author/leaks.t
@@ -43,18 +43,26 @@ use Symbol;
my $foo = Package::Stash->new('Foo');
no_leaks_ok {
$foo->name;
+ } "name accessor doesn't leak";
+ no_leaks_ok {
$foo->namespace;
- } "accessors don't leak";
+ } "namespace accessor doesn't leak";
}
{
my $foo = Package::Stash->new('Foo');
no_leaks_ok {
$foo->add_symbol('$scalar');
+ } "add_symbol scalar with no initializer doesn't leak";
+ no_leaks_ok {
$foo->add_symbol('@array');
+ } "add_symbol array with no initializer doesn't leak";
+ no_leaks_ok {
$foo->add_symbol('%hash');
+ } "add_symbol hash with no initializer doesn't leak";
+ no_leaks_ok {
$foo->add_symbol('io');
- } "add_symbol doesn't leak";
+ } "add_symbol io with no initializer doesn't leak";
}
{
@@ -83,11 +91,19 @@ use Symbol;
my $foo = Package::Stash->new('Foo');
no_leaks_ok {
$foo->remove_symbol('$scalar_init');
+ } "remove_symbol scalar doesn't leak";
+ no_leaks_ok {
$foo->remove_symbol('@array_init');
+ } "remove_symbol array doesn't leak";
+ no_leaks_ok {
$foo->remove_symbol('%hash_init');
+ } "remove_symbol hash doesn't leak";
+ no_leaks_ok {
$foo->remove_symbol('&code_init');
+ } "remove_symbol code doesn't leak";
+ no_leaks_ok {
$foo->remove_symbol('io_init');
- } "remove_symbol doesn't leak";
+ } "remove_symbol io doesn't leak";
}
{
@@ -102,22 +118,38 @@ use Symbol;
my $foo = Package::Stash->new('Foo');
no_leaks_ok {
$foo->has_symbol('io');
+ } "has_symbol io doesn't leak";
+ no_leaks_ok {
$foo->has_symbol('%hash');
+ } "has_symbol hash doesn't leak";
+ no_leaks_ok {
$foo->has_symbol('@array_init');
+ } "has_symbol array doesn't leak";
+ no_leaks_ok {
$foo->has_symbol('$glob');
+ } "has_symbol nonexistent scalar doesn't leak";
+ no_leaks_ok {
$foo->has_symbol('&something_else');
- } "has_symbol doesn't leak";
+ } "has_symbol nonexistent code doesn't leak";
}
{
my $foo = Package::Stash->new('Foo');
no_leaks_ok {
$foo->get_symbol('io');
+ } "get_symbol io doesn't leak";
+ no_leaks_ok {
$foo->get_symbol('%hash');
+ } "get_symbol hash doesn't leak";
+ no_leaks_ok {
$foo->get_symbol('@array_init');
+ } "get_symbol array doesn't leak";
+ no_leaks_ok {
$foo->get_symbol('$glob');
+ } "get_symbol nonexistent scalar doesn't leak";
+ no_leaks_ok {
$foo->get_symbol('&something_else');
- } "get_symbol doesn't leak";
+ } "get_symbol nonexistent code doesn't leak";
}
{