Status: New
Owner: ----
Labels: Type-Defect Priority-Medium Component-Hismo Milestone-4.6
New issue 717 by alexandr...(a)gmail.com: Hismo and isStub
http://code.google.com/p/moose-technology/issues/detail?id=717
The following test fails. No idea why. ClassB is a stub
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
testStubAndHismo
| allModelClasses allHistoryModelClasses mooseSampleData sampleMooseModel
hismoHistoryModel |
mooseSampleData := MooseSampleData new.
sampleMooseModel := (mooseSampleData readMSEString: self sampleMSE)
name: #'example'.
allModelClasses := sampleMooseModel allModelClasses.
self assert: (sampleMooseModel allModelClasses size = 1).
self assert: (sampleMooseModel allClasses size = 2).
hismoHistoryModel := HismoModelHistory new.
hismoHistoryModel addLastVersionForMooseModel: sampleMooseModel.
allHistoryModelClasses := hismoHistoryModel allClassHistories
select: [:each | each last isStub not].
self assert: allModelClasses size = allHistoryModelClasses size
sampleMSE
^ '(
(FAMIX.Namespace (id: 1) (name ''aNamespace''))
(FAMIX.Class (id: 2) (name ''ClassA'') (container (ref: 1))
(parentPackage
(ref: 201)))
(FAMIX.Method (name ''methodA1'') (signature
''methodA1()'') (parentType
(ref: 2)) (LOC 2))
(FAMIX.Attribute (name ''attributeA1'') (parentType (ref: 2)))
(FAMIX.Class (id: 3) (name ''ClassB'') (container (ref: 1)) (isStub true)
(parentPackage (ref: 201)))
(FAMIX.Inheritance (subclass (ref: 3)) (superclass (ref: 2)))
(FAMIX.Package (id: 201) (name ''aPackage''))
(FAMIX.Package (id: 202) (name ''aPackage'') (parentPackage (ref: 201)))
)'
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Indeed, it looks like MooseEntity>>isStub is the trouble maker.
We need to create an issue.
In the meantime you can use:
allHistoryModelClasses := hismoHistoryModel allClassHistories
select: [:each | each last versionEntity
isStub not].