@@ -13,7 +13,8 @@ Class {
13
13
' mutantResults' ,
14
14
' stopOnErrorOrFail' ,
15
15
' testSelectionStrategy' ,
16
- ' mutantSelectionStrategy'
16
+ ' mutantSelectionStrategy' ,
17
+ ' testFilter'
17
18
],
18
19
#category : ' MuTalk-Model' ,
19
20
#package : ' MuTalk-Model'
@@ -485,6 +486,12 @@ MTAnalysis >> defaultOperators [
485
486
^ MTMutantOperator contents
486
487
]
487
488
489
+ { #category : ' accessing - defaults' }
490
+ MTAnalysis >> defaultTestFilter [
491
+
492
+ ^ MTFreeTestFilter new
493
+ ]
494
+
488
495
{ #category : ' accessing - defaults' }
489
496
MTAnalysis >> defaultTestSelectionStrategy [
490
497
@@ -525,14 +532,17 @@ MTAnalysis >> generateMutations [
525
532
{ #category : ' running' }
526
533
MTAnalysis >> generateResults [
527
534
535
+ | tests |
528
536
mutantResults := OrderedCollection new .
537
+ tests := testFilter filterTests: testCases.
538
+
529
539
mutations do: [ :aMutation |
530
540
(budget exceedsBudgetOn: mutantResults fromTotalMutations: mutations)
531
541
ifTrue: [ ^ mutantResults ].
532
542
logger logStartEvaluating: aMutation.
533
543
mutantResults add: ((MTMutantEvaluation
534
544
for: aMutation
535
- using: testCases
545
+ using: tests
536
546
following: testSelectionStrategy
537
547
andConsidering: self coverageAnalysisResult)
538
548
valueStoppingOnError: stopOnErrorOrFail) ].
@@ -558,6 +568,7 @@ MTAnalysis >> initialize [
558
568
elapsedTime := 0 .
559
569
logger := self defaultLogger.
560
570
budget := self defaultBudget.
571
+ testFilter := self defaultTestFilter.
561
572
stopOnErrorOrFail := true
562
573
]
563
574
@@ -695,6 +706,18 @@ MTAnalysis >> testClasses: aClassCollection [
695
706
testCases := self testCasesFrom: aClassCollection
696
707
]
697
708
709
+ { #category : ' accessing' }
710
+ MTAnalysis >> testFilter [
711
+
712
+ ^ testFilter
713
+ ]
714
+
715
+ { #category : ' accessing' }
716
+ MTAnalysis >> testFilter: anObject [
717
+
718
+ testFilter := anObject
719
+ ]
720
+
698
721
{ #category : ' accessing' }
699
722
MTAnalysis >> testSelectionStrategy [
700
723
0 commit comments