TestResult.st
changeset 101 3eac160a3c2f
parent 100 472b7bea9cad
child 104 974f57e122c1
--- a/TestResult.st	Mon Aug 18 14:16:09 2003 +0200
+++ b/TestResult.st	Mon Aug 25 13:44:02 2003 +0200
@@ -1,10 +1,10 @@
 "{ Package: 'stx:goodies/sunit' }"
 
 Object subclass:#TestResult
-	instanceVariableNames:'runCount passed failures errors'
-	classVariableNames:''
-	poolDictionaries:''
-	category:'SUnit-Base'
+        instanceVariableNames:'runCount passed failures errors'
+        classVariableNames:''
+        poolDictionaries:''
+        category:'SUnit-Base'
 !
 
 
@@ -33,7 +33,7 @@
 !
 
 signalErrorWith: aString 
-        self error raiseErrorString: aString
+        self exError raiseErrorString: aString
 
     "Modified: / 21.6.2000 / 10:11:07 / Sames"
 !
@@ -47,7 +47,7 @@
 !TestResult class methodsFor:'init / release'!
 
 new
-	^super new initialize
+        ^super new initialize
 
     "Modified: / 21.6.2000 / 10:11:50 / Sames"
 ! !
@@ -61,34 +61,34 @@
 !
 
 defects
-	^self errors, self failures
+        ^self errors, self failures
 
     "Modified: / 21.6.2000 / 10:07:56 / Sames"
 !
 
 errorCount
-	^self errors size
+        ^self errors size
 !
 
 errors
-	errors isNil ifTrue: [errors := OrderedCollection new].
-	^errors
+        errors isNil ifTrue: [errors := OrderedCollection new].
+        ^errors
 !
 
 failureCount
-	^self failures size
+        ^self failures size
 
     "Modified: / 21.6.2000 / 10:08:34 / Sames"
 !
 
 failures
-	failures isNil ifTrue: [failures := OrderedCollection new].
-	^failures
+        failures isNil ifTrue: [failures := OrderedCollection new].
+        ^failures
 !
 
 passed
-	passed isNil ifTrue: [passed := OrderedCollection new].
-	^passed
+        passed isNil ifTrue: [passed := OrderedCollection new].
+        ^passed
 !
 
 passedCount
@@ -110,33 +110,33 @@
 !
 
 tests
-	^(OrderedCollection new: self runCount)
-		addAll: self passed;
-		addAll: self errors;
-		addAll: self defects;
-		yourself
+        ^(OrderedCollection new: self runCount)
+                addAll: self passed;
+                addAll: self errors;
+                addAll: self defects;
+                yourself
 ! !
 
 !TestResult methodsFor:'init / release'!
 
 initialize
-	runCount := 0
+        runCount := 0
 ! !
 
 !TestResult methodsFor:'printing'!
 
 printOn: aStream
-	aStream
-		nextPutAll: self runCount printString;
-		nextPutAll: ' run, ';
-		nextPutAll: self passedCount printString;
-		nextPutAll: ' passed, ';
-		nextPutAll: self failureCount printString;
-		nextPutAll: ' failed, ';
-		nextPutAll: self errorCount printString;
-		nextPutAll:' error'.
-	self errorCount ~= 1
-		ifTrue: [aStream nextPut: $s].
+        aStream
+                nextPutAll: self runCount printString;
+                nextPutAll: ' run, ';
+                nextPutAll: self passedCount printString;
+                nextPutAll: ' passed, ';
+                nextPutAll: self failureCount printString;
+                nextPutAll: ' failed, ';
+                nextPutAll: self errorCount printString;
+                nextPutAll:' error'.
+        self errorCount ~= 1
+                ifTrue: [aStream nextPut: $s].
 ! !
 
 !TestResult methodsFor:'running'!
@@ -154,7 +154,7 @@
                     testCasePassed := false.
                     ex returnWith: false]
         ] 
-            on: self class error
+            on: self class exError
             do:[:ex |
                 ex signal isQuerySignal ifTrue:[
                     ex proceed.
@@ -172,12 +172,12 @@
 
 hasErrors
 
-	^self errors size > 0
+        ^self errors size > 0
 !
 
 hasFailures
 
-	^self failures size > 0
+        ^self failures size > 0
 !
 
 hasPassed
@@ -187,20 +187,20 @@
 
 isError: aTestCase
 
-	^self errors includes: aTestCase
+        ^self errors includes: aTestCase
 !
 
 isFailure: aTestCase
-	^self failures includes: aTestCase
+        ^self failures includes: aTestCase
 !
 
 isPassed: aTestCase
 
-	^self passed includes: aTestCase
+        ^self passed includes: aTestCase
 ! !
 
 !TestResult class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.12 2003-08-18 12:16:09 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestResult.st,v 1.13 2003-08-25 11:43:57 tm Exp $'
 ! !