Mercurial > pub > Impl
comparison _test/Test/DOM/Node.pm @ 188:029c9610528c
Memory leak tests in IMPL::Web::View
author | cin |
---|---|
date | Tue, 03 Apr 2012 20:08:42 +0400 |
parents | 4267a2ac3d46 |
children | 4d0e1962161c |
comparison
equal
deleted
inserted
replaced
187:927653d01f4f | 188:029c9610528c |
---|---|
1 package Test::DOM::Node; | 1 package Test::DOM::Node; |
2 use strict; | 2 use strict; |
3 use warnings; | 3 use warnings; |
4 | 4 |
5 use parent qw(IMPL::Test::Unit); | 5 use parent qw(IMPL::Test::Unit); |
6 use IMPL::Test qw(test shared failed cmparray); | 6 use IMPL::Test qw(test shared failed cmparray assert); |
7 use IMPL::Class::Property; | 7 use IMPL::Class::Property; |
8 use Scalar::Util qw(weaken); | |
8 | 9 |
9 require IMPL::DOM::Node; | 10 require IMPL::DOM::Node; |
10 | 11 |
11 __PACKAGE__->PassThroughArgs; | 12 __PACKAGE__->PassThroughArgs; |
12 | 13 |
224 my @expected = qw(name _private uuid); # systemName is not a DOM prop | 225 my @expected = qw(name _private uuid); # systemName is not a DOM prop |
225 | 226 |
226 failed "Got wrong list of props", @props unless cmparray(\@props,\@expected); | 227 failed "Got wrong list of props", @props unless cmparray(\@props,\@expected); |
227 }; | 228 }; |
228 | 229 |
230 test MemoryLeaks => sub { | |
231 my $doc = new IMPL::DOM::Document(nodeName => 'Root'); | |
232 weaken($doc); | |
233 | |
234 assert(not defined $doc); | |
235 }; | |
236 | |
229 package Test::DOM::TypedNode; | 237 package Test::DOM::TypedNode; |
230 use parent qw(IMPL::DOM::Node); | 238 use parent qw(IMPL::DOM::Node); |
231 use IMPL::Class::Property; | 239 use IMPL::Class::Property; |
232 use IMPL::DOM::Property qw(_dom); | 240 use IMPL::DOM::Property qw(_dom); |
233 | 241 |