#OTHER by cg
authorClaus Gittinger <cg@exept.de>
Mon, 17 Jul 2017 17:45:11 +0200
changeset 22052 1f0b557bdb3f
parent 22051 bd0a85c34562
child 22053 3309b9812005
#OTHER by cg +haltIfTrue / haltIfFalse
True.st
--- a/True.st	Mon Jul 17 17:45:10 2017 +0200
+++ b/True.st	Mon Jul 17 17:45:11 2017 +0200
@@ -178,6 +178,41 @@
     ^ 1
 ! !
 
+!True methodsFor:'debugging'!
+
+haltIfFalse
+    "halt if the receiver is false"
+
+    <resource: #skipInDebuggersWalkBack>
+
+    ^ self
+
+    "
+     3 haltIfNil
+     nil haltIfNil
+    "
+
+    "Created: / 17-07-2017 / 17:42:56 / cg"
+!
+
+haltIfTrue
+    "halt if the receiver is true"
+
+    <resource: #skipInDebuggersWalkBack>
+
+    self halt
+
+    "
+     3 haltIfNil
+     nil haltIfNil
+     
+     true haltIfTrue
+     false haltIfFalse
+    "
+
+    "Created: / 17-07-2017 / 17:43:32 / cg"
+! !
+
 !True methodsFor:'logical operations'!
 
 & aBoolean