From 872345c951eede4df3f42ea535883f2ad0d28e77 Mon Sep 17 00:00:00 2001 From: Durieux Pol Date: Fri, 26 Jan 2024 14:51:13 +0100 Subject: [PATCH] refactor tests --- .../MTNonMutatedMethodsAnalysisTest.class.st | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/MuTalk-Utilities-Tests/MTNonMutatedMethodsAnalysisTest.class.st b/src/MuTalk-Utilities-Tests/MTNonMutatedMethodsAnalysisTest.class.st index dc99546..252641b 100644 --- a/src/MuTalk-Utilities-Tests/MTNonMutatedMethodsAnalysisTest.class.st +++ b/src/MuTalk-Utilities-Tests/MTNonMutatedMethodsAnalysisTest.class.st @@ -8,18 +8,13 @@ Class { { #category : 'tests' } MTNonMutatedMethodsAnalysisTest >> testNonMutatedMethods [ - | testClasses nonMutatedMethods results | - testClasses := 'MuTalk-Utilities-Tests' asPackage definedClasses - select: #isTestCase. - nonMutatedMethods := testClasses - inject: Set new - into: [ :set :testClass | - set addAll: testClass methods. - set ]. + | results | + results := (MTNonMutatedMethodsAnalysis forClasses: { + MTAuxiliarClassForMatrix. + MTAuxiliarClassForMatrixTest }) + findMethodsWithoutMutation asSet. - results := (MTNonMutatedMethodsAnalysis forPackages: - { 'MuTalk-Utilities-Tests' }) findMethodsWithoutMutation - asSet. - - self assert: nonMutatedMethods equals: results + self + assert: results + equals: MTAuxiliarClassForMatrixTest methods asSet ]