TestCaseOutcome.st
changeset 419 e2eb2ab5b937
parent 379 065605384740
child 488 53045c5fc90d
equal deleted inserted replaced
418:bc5e6e66a5ee 419:e2eb2ab5b937
   117 
   117 
   118 result
   118 result
   119     ^ result
   119     ^ result
   120 !
   120 !
   121 
   121 
   122 result:something
   122 result:aSymbol
   123     result := something.
   123 
       
   124     (#(pass fail error) includes: aSymbol) ifFalse:[
       
   125         self error:'invalid result'.
       
   126     ].
       
   127     result := aSymbol.
       
   128 
       
   129     "Modified: / 20-08-2011 / 12:52:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   124 !
   130 !
   125 
   131 
   126 selector
   132 selector
   127 
   133 
   128     ^testCase selector
   134     ^testCase selector
   150 
   156 
   151 testCase:something
   157 testCase:something
   152     testCase := something.
   158     testCase := something.
   153 ! !
   159 ! !
   154 
   160 
       
   161 !TestCaseOutcome methodsFor:'comparing'!
       
   162 
       
   163 = anotherOutcome
       
   164 
       
   165     ^(anotherOutcome isKindOf: self class) 
       
   166         and:[self testCase class == anotherOutcome testCase class
       
   167             and:[self testCase selector == anotherOutcome testCase selector]].
       
   168 
       
   169     "Created: / 20-08-2011 / 14:24:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   170 !
       
   171 
       
   172 hash
       
   173 
       
   174     ^testCase hash bitXor: result hash
       
   175 
       
   176     "Created: / 20-08-2011 / 14:23:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   177 ! !
       
   178 
       
   179 !TestCaseOutcome methodsFor:'remembering'!
       
   180 
       
   181 remember
       
   182 
       
   183     ^testCase class rememberOutcome: self.
       
   184 
       
   185     "Created: / 20-08-2011 / 12:45:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
   186 ! !
       
   187 
   155 !TestCaseOutcome class methodsFor:'documentation'!
   188 !TestCaseOutcome class methodsFor:'documentation'!
   156 
   189 
   157 version
       
   158     ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCaseOutcome.st,v 1.2 2011-08-18 22:30:06 cg Exp $'
       
   159 !
       
   160 
       
   161 version_CVS
   190 version_CVS
   162     ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCaseOutcome.st,v 1.2 2011-08-18 22:30:06 cg Exp $'
   191     ^ '$Header: /cvs/stx/stx/goodies/sunit/TestCaseOutcome.st,v 1.3 2011-08-20 22:07:55 vrany Exp $'
   163 ! !
   192 ! !