diff 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
line wrap: on
line diff
--- a/Lib/IMPL/Test.pm	Tue Apr 03 07:54:25 2012 +0400
+++ b/Lib/IMPL/Test.pm	Tue Apr 03 20:08:42 2012 +0400
@@ -6,7 +6,7 @@
 
 require Exporter;
 our @ISA = qw(Exporter);
-our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip &run_plan &assert);
+our @EXPORT_OK = qw(&test &shared &failed &cmparray &skip &run_plan &assert &GetCallerSourceLine);
 
 require IMPL::Test::Unit;
 require IMPL::Test::Plan;
@@ -72,6 +72,11 @@
 	return "line $line: $text";
 }
 
+sub GetCallerSourceLine {
+	my $line = shift || 0;	
+	return _GetSourceLine( (caller($line + 1))[1,2] )
+}
+
 sub run_plan {
 	my (@units) = @_;