Make leaktrace.t as a regular test

This commit is contained in:
gfx 2010-09-16 20:36:07 +09:00
parent bd887b660d
commit e239bfda8a

View File

@ -1,6 +1,6 @@
#!perl -w #!perl -w
use strict; use strict;
use Test::Requires 'Test::LeakTrace'; use Test::Requires { 'Test::LeakTrace' => 0.13 };
use Test::More; use Test::More;
use Data::MessagePack; use Data::MessagePack;
@ -22,8 +22,8 @@ no_leaks_ok {
no_leaks_ok { no_leaks_ok {
eval { Data::MessagePack->pack([\*STDIN]) }; eval { Data::MessagePack->pack([\*STDIN]) };
#note $@; note $@;
$@ or die "it must die"; $@ or warn "# it must die";
}; };
note 'unpack'; note 'unpack';
@ -43,8 +43,16 @@ no_leaks_ok {
my $broken = $s; my $broken = $s;
chop $broken; chop $broken;
eval { Data::MessagePack->unpack($broken) }; eval { Data::MessagePack->unpack($broken) };
#note $@; note $@;
$@ or die "it must die"; $@ or warn "# it must die";
};
note 'stream';
no_leaks_ok {
my $up = Data::MessagePack::Unpacker->new();
$up->execute($c);
my $data = $up->data();
}; };
done_testing; done_testing;