Commit | Line | Data |
cd326e2d |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use Class::MOP; |
5 | use Test::More; |
6 | |
7 | BEGIN { |
8 | eval "use Test::LeakTrace;"; |
9 | plan skip_all => "Test::LeakTrace is required for this test" if $@; |
10 | } |
11 | |
cd326e2d |
12 | # 5.10.0 has a bug on weaken($hash_ref) which leaks an AV. |
13 | my $expected = ( $] == 5.010_000 ? 1 : 0 ); |
14 | |
15 | leaks_cmp_ok { |
16 | Class::MOP::Class->create_anon_class(); |
17 | } |
18 | '<=', $expected, 'create_anon_class()'; |
19 | |
20 | leaks_cmp_ok { |
21 | Class::MOP::Class->create_anon_class( superclasses => [qw(Exporter)] ); |
22 | } |
23 | '<=', $expected, 'create_anon_class(superclass => [...])'; |
24 | |
86a4d873 |
25 | done_testing; |