context skipping in debugger generalized
authorClaus Gittinger <cg@exept.de>
Mon, 26 May 2008 10:34:09 +0200
changeset 179 caba0f640d13
parent 178 31e594125d95
child 180 4b3b81b30817
context skipping in debugger generalized
TestCase.st
--- a/TestCase.st	Mon Mar 10 10:26:30 2008 +0100
+++ b/TestCase.st	Mon May 26 10:34:09 2008 +0200
@@ -306,6 +306,8 @@
 assert: aBoolean
     "fail, if the argument is not true"
 
+    <resource: #skipInDebuggersWalkBack>
+
 "/        aBoolean ifFalse: [self signalFailure: 'Assertion failed']
 
     self assert: aBoolean message:'Assertion failed'
@@ -314,6 +316,8 @@
 assert:aBlock completesInSeconds:aNumber
     "fail, if aBlock does not finish its work in aNumber seconds"
 
+    <resource: #skipInDebuggersWalkBack>
+
     |done process semaphore|
 
     done := false.
@@ -335,25 +339,31 @@
     "
 !
 
-assert: aBoolean description: aString
-        aBoolean ifFalse: [
-                self logFailure: aString.
-                self signalFailure: aString resumable:true]
+assert:aBoolean description:aString 
+    <resource: #skipInDebuggersWalkBack>
+
+    aBoolean ifFalse:[
+        self logFailure:aString.
+        self signalFailure:aString resumable:true
+    ]
 
     "Modified: / 06-08-2006 / 22:56:27 / cg"
 !
 
-assert: aBoolean description: aString resumable: resumableBoolean 
+assert:aBoolean description:aString resumable:resumableBoolean 
+    <resource: #skipInDebuggersWalkBack>
 
-        aBoolean
-                ifFalse: 
-                        [self logFailure: aString.
-                         self signalFailure:aString resumable:resumableBoolean]
+    aBoolean ifFalse:[
+        self logFailure:aString.
+        self signalFailure:aString resumable:resumableBoolean
+    ]
 !
 
 assert: aBoolean message:messageIfFailing
     "fail, if the argument is not true"
 
+    <resource: #skipInDebuggersWalkBack>
+
     "check the testCase itself"
     (aBoolean isBoolean) ifFalse:[ self error:'non boolean assertion' ].
     aBoolean ifFalse: [self signalFailure: messageIfFailing resumable:true]
@@ -363,84 +373,108 @@
 !
 
 assertFalse:aBoolean
+    <resource: #skipInDebuggersWalkBack>
+
     ^ self assert:aBoolean not
 !
 
 assertFalse:aBoolean named:testName
+    <resource: #skipInDebuggersWalkBack>
+
     ^ self assert:aBoolean not
 !
 
 assertTrue:aBoolean 
+    <resource: #skipInDebuggersWalkBack>
+
     ^ self assert:aBoolean
 !
 
 assertTrue:aBoolean named:testName
+    <resource: #skipInDebuggersWalkBack>
+
     ^ self assert:aBoolean
 !
 
 deny:aBoolean 
     "fail, if the argument is not false"
     
+    <resource: #skipInDebuggersWalkBack>
+
     self assert:aBoolean not
 !
 
 deny: aBoolean description: aString
-	self assert: aBoolean not description: aString
-			
+    <resource: #skipInDebuggersWalkBack>
+
+    self assert: aBoolean not description: aString
 !
 
 deny: aBoolean description: aString resumable: resumableBoolean 
-	self
-		assert: aBoolean not
-		description: aString
-		resumable: resumableBoolean
-			
+    <resource: #skipInDebuggersWalkBack>
+
+    self
+            assert: aBoolean not
+            description: aString
+            resumable: resumableBoolean
 !
 
 should:aBlock 
     "fail, if the block does not evaluate to true"
     
+    <resource: #skipInDebuggersWalkBack>
+
     self assert:aBlock value
 !
 
 should: aBlock description: aString
-	self assert: aBlock value description: aString
-			
+    <resource: #skipInDebuggersWalkBack>
+
+    self assert: aBlock value description: aString
 !
 
 should:aBlock raise:anExceptionalEvent 
     "fail, if the block does not raise the given event"
     
+    <resource: #skipInDebuggersWalkBack>
+
     ^ self assert:(self executeShould:aBlock inScopeOf:anExceptionalEvent)
 !
 
 should: aBlock raise: anExceptionalEvent description: aString 
-	^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent)
-		description: aString
-			
+    <resource: #skipInDebuggersWalkBack>
+
+    ^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent)
+            description: aString
 !
 
 shouldnt:aBlock 
     "fail, if the block does evaluate to true"
     
+    <resource: #skipInDebuggersWalkBack>
+
     self deny:aBlock value
 !
 
 shouldnt: aBlock description: aString
-	self deny: aBlock value description: aString
-			
+    <resource: #skipInDebuggersWalkBack>
+
+    self deny: aBlock value description: aString
 !
 
 shouldnt:aBlock raise:anExceptionalEvent 
     "fail, if the block does raise the given event"
     
+    <resource: #skipInDebuggersWalkBack>
+
     ^ self 
         assert:(self executeShould:aBlock inScopeOf:anExceptionalEvent) not
 !
 
 shouldnt: aBlock raise: anExceptionalEvent description: aString 
-	^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not 		description: aString
-			
+    <resource: #skipInDebuggersWalkBack>
+
+    ^self assert: (self executeShould: aBlock inScopeOf: anExceptionalEvent) not            description: aString
 ! !
 
 !TestCase methodsFor:'dependencies'!
@@ -519,6 +553,8 @@
 signalFailure:aString resumable:isResumable 
     "/        TestResult failure sunitSignalWith: aString
 
+    <resource: #skipInDebuggersWalkBack>
+
     isResumable ifTrue:[
         TestResult resumableFailure 
             raiseRequestWith:nil
@@ -686,7 +722,7 @@
 !TestCase class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.45 2007-06-01 10:04:09 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCase.st,v 1.46 2008-05-26 08:34:09 cg Exp $'
 ! !
 
 TestCase initialize!