Skip to content

Commit

Permalink
Merge pull request #149 from moosetechnology/remove-PUComment
Browse files Browse the repository at this point in the history
Added a test for comments
  • Loading branch information
NicolasAnquetil committed Jun 20, 2024
2 parents e0d81e4 + fa4f01c commit 265d350
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/EsopeImporter-Tests/IASTToFamixVisitorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,28 @@ IASTToFamixVisitorTest >> testFamixFortran77Comment [
self assert: entity content equals: ' a comment'.
]

{ #category : #'tests-fortran' }
IASTToFamixVisitorTest >> testFamixFortran77CommentInSubRoutine [
| entity |
programFile body: { IASTSubroutine new
entityName: 'sub';
body: { IASTComment new text: ' a comment' ; yourself };
yourself }.

entity := programFile accept: visitor.

self assert: entity programUnits size equals: 1.
self assert: entity comments size equals: 0.

entity := entity programUnits first.
self assert: entity class equals: FamixF77PUSubroutine.
self assert: entity comments size equals: 1.

entity := entity comments first.
self assert: entity class equals: FamixF77Comment.
self assert: entity content equals: ' a comment'.
]

{ #category : #'tests-esope' }
IASTToFamixVisitorTest >> testFamixFortran77ESOAtWithArrayArgument [
"Special case of a D__ function call with an array as argument
Expand Down

0 comments on commit 265d350

Please sign in to comment.