File: memory-leak.t

package info (click to toggle)
libthrowable-perl 0.200012-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 172 kB
  • ctags: 8
  • sloc: perl: 303; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 251 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!perl

use strict;
use warnings;
use Test::More;
use Test::Memory::Cycle;

{
  package MyError;
  use Moo;
  extends 'Throwable::Error';
}

eval { MyError->throw('the error') };
memory_cycle_ok($@, 'Exception has no memory cycles');

done_testing();