Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utility analysis ignore the "no tests" warning #125

Merged
merged 3 commits into from
Feb 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/MuTalk-Model/MTAnalysis.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Class {
'stopOnErrorOrFail',
'testSelectionStrategy',
'testFilter',
'mutantGenerationStrategy'
'mutantGenerationStrategy',
'warnAboutEmptyTests'
],
#category : 'MuTalk-Model-Core',
#package : 'MuTalk-Model',
Expand Down Expand Up @@ -105,6 +106,12 @@ MTAnalysis >> doNotStopOnErrorOrFail [
stopOnErrorOrFail := false
]

{ #category : 'accessing' }
MTAnalysis >> doNotWarnAboutEmptyTests [

warnAboutEmptyTests := false
]

{ #category : 'results' }
MTAnalysis >> generalResult [

Expand Down Expand Up @@ -191,7 +198,8 @@ MTAnalysis >> initialize [
elapsedTime := 0.
logger := self defaultLogger.
stopOnErrorOrFail := true.
budget := self defaultBudget
budget := self defaultBudget.
warnAboutEmptyTests := true
]

{ #category : 'accessing' }
Expand Down Expand Up @@ -362,7 +370,7 @@ MTAnalysis >> testCasesFrom: aClassCollection [
testCase addAll:
(self testCasesReferencesFrom: testClass) ].
testCase ].
tests isEmpty ifTrue: [
tests isEmpty & warnAboutEmptyTests ifTrue: [
Warning signal: 'There is currently no tests' ].
^ tests
]
Expand Down
1 change: 1 addition & 0 deletions src/MuTalk-Utilities/MTUtilityAnalysis.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ MTUtilityAnalysis >> initializeMtAnalysis [
mtAnalysis ifNil: [
mtAnalysis := MTAnalysis new
classesToMutate: classes;
doNotWarnAboutEmptyTests;
testClasses: { } ]
]

Expand Down
Loading