#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Thu, 28 Mar 2019 12:16:41 +0100
changeset 736 481186cd77cf
parent 735 cd6ba429d2db
child 737 a4f9d8da94aa
#DOCUMENTATION by cg class: TestCaseOutcome comment/format in: #result changed: #result:
TestCaseOutcome.st
--- a/TestCaseOutcome.st	Tue Mar 26 19:05:01 2019 +0100
+++ b/TestCaseOutcome.st	Thu Mar 28 12:16:41 2019 +0100
@@ -118,19 +118,24 @@
 !
 
 result
+    "returns one of that state symbols:
+     (see stateNames on the class side)"
+     
     ^ result
+
+    "Modified (comment): / 28-03-2019 / 11:29:15 / Claus Gittinger"
 !
 
 result:aSymbol
-    ((aSymbol ~= TestResult statePass) 
-    and:[ aSymbol ~= TestResult stateFail 
-    and:[ aSymbol ~= TestResult stateError
-    and:[ aSymbol ~= TestResult stateSkip ]]]) ifTrue:[
-        self error:'invalid result'.
-    ].
+    "sets my state symbol (see TestResult stateNames for valid names)"
+
+    self assert:(TestResult stateNames includes:aSymbol)
+         message:'invalid result state'.
+
     result := aSymbol.
 
     "Modified: / 20-08-2011 / 12:52:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 28-03-2019 / 11:30:38 / Claus Gittinger"
 !
 
 selector