Skip to content

Commit

Permalink
fix makeActInvocation and makeTestMethod
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiovandewaeter committed May 23, 2024
1 parent 37c709f commit 27d5ec9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Famix-UnitTest-Exporter/FamixUTSUnitExporter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ FamixUTSUnitExporter >> makeActInvocation: aFamixUTAct [
self valueExporter makeVariableExpression: receiver ])
selector: testedMethod name
arguments: (aFamixUTAct arguments collect: [ :argument |
self valueExporter makeVariableExpression: argument ])
self valueExporter makeVariableExpression: argument value ])
]

{ #category : #exporting }
Expand Down Expand Up @@ -207,7 +207,13 @@ FamixUTSUnitExporter >> makeTestCaseReceiver: aFamixUTCase [

{ #category : #ast }
FamixUTSUnitExporter >> makeTestMethod: aFamixUTMethod [
"Create missing temporary variables"

statementBlock allChildren do: [ :each |
each isAssignment ifTrue: [
(statementBlock temporaries anySatisfy: [ :temporary |
temporary name = each variable name ]) ifFalse: [
statementBlock addTemporaryNamed: each variable name ] ] ].
^ RBMethodNode selector: aFamixUTMethod name body: statementBlock
]

Expand Down

0 comments on commit 27d5ec9

Please sign in to comment.