Skip to content

Commit

Permalink
rename attribute and methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Durieux Pol committed Feb 12, 2024
1 parent 7cfd90c commit 7b3307a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
26 changes: 19 additions & 7 deletions src/MuTalk-Model/MTMethodMutation.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Class {
'originalClass',
'testCaseReferences',
'originalProtocol',
'newExpression'
'data'
],
#category : 'MuTalk-Model',
#package : 'MuTalk-Model'
Expand All @@ -26,14 +26,14 @@ MTMethodMutation class >> for: aMethod using: anOperatorApplied nodeNumber: aNod
]

{ #category : 'instance creation' }
MTMethodMutation class >> for: aMethod using: anOperatorApplied nodeNumber: aNodeNumber ofClass: aClass replacingWith: anObject [
MTMethodMutation class >> for: aMethod using: anOperatorApplied nodeNumber: aNodeNumber ofClass: aClass withData: anObject [

^ self new
initializeFor: aMethod
using: anOperatorApplied
nodeNumber: aNodeNumber
ofClass: aClass
replacingWith: anObject;
withData: anObject;
yourself
]

Expand All @@ -50,6 +50,18 @@ MTMethodMutation >> = anObject [
^ true
]

{ #category : 'accessing' }
MTMethodMutation >> data [

^ data
]

{ #category : 'accessing' }
MTMethodMutation >> data: anObject [

data := anObject
]

{ #category : 'comparing' }
MTMethodMutation >> hash [

Expand All @@ -65,18 +77,18 @@ MTMethodMutation >> initializeFor: aMethod using: anOperatorApplied nodeNumber:
using: anOperatorApplied
nodeNumber: aNodeNumber
ofClass: aClass
replacingWith: anOperatorApplied newExpression
withData: anOperatorApplied newExpression
]

{ #category : 'initialize-release' }
MTMethodMutation >> initializeFor: aMethod using: anOperatorApplied nodeNumber: aNodeNumber ofClass: aClass replacingWith: anObject [
MTMethodMutation >> initializeFor: aMethod using: anOperatorApplied nodeNumber: aNodeNumber ofClass: aClass withData: anObject [

originalMethod := aMethod.
originalProtocol := aMethod protocol.
operator := anOperatorApplied.
nodeNumber := aNodeNumber.
originalClass := aClass.
newExpression := anObject
data := anObject
]

{ #category : 'installing' }
Expand All @@ -94,7 +106,7 @@ MTMethodMutation >> modifiedSource [
^ operator
modifiedSourceFor: originalMethod
number: nodeNumber
newExpression: newExpression
newExpression: data
]

{ #category : 'accessing' }
Expand Down
2 changes: 1 addition & 1 deletion src/MuTalk-Model/MTPredicateBasedMutantOperator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ MTPredicateBasedMutantOperator >> mutationsFor: aCompiledMethod with: aParseTree
using: self
nodeNumber: nodeIndex
ofClass: aCompiledMethod methodClass
replacingWith: newNode).
withData: newNode).
^ accumulator
]

Expand Down
2 changes: 1 addition & 1 deletion src/MuTalk-Model/MTSubclassReplacementOperator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ MTSubclassReplacementOperator >> mutationsFor: aCompiledMethod with: aParseTree
using: self
nodeNumber: nodeIndex
ofClass: aCompiledMethod methodClass
replacingWith: newExpression ]).
withData: newExpression ]).
^ accumulator
]

Expand Down

0 comments on commit 7b3307a

Please sign in to comment.