Skip to content

Commit 4ff5604

Browse files
authored
Merge pull request #125 from DurieuxPol/fix/123
Utility analysis ignore the "no tests" warning
2 parents 0288626 + 623429e commit 4ff5604

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/MuTalk-Model/MTAnalysis.class.st

+11-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ Class {
1414
'stopOnErrorOrFail',
1515
'testSelectionStrategy',
1616
'testFilter',
17-
'mutantGenerationStrategy'
17+
'mutantGenerationStrategy',
18+
'warnAboutEmptyTests'
1819
],
1920
#category : 'MuTalk-Model-Core',
2021
#package : 'MuTalk-Model',
@@ -105,6 +106,12 @@ MTAnalysis >> doNotStopOnErrorOrFail [
105106
stopOnErrorOrFail := false
106107
]
107108

109+
{ #category : 'accessing' }
110+
MTAnalysis >> doNotWarnAboutEmptyTests [
111+
112+
warnAboutEmptyTests := false
113+
]
114+
108115
{ #category : 'results' }
109116
MTAnalysis >> generalResult [
110117

@@ -191,7 +198,8 @@ MTAnalysis >> initialize [
191198
elapsedTime := 0.
192199
logger := self defaultLogger.
193200
stopOnErrorOrFail := true.
194-
budget := self defaultBudget
201+
budget := self defaultBudget.
202+
warnAboutEmptyTests := true
195203
]
196204

197205
{ #category : 'accessing' }
@@ -362,7 +370,7 @@ MTAnalysis >> testCasesFrom: aClassCollection [
362370
testCase addAll:
363371
(self testCasesReferencesFrom: testClass) ].
364372
testCase ].
365-
tests isEmpty ifTrue: [
373+
tests isEmpty & warnAboutEmptyTests ifTrue: [
366374
Warning signal: 'There is currently no tests' ].
367375
^ tests
368376
]

src/MuTalk-Utilities/MTUtilityAnalysis.class.st

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ MTUtilityAnalysis >> initializeMtAnalysis [
4646
mtAnalysis ifNil: [
4747
mtAnalysis := MTAnalysis new
4848
classesToMutate: classes;
49+
doNotWarnAboutEmptyTests;
4950
testClasses: { } ]
5051
]
5152

0 commit comments

Comments
 (0)