use strict;
use warnings;
use Config;
use Test::More;
use Test::LeakTrace;
use Set::Object;
{
package Foo;
use Moose;
1;
}
{
no strict;
note join ' ', map {$Config{$_}} qw(osname archname);
note 'perl version ', $];
note $_,'-',${"${_}::VERSION"} for qw{Moose Set::Object Test::Leak
+Trace};
}
my $set;
{
$set = Set::Object->new;
no_leaks_ok {
{
my $obj = Foo->new;
$set->insert($obj);
$set->remove($obj);
}
} 'Testing Set::Object for leaking';
}
{
$set = Set::Object::Weak->new;
no_leaks_ok {
{
my $obj = Foo->new;
$set->insert($obj);
$set->remove($obj);
}
} 'Testing Set::Object::Weak for leaking';
}
done_testing;
which gives me:
# linux x86_64-linux
# perl version 5.012004
# Moose-2.0202
# Set::Object-1.28
# Test::LeakTrace-0.13
ok 1 - Testing Set::Object for leaking (leaks 0 <= 0)
not ok 2 - Testing Set::Object::Weak for leaking (leaks 2 <= 0)
# Failed test 'Testing Set::Object::Weak for leaking (leaks 2 <= 0)'
# at Set_Object.t line 39.
# '2'
# <=
# '0'
# leaked SCALAR(0xdad3a0) from Set_Object.t line 37.
# 36: $set->insert($obj);
# 37: $set->remove($obj);
# 38: }
# SV = IV(0xdad398) at 0xdad3a0
# REFCNT = 1
# FLAGS = (IOK,pIOK)
# IV = 0
# leaked ARRAY(0x1163cd0) from Set_Object.t line 36.
# 35: my $obj = Foo->new;
# 36: $set->insert($obj);
# 37: $set->remove($obj);
# SV = PVAV(0x1394b00) at 0x1163cd0
# REFCNT = 2
# FLAGS = ()
# ARRAY = 0x13ac740
# FILL = 0
# MAX = 3
# ARYLEN = 0x0
# FLAGS = (REAL)
# Elt No. 0
# SV = IV(0xdad398) at 0xdad3a0
# REFCNT = 1
# FLAGS = (IOK,pIOK)
# IV = 0
1..2
# Looks like you failed 1 test of 2.
Can anyone else here verify this? And if not, could I kindly ask you to post the top 5 lines of the output (the os, arch and versions)? |