Lost methods
authorvrany
Sun, 21 Aug 2011 00:07:55 +0200
changeset 419 e2eb2ab5b937
parent 418 bc5e6e66a5ee
child 420 84e640399605
Lost methods
TestCaseOutcome.st
--- a/TestCaseOutcome.st	Sun Aug 21 00:06:05 2011 +0200
+++ b/TestCaseOutcome.st	Sun Aug 21 00:07:55 2011 +0200
@@ -119,8 +119,14 @@
     ^ result
 !
 
-result:something
-    result := something.
+result:aSymbol
+
+    (#(pass fail error) includes: aSymbol) ifFalse:[
+        self error:'invalid result'.
+    ].
+    result := aSymbol.
+
+    "Modified: / 20-08-2011 / 12:52:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 selector
@@ -152,12 +158,35 @@
     testCase := something.
 ! !
 
+!TestCaseOutcome methodsFor:'comparing'!
+
+= anotherOutcome
+
+    ^(anotherOutcome isKindOf: self class) 
+        and:[self testCase class == anotherOutcome testCase class
+            and:[self testCase selector == anotherOutcome testCase selector]].
+
+    "Created: / 20-08-2011 / 14:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hash
+
+    ^testCase hash bitXor: result hash
+
+    "Created: / 20-08-2011 / 14:23:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!TestCaseOutcome methodsFor:'remembering'!
+
+remember
+
+    ^testCase class rememberOutcome: self.
+
+    "Created: / 20-08-2011 / 12:45:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !TestCaseOutcome class methodsFor:'documentation'!
 
-version
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCaseOutcome.st,v 1.2 2011-08-18 22:30:06 cg Exp $'
-!
-
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCaseOutcome.st,v 1.2 2011-08-18 22:30:06 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCaseOutcome.st,v 1.3 2011-08-20 22:07:55 vrany Exp $'
 ! !