Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hismo and isStub #717

Closed
seandenigris opened this issue Aug 3, 2015 · 1 comment
Closed

Hismo and isStub #717

seandenigris opened this issue Aug 3, 2015 · 1 comment

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with 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].

Reported by alexandre.bergel on 2011-09-30 15:23:42

@seandenigris
Copy link
Contributor Author

Fixed.

I added HismoEntityVersion>>isStub and appropriate test.

Reported by tudor.girba on 2011-10-03 05:15:14

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant