Skip to content

Commit

Permalink
Merge pull request #695 from moosetechnology/p12
Browse files Browse the repository at this point in the history
New batch of adaptations to P12
  • Loading branch information
jecisc authored Jan 23, 2024
2 parents 3afe8b0 + 63a6760 commit dbf7ae7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ FamixModelExtractionTest >> testHasEmptyBody [

{ #category : #tests }
FamixModelExtractionTest >> testInheritedAttributes [

| inheritedAtts |
inheritedAtts := msePrinterClass inheritedAttributes.
self assert: msePrinterClass superclassHierarchy size equals: 5.
Expand All @@ -159,7 +160,10 @@ FamixModelExtractionTest >> testInheritedAttributes [
self assert: (inheritedAtts includes: nodeName).
self assert: (inheritedAtts includes: nextNode).
self assert: (inheritedAtts includes: serverType).
self assert: (inheritedAtts select: [ :each | each isClassSide ]) size equals: 1
"In P12 DependentFileds class var gor removed from Object. Remove this condition once P12 will be the minimal version used for this project."
self assert: (inheritedAtts select: [ :each | each isClassSide ]) size equals: (SystemVersion current major < 12
ifTrue: [ 1 ]
ifFalse: [ 0 ])
]

{ #category : #tests }
Expand Down Expand Up @@ -233,7 +237,7 @@ FamixModelExtractionTest >> testIsSide [

{ #category : #tests }
FamixModelExtractionTest >> testModelDoesNotContainDuplicateSharedVars [
self assert: (self model entities select: [ :e | e name = 'DependentsFields' ]) size equals: 1
self assert: (self model entities select: [ :e | e name = 'MySharedVariable' ]) size equals: 1
]

{ #category : #tests }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,12 @@ LANFamixPropertiesTest >> testClassAllProperties [
LANFamixPropertiesTest >> testClassAttributes [

self assert: self nodeClass numberOfAttributes equals: 2.
self assert: self nodeClass numberOfAttributesInherited equals: 3.
self
assert:
(self workstationClass propertyNamed: #numberOfAttributesInherited)
equals: (self totalNumberOfAttributesFor: LANWorkStation superclass).
self
assert: self workstationClass numberOfAttributesInherited
equals: (self totalNumberOfAttributesFor: LANWorkStation superclass)
"In P12 DependentFileds class var gor removed from Object. Remove this condition once P12 will be the minimal version used for this project."
self assert: self nodeClass numberOfAttributesInherited equals: (SystemVersion current major < 12
ifTrue: [ 3 ]
ifFalse: [ 2 ]).
self assert: (self workstationClass propertyNamed: #numberOfAttributesInherited) equals: (self totalNumberOfAttributesFor: LANWorkStation superclass).
self assert: self workstationClass numberOfAttributesInherited equals: (self totalNumberOfAttributesFor: LANWorkStation superclass)
]

{ #category : #testing }
Expand Down Expand Up @@ -259,9 +257,9 @@ LANFamixPropertiesTest >> testMethodsSimpleProperties [

{ #category : #testing }
LANFamixPropertiesTest >> testNoDuplicatesOfClassVariables [
self assert: ((self model entityNamed: #'Smalltalk::Object') attributes contains: [ :each | each name = #DependentsFields ]).
self assert: (self model entityNamed: #'Smalltalk::Object') attributes first identicalTo: (self model entityNamed: #'Smalltalk::Object') attributes last.
self assert: (self model entityNamed: #'Smalltalk::Object') attributes size equals: 1
self assert: ((self model entityNamed: #'Smalltalk::LANAbstractDestinationAddress') attributes contains: [ :each | each name = #MySharedVariable ]).
self assert: (self model entityNamed: #'Smalltalk::LANAbstractDestinationAddress') attributes first identicalTo: (self model entityNamed: #'Smalltalk::LANAbstractDestinationAddress') attributes last.
self assert: (self model entityNamed: #'Smalltalk::LANAbstractDestinationAddress') attributes size equals: 1
]

{ #category : #testing }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,5 @@ LANMooseGroupTest >> testSelectGroupType [

{ #category : #tests }
LANMooseGroupTest >> testSum [
self assert: (self model allModelClasses sumNumbers: #numberOfAttributes) equals: 16
self assert: (self model allModelClasses sumNumbers: #numberOfAttributes) equals: 17
]
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Class {
#name : #LANAbstractDestinationAddress,
#superclass : #Object,
#classVars : [
'MySharedVariable'
],
#category : #'Moose-TestResources-LAN'
}

Expand Down

0 comments on commit dbf7ae7

Please sign in to comment.