@@ -157,12 +157,13 @@ MTAnalysis >> generateResults [
157
157
MTAnalysis >> initialTestRun [
158
158
" Runs all tests once and filters them"
159
159
160
- | results |
161
- results := testCases collect: [ :aTestCase | aTestCase run ].
162
-
160
+ testCases do: [ :aTestCase | aTestCase run ].
161
+
163
162
" The test filter is initialized lazily here because the default one needs the run time of tests, so the initial test run must be executed first"
164
- self testFilter validateFailuresIn: results.
165
- testCases := testFilter filterTests: testCases
163
+ testCases := self testFilter filterTests: testCases.
164
+ (testCases anySatisfy: [ :testCase |
165
+ self testFilter failuresOrErrorsIn: testCase ]) ifTrue: [
166
+ MTTestsWithErrorsException signal ]
166
167
]
167
168
168
169
{ #category : ' initialization' }
@@ -275,21 +276,16 @@ MTAnalysis >> run [
275
276
those classes) and execute all mutants in the set of testClases.
276
277
We obtain a result for each mutant generated"
277
278
278
- ^ [
279
- self initialTestRun.
280
- " The budget is started after the initial test run because the default one needs the run time of tests"
281
- self startBudget.
282
- logger logAnalysisStartFor: self .
283
- elapsedTime := [
284
- self generateCoverageAnalysis.
285
- self generateMutations.
286
- self generateResults ] timeToRun.
287
- true ]
288
- on: MTTestsWithErrorsException
289
- do: [ :ex |
290
- self inform:
291
- ' Your tests have Errors or Failures. Please correct them.' .
292
- false ]
279
+ self initialTestRun.
280
+
281
+ " The budget is started after the initial test run because the default one needs the run time of tests"
282
+ self startBudget.
283
+ logger logAnalysisStartFor: self .
284
+
285
+ elapsedTime := [
286
+ self generateCoverageAnalysis.
287
+ self generateMutations.
288
+ self generateResults ] timeToRun
293
289
]
294
290
295
291
{ #category : ' starting' }
0 commit comments