@@ -123,28 +123,31 @@ MTMatrix >> classesToMutate: aClass [
123
123
{ #category : ' computing' }
124
124
MTMatrix >> dataForTests: testCollection andMutations: mutationCollection [
125
125
126
- | totalNumberOfTests numberOfFailuresCollection killedCount |
127
- totalNumberOfTests := testCollection size * mutationCollection size.
126
+ | totalNumberOfTestsExecuted numberOfFailuresCollection totalNumberOfFailures |
127
+ totalNumberOfTestsExecuted := testCollection size
128
+ * mutationCollection size.
128
129
numberOfFailuresCollection := mutationCollection collect: [ :mutation |
129
130
| testClass |
131
+ " We know that all tests from testCollection are from the same class"
130
132
testClass := testCollection atRandom
131
133
testCaseClass.
132
134
(self
133
135
failuresFor: mutation
134
136
andTestClass: testClass) size ].
135
- killedCount := numberOfFailuresCollection fold: [ :num1 :num2 |
136
- num1 + num2 ].
137
- ^ (killedCount / totalNumberOfTests * 100 ) asInteger
137
+ totalNumberOfFailures := numberOfFailuresCollection fold: [ :num1 :num2 |
138
+ num1 + num2 ].
139
+ ^ (totalNumberOfFailures / totalNumberOfTestsExecuted * 100 )
140
+ asInteger
138
141
]
139
142
140
143
{ #category : ' computing' }
141
144
MTMatrix >> dataMatrixForTests: testDictionary andMutations: mutationDictionary [
142
145
143
- ^ ( mutationDictionary collect: [ :mutationCollection |
144
- ( testDictionary collect: [ :testCollection |
145
- self
146
- dataForTests: testCollection
147
- andMutations: mutationCollection ]) asArray ]) asArray
146
+ ^ mutationDictionary values collect: [ :mutationCollection |
147
+ testDictionary values collect: [ :testCollection |
148
+ self
149
+ dataForTests: testCollection
150
+ andMutations: mutationCollection ] ]
148
151
]
149
152
150
153
{ #category : ' accessing' }
0 commit comments