mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-04-03 01:54:45 +02:00
Make leaktrace.t as a regular test
This commit is contained in:
parent
bd887b660d
commit
e239bfda8a
@ -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;
|
Loading…
x
Reference in New Issue
Block a user