Hi everyone,
As already explained, we are currently cleaning the traits in FamixNG. Pavel did a great job by providing a back office to create new meta model with a tiny DSL and by building the old meta model using the new infrastructure. Now, we want to:
- clean elementary traits (for example when there is a FMMany slot, sometime there is an addXXX method and sometime not)
- compose traits (FamixTClass is not a composition of traits, it has to be done when we build the meta model), to provide semantically rich traits.
- be sure that tests are passing. They were tests in FamixNG, only to ensure compatibility with the old meta model.
Consequently, I developed a generator to create tests associated to elementary traits. Normally you don’t need to use this generator if you use only build traits by composing existing ones.
Anyway, if needed, you can get the generator from FamixNG-TestGenerators package in TestGenerator3 branch:
fttg := FamixTestAndTraitGenerator new.
fttg runFor: FamixTClass
I developed a second generator to generate tests from the trait composition. We will use it after cleaning FamixNG. Obviously, later the generator has no vocation to remain in the image, tests will be generated once and you can add tests by hand.
fcg := FamixComposingTestTraitsGenerator new.
fcg addingTraitsToTestTraitFor: FamixTClass
For using this later, we need that a correction in Pharo concerning composition of traits with slots is back tracked in Pharo 7. Or you can use the attached file.
We already get 135 tests for FamixNG and we will continue.
If you have any question don’t hesitate.
Anne