-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #802 from guillep/famix9tests
Add missing tests for regeneration of hierarchy
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Class { | ||
#name : #FamixTest9Test, | ||
#superclass : #TestCase, | ||
#category : #'Famix-Test9-Tests' | ||
} | ||
|
||
{ #category : #running } | ||
FamixTest9Test >> tearDown [ | ||
|
||
FamixTest9Generator deleteMetaModel. | ||
super tearDown | ||
] | ||
|
||
{ #category : #tests } | ||
FamixTest9Test >> testRegenerationWithSlightDifferencesFromScratchWorks [ | ||
|
||
"We generate the meta-model" | ||
FamixTest9Generator generate. | ||
|
||
"We remove it entirely, and we generate a slightly different version of it" | ||
FamixTest9Generator deleteMetaModel. | ||
FamixTest9BisGenerator generate. | ||
|
||
self assert: ((self class environment at: #FamixTest9MySubclass) definesSlotNamed: #mySuperclass). | ||
self assert: ((self class environment at: #FamixTest9MySuperclass) definesSlotNamed: #mySubclasses) | ||
] | ||
|
||
{ #category : #tests } | ||
FamixTest9Test >> testRegenerationWithSlightDifferencesRedefinesRelation [ | ||
"This is a smoke test checking that generation does not fail" | ||
|
||
"We generate the meta-model" | ||
|
||
FamixTest9Generator generate. | ||
|
||
FamixTest9BisGenerator generate. | ||
|
||
self assert: ((self class environment at: #FamixTest9MySubclass) definesSlotNamed: #mySuperclass). | ||
self assert: ((self class environment at: #FamixTest9MySuperclass) definesSlotNamed: #mySubclasses) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Package { #name : #'Famix-Test9-Tests' } |