Skip to content

Commit

Permalink
Merge pull request #802 from guillep/famix9tests
Browse files Browse the repository at this point in the history
Add missing tests for regeneration of hierarchy
  • Loading branch information
ClotildeToullec authored Aug 26, 2024
2 parents 95a68ce + 40c6ef2 commit af8d774
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/Famix-Test9-Tests/FamixTest9Test.class.st
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)
]
1 change: 1 addition & 0 deletions src/Famix-Test9-Tests/package.st
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Package { #name : #'Famix-Test9-Tests' }

0 comments on commit af8d774

Please sign in to comment.