comparison Lib/IMPL/Test.pm @ 188:029c9610528c

Memory leak tests in IMPL::Web::View
author cin
date Tue, 03 Apr 2012 20:08:42 +0400
parents 76515373dac0
children 4d0e1962161c
comparison
equal deleted inserted replaced
187:927653d01f4f 188:029c9610528c
4 4
5 require IMPL::Test::SkipException; 5 require IMPL::Test::SkipException;
6 6
7 require Exporter; 7 require Exporter;
8 our @ISA = qw(Exporter); 8 our @ISA = qw(Exporter);
9 our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip &run_plan &assert); 9 our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip &run_plan &assert &GetCallerSourceLine);
10 10
11 require IMPL::Test::Unit; 11 require IMPL::Test::Unit;
12 require IMPL::Test::Plan; 12 require IMPL::Test::Plan;
13 require IMPL::Test::TAPListener; 13 require IMPL::Test::TAPListener;
14 use IMPL::Class::Member; 14 use IMPL::Class::Member;
70 chomp $text; 70 chomp $text;
71 $text =~ s/^\s+//; 71 $text =~ s/^\s+//;
72 return "line $line: $text"; 72 return "line $line: $text";
73 } 73 }
74 74
75 sub GetCallerSourceLine {
76 my $line = shift || 0;
77 return _GetSourceLine( (caller($line + 1))[1,2] )
78 }
79
75 sub run_plan { 80 sub run_plan {
76 my (@units) = @_; 81 my (@units) = @_;
77 82
78 my $plan = new IMPL::Test::Plan(@units); 83 my $plan = new IMPL::Test::Plan(@units);
79 84