Skip to content

Commit

Permalink
rename methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Durieux Pol committed Feb 2, 2024
1 parent c47c6b0 commit bbbec1b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MTMutantOperatorAnalysisTest >> setUp [
MTMutantOperatorAnalysisTest >> testGetAllOperators [

| actual expected |
actual := (operatorAnalysis operatorsProducingOverXMutants: 0) keys
actual := (operatorAnalysis operatorsProducingAtLeast: 0) keys
asSet.
expected := (MTMutantOperator contentsAll collect: #species) asSet.

Expand All @@ -32,7 +32,7 @@ MTMutantOperatorAnalysisTest >> testGetAllOperators [
MTMutantOperatorAnalysisTest >> testOperatorsProducingOver [

| actual expected |
actual := (operatorAnalysis operatorsProducingOverXMutants: 3) keys
actual := (operatorAnalysis operatorsProducingAtLeast: 3) keys
asSet.
expected := Set
with: MTLiteralIntegersIncreaseOperator
Expand All @@ -46,7 +46,7 @@ MTMutantOperatorAnalysisTest >> testOperatorsProducingOver [
MTMutantOperatorAnalysisTest >> testOperatorsProducingUnder [

| actual expected |
actual := (operatorAnalysis operatorsProducingUnderXMutants: 2) keys
actual := (operatorAnalysis operatorsProducingAtMost: 2) keys
asSet.
expected := (MTMutantOperator contentsAll collect: #species) asSet
reject: [ :operator |
Expand Down
40 changes: 20 additions & 20 deletions src/MuTalk-Utilities/MTMutantOperatorAnalysis.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,6 @@ MTMutantOperatorAnalysis >> addAllAssociationsFrom: sourceDictionary to: destina
^ destinationDictionary
]

{ #category : 'computing' }
MTMutantOperatorAnalysis >> allOperators [

| operatorsDictionary operatorsWithoutMutants |
operatorsDictionary := self getMutantOperatorsDictionary.
operatorsWithoutMutants := self findOperatorsWithoutMutantsFor:
operatorsDictionary.

operatorsDictionary := self
addAllAssociationsFrom:
operatorsWithoutMutants
to: operatorsDictionary asDictionary.

^ operatorsDictionary
]

{ #category : 'computing' }
MTMutantOperatorAnalysis >> findOperatorsWithoutMutantsFor: aDictionary [

Expand All @@ -53,7 +37,7 @@ MTMutantOperatorAnalysis >> findOperatorsWithoutMutantsFor: aDictionary [
]

{ #category : 'computing' }
MTMutantOperatorAnalysis >> getMutantOperatorsDictionary [
MTMutantOperatorAnalysis >> mutantOperatorsDictionaryFromAnalysis [

| analysis dic |
analysis := MTAnalysis new
Expand All @@ -68,19 +52,35 @@ MTMutantOperatorAnalysis >> getMutantOperatorsDictionary [
]

{ #category : 'computing' }
MTMutantOperatorAnalysis >> operatorsProducingOverXMutants: aNumber [
MTMutantOperatorAnalysis >> operatorsProducingAtLeast: aNumber [

^ self operatorsSelectedWith: [ :value | value >= aNumber ]
]

{ #category : 'computing' }
MTMutantOperatorAnalysis >> operatorsProducingUnderXMutants: aNumber [
MTMutantOperatorAnalysis >> operatorsProducingAtMost: aNumber [

^ self operatorsSelectedWith: [ :value | value <= aNumber ]
]

{ #category : 'computing' }
MTMutantOperatorAnalysis >> operatorsSelectedWith: aBlock [

^ self allOperators select: aBlock
^ (self wholeOperatorsDictionary select: aBlock) keys asSet
]

{ #category : 'computing' }
MTMutantOperatorAnalysis >> wholeOperatorsDictionary [

| operatorsDictionary operatorsWithoutMutants |
operatorsDictionary := self mutantOperatorsDictionaryFromAnalysis.
operatorsWithoutMutants := self findOperatorsWithoutMutantsFor:
operatorsDictionary.

operatorsDictionary := self
addAllAssociationsFrom:
operatorsWithoutMutants
to: operatorsDictionary asDictionary.

^ operatorsDictionary
]

0 comments on commit bbbec1b

Please sign in to comment.