Skip to content

Commit d8b1e5a

Browse files
author
anquetil
committed
updated tests now that intrinsics are not set up in famix model at initialization
1 parent deec5bf commit d8b1e5a

5 files changed

+17
-8
lines changed

src/EsopeImporter-Tests/FamixEsopeResolverTest.class.st

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ FamixEsopeResolverTest >> setUp [
1414

1515
super setUp.
1616

17+
mooseModel setIntrinsicTypes.
1718
resolver := FamixEsopeResolver on: mooseModel.
1819
]
1920

src/EsopeImporter-Tests/IASTToFamixVisitorTest.class.st

+1
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ IASTToFamixVisitorTest >> setUp [
192192

193193
programFile := IASTProgramFile new filename: 'fortran77.f' ; yourself.
194194
visitor := IASTToFamixFortranVisitor new.
195+
visitor model setIntrinsicTypes
195196
]
196197

197198
{ #category : 'tests-fortran' }

src/EsopeImporter/FamixEsopeModel.extension.st

+7
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,10 @@ FamixEsopeModel >> intrinsicTypes [
1818
(#character -> (self newTypeIntrinsic name: #character)) }
1919
asDictionary
2020
]
21+
22+
{ #category : '*EsopeImporter' }
23+
FamixEsopeModel >> setIntrinsicTypes [
24+
25+
self attributeAt: #instrinsicTypes put: self intrinsicTypes.
26+
self attributeAt: #unknownType put: [ self newTypeUnknown ]
27+
]

src/EsopeImporter/FamixF77Model.extension.st

+7
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,10 @@ FamixF77Model >> intrinsicTypes [
1919
(#character -> (self newTypeIntrinsic name: #character))
2020
} asDictionary
2121
]
22+
23+
{ #category : '*EsopeImporter' }
24+
FamixF77Model >> setIntrinsicTypes [
25+
26+
self attributeAt: #instrinsicTypes put: self intrinsicTypes.
27+
self attributeAt: #unknownType put: [ self newTypeUnknown ]
28+
]

src/EsopeImporter/IASTAbstractFamixVisitor.class.st

+1-8
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ IASTAbstractFamixVisitor >> model [
7272
IASTAbstractFamixVisitor >> model: anObject [
7373

7474
model := anObject.
75-
self setIntrinsicTypes
75+
model setIntrinsicTypes
7676
]
7777

7878
{ #category : 'private-creation' }
@@ -99,13 +99,6 @@ IASTAbstractFamixVisitor >> retrieveTypeFrom: aName [
9999
) at: aName ifAbsent: typeNotFoundBlock.
100100
]
101101

102-
{ #category : 'private - helpers' }
103-
IASTAbstractFamixVisitor >> setIntrinsicTypes [
104-
105-
model attributeAt: #instrinsicTypes put: model intrinsicTypes.
106-
model attributeAt: #unknownType put: [ model newTypeUnknown ]
107-
]
108-
109102
{ #category : 'spawn' }
110103
IASTAbstractFamixVisitor >> spawn: aVisitorClass [
111104
^aVisitorClass new

0 commit comments

Comments
 (0)