diff Lib/IMPL/Test/Plan.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 4267a2ac3d46
children
line wrap: on
line diff
--- a/Lib/IMPL/Test/Plan.pm	Tue Apr 10 08:13:22 2012 +0400
+++ b/Lib/IMPL/Test/Plan.pm	Tue Apr 10 20:08:29 2012 +0400
@@ -75,14 +75,14 @@
         try {
             $info{Tests} = [$Unit->List];
         } otherwise {
-        	my $err = $@; 
-        	$Unit = $info{Unit} = new IMPL::Test::BadUnit(
-        		$Unit->can('UnitName') ?
-        			$Unit->UnitName :
-        			$Unit,
-        		"Failed to extract tests",
-        		$err
-        	);
+            my $err = $@; 
+            $Unit = $info{Unit} = new IMPL::Test::BadUnit(
+                $Unit->can('UnitName') ?
+                    $Unit->UnitName :
+                    $Unit,
+                "Failed to extract tests",
+                $err
+            );
             $info{Tests} = [$Unit->List];
         };
         $count += @{$info{Tests}};
@@ -119,20 +119,20 @@
         my @results;
         
         if (not $@) {
-        	
+            
             foreach my $test (@{$info->{Tests}}) {
-            	my $name = $test->Name;
-            	
-            	#protected creation of the test
-            	$test = eval { $info->{Unit}->new($test); } || new IMPL::Test::BadUnit(
-	        		$info->{Unit}->can('UnitName') ?
-	        			$info->{Unit}->UnitName :
-	        			$info->{Unit},
-	        		"Failed to construct the test $name",
-	        		$@
-	        	);
-	        	
-	        	# invoke the test
+                my $name = $test->Name;
+                
+                #protected creation of the test
+                $test = eval { $info->{Unit}->new($test); } || new IMPL::Test::BadUnit(
+                    $info->{Unit}->can('UnitName') ?
+                        $info->{Unit}->UnitName :
+                        $info->{Unit},
+                    "Failed to construct the test $name",
+                    $@
+                );
+                
+                # invoke the test
                 $this->_Tell(RunTest => $test);
                 my $result = $test->Run($data);
                 $this->_Tell(EndTest => $test,$result);
@@ -141,15 +141,15 @@
             }
         } else {
             my $e = $@;
-			my $badTest = new IMPL::Test::BadUnit(
-        		$info->{Unit}->can('UnitName') ?
-        			$info->{Unit}->UnitName :
-        			$info->{Unit},
-        		"Failed to initialize the unit",
-        		$@
-        	); 
+            my $badTest = new IMPL::Test::BadUnit(
+                $info->{Unit}->can('UnitName') ?
+                    $info->{Unit}->UnitName :
+                    $info->{Unit},
+                "Failed to initialize the unit",
+                $@
+            ); 
             foreach my $test (@{$info->{Tests}}) {
-            	
+                
                 $this->_Tell(RunTest => $badTest);
                 my $result = new IMPL::Test::Result(
                     Name => $test->Name,