--- a/TestCase.st Fri Jan 15 04:49:43 2016 +0000
+++ b/TestCase.st Sat Jan 23 13:41:33 2016 +0100
@@ -163,29 +163,32 @@
!
rememberOutcome: thisOutcome
- |thisTestCase someOtherOutcome someOtherTestCase|
+ |thisTestCase someOtherOutcome someOtherTestCase
+ thisTestCaseSelector thisTestCaseClassName|
thisTestCase := thisOutcome testCase.
-
+ thisTestCaseSelector := thisTestCase selector.
+ thisTestCaseClassName := thisTestCase class name.
+
lastOutcomes isNil ifTrue:[
- lastOutcomes := OrderedCollection new.
+ lastOutcomes := OrderedCollection new.
].
"Not a nice code, but portable (what: doWithIndex: is not portable?)"
1 to: lastOutcomes size do:[:i|
- someOtherOutcome := lastOutcomes at: i.
- someOtherTestCase := someOtherOutcome testCase.
- "/ compare by classes name - in case it got redefined
- (someOtherTestCase selector == thisTestCase selector
- and: [someOtherTestCase class name = thisTestCase class name]) ifTrue:[
- "remember; for the timestamp and other info"
- lastOutcomes at: i put: thisOutcome.
- someOtherOutcome result ~= thisOutcome result ifTrue:[
- "but only send out change notification to browser if state has changed"
- self lastTestRunResultChanged: thisOutcome selector.
- ].
- ^self.
- ].
+ someOtherOutcome := lastOutcomes at: i.
+ someOtherTestCase := someOtherOutcome testCase.
+ "/ compare by classes name - in case it got redefined
+ (someOtherTestCase selector == thisTestCaseSelector
+ and: [someOtherTestCase class name = thisTestCaseClassName]) ifTrue:[
+ "remember; for the timestamp and other info"
+ lastOutcomes at: i put: thisOutcome.
+ someOtherOutcome result ~= thisOutcome result ifTrue:[
+ "but only send out change notification to browser if state has changed"
+ self lastTestRunResultChanged: thisOutcome selector.
+ ].
+ ^self.
+ ].
].
lastOutcomes add: thisOutcome.
self lastTestRunResultChanged: thisOutcome selector.