TestCase.st
changeset 69 c5bff082e12f
parent 68 9fd111438d60
child 70 2ff4508f476d
--- a/TestCase.st	Tue Feb 26 11:30:47 2002 +0100
+++ b/TestCase.st	Thu May 16 14:28:04 2002 +0200
@@ -125,9 +125,19 @@
 assert: aBoolean
     "fail, if the argument is not true"
 
+"/    "check the testCase itself"
+"/    (aBoolean isBoolean) ifFalse:[ self error:'non boolean assertion' ].
+"/    aBoolean ifFalse: [self signalFailure: 'Assertion failed']
+
+    self assert: aBoolean message:'Assertion failed'
+!
+
+assert: aBoolean message:messageIfFailing
+    "fail, if the argument is not true"
+
     "check the testCase itself"
     (aBoolean isBoolean) ifFalse:[ self error:'non boolean assertion' ].
-    aBoolean ifFalse: [self signalFailure: 'Assertion failed']
+    aBoolean ifFalse: [self signalFailure: messageIfFailing]
 
     "Modified: / 21.6.2000 / 10:00:05 / Sames"
 !
@@ -260,12 +270,12 @@
 !
 
 openDebuggerOnFailingTestMethod
-	"SUnit has halted one step in front of the failing test method. 
-	Step over the 'self halt' and send into 'self perform: testSelector' 
-	to see the failure from the beginning"
+        "SUnit has halted one step in front of the failing test method. 
+        Step over the 'self halt' and send into 'self perform: testSelector' 
+        to see the failure from the beginning"
 
-	"/ self halt.
-	self perform: testSelector asSymbol
+        "/ self halt.
+        self performTest "/ perform: testSelector asSymbol
 
     "Modified: / 21.6.2000 / 10:03:37 / Sames"
 !
@@ -323,6 +333,6 @@
 !TestCase class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.22 2002-02-26 10:30:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.23 2002-05-16 12:28:04 james Exp $'
 ! !
 TestCase initialize!