diff Lib/IMPL/Test.pm @ 194:4d0e1962161c

Replaced tabs with spaces IMPL::Web::View - fixed document model, new features (control classes, document constructor parameters)
author cin
date Tue, 10 Apr 2012 20:08:29 +0400
parents 029c9610528c
children 6253872024a4
line wrap: on
line diff
--- a/Lib/IMPL/Test.pm	Tue Apr 10 08:13:22 2012 +0400
+++ b/Lib/IMPL/Test.pm	Tue Apr 10 20:08:29 2012 +0400
@@ -39,13 +39,13 @@
 }
 
 sub assert {
-	my ($condition,@params) = @_;
-	
-	die new IMPL::Test::FailException(@params ? @params : ("Assertion failed" , _GetSourceLine( (caller)[1,2] )) ) unless $condition;
+    my ($condition,@params) = @_;
+    
+    die new IMPL::Test::FailException(@params ? @params : ("Assertion failed" , _GetSourceLine( (caller)[1,2] )) ) unless $condition;
 }
 
 sub skip($;@) {
-	die new IMPL::Test::SkipException(@_);
+    die new IMPL::Test::SkipException(@_);
 }
 
 sub cmparray {
@@ -61,29 +61,29 @@
 }
 
 sub _GetSourceLine {
-	my ($file,$line) = @_;
-	
-	open my $hFile, $file or return "failed to open file: $file: $!";
-	
-	my $text;
-	$text = <$hFile> for ( 1 .. $line);
-	chomp $text;
-	$text =~ s/^\s+//;
-	return "line $line: $text";
+    my ($file,$line) = @_;
+    
+    open my $hFile, $file or return "failed to open file: $file: $!";
+    
+    my $text;
+    $text = <$hFile> for ( 1 .. $line);
+    chomp $text;
+    $text =~ s/^\s+//;
+    return "line $line: $text";
 }
 
 sub GetCallerSourceLine {
-	my $line = shift || 0;	
-	return _GetSourceLine( (caller($line + 1))[1,2] )
+    my $line = shift || 0;    
+    return _GetSourceLine( (caller($line + 1))[1,2] )
 }
 
 sub run_plan {
-	my (@units) = @_;
-	
-	my $plan = new IMPL::Test::Plan(@units);
-	
-	$plan->Prepare;
-	$plan->AddListener(new IMPL::Test::TAPListener);
-	$plan->Run;
+    my (@units) = @_;
+    
+    my $plan = new IMPL::Test::Plan(@units);
+    
+    $plan->Prepare;
+    $plan->AddListener(new IMPL::Test::TAPListener);
+    $plan->Run;
 }
 1;