Skip to content

Commit

Permalink
Merge pull request #77 from moosetechnology/76-Generate-testing-methods
Browse files Browse the repository at this point in the history
Fix #76: add testing methods
  • Loading branch information
Gabriel-Darbord authored Oct 18, 2024
2 parents f65942a + b1541b0 commit 0a9d1ba
Show file tree
Hide file tree
Showing 32 changed files with 434 additions and 231 deletions.
14 changes: 8 additions & 6 deletions src/FAST-Core-Model/FASTEntity.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ any entity
"
Class {
#name : #FASTEntity,
#superclass : #MooseEntity,
#name : 'FASTEntity',
#superclass : 'MooseEntity',
#traits : 'FASTTEntity',
#classTraits : 'FASTTEntity classTrait',
#category : #'FAST-Core-Model-Entities'
#category : 'FAST-Core-Model-Entities',
#package : 'FAST-Core-Model',
#tag : 'Entities'
}

{ #category : #meta }
{ #category : 'meta' }
FASTEntity class >> annotation [

<FMClass: #Entity super: #MooseEntity>
Expand All @@ -27,14 +29,14 @@ FASTEntity class >> annotation [
^ self
]

{ #category : #meta }
{ #category : 'meta' }
FASTEntity class >> metamodel [

<generated>
^ FASTModel metamodel
]

{ #category : #testing }
{ #category : 'testing' }
FASTEntity >> isQueryable [

<generated>
Expand Down
12 changes: 7 additions & 5 deletions src/FAST-Core-Model/FASTModel.class.st
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
Class {
#name : #FASTModel,
#superclass : #MooseModel,
#name : 'FASTModel',
#superclass : 'MooseModel',
#traits : 'FASTTEntityCreator',
#classTraits : 'FASTTEntityCreator classTrait',
#category : #'FAST-Core-Model-Model'
#category : 'FAST-Core-Model-Model',
#package : 'FAST-Core-Model',
#tag : 'Model'
}

{ #category : #accessing }
{ #category : 'accessing' }
FASTModel class >> allSubmetamodelsPackagesNames [
<generated>
^ #(#'Moose-Query' #'Famix-Traits')
]

{ #category : #meta }
{ #category : 'meta' }
FASTModel class >> annotation [
<FMClass: #FASTModel super: #MooseModel>
<package: #'FAST-Core-Model'>
Expand Down
27 changes: 18 additions & 9 deletions src/FAST-Core-Model/FASTTAssignment.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,19 @@ A node representing an assignment
"
Trait {
#name : #FASTTAssignment,
#name : 'FASTTAssignment',
#instVars : [
'#expression => FMOne type: #FASTTExpression opposite: #assignedIn',
'#variable => FMOne type: #FASTTVariableEntity opposite: #parentAssignmentExpression'
],
#traits : 'FASTTExpression',
#classTraits : 'FASTTExpression classTrait',
#category : #'FAST-Core-Model-Traits'
#category : 'FAST-Core-Model-Traits',
#package : 'FAST-Core-Model',
#tag : 'Traits'
}

{ #category : #meta }
{ #category : 'meta' }
FASTTAssignment classSide >> annotation [

<FMClass: #TAssignment super: #Object>
Expand All @@ -51,7 +53,7 @@ FASTTAssignment classSide >> annotation [
^ self
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTAssignment >> expression [
"Relation named: #expression type: #FASTTExpression opposite: #assignedIn"

Expand All @@ -60,21 +62,28 @@ FASTTAssignment >> expression [
^ expression
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTAssignment >> expression: anObject [

<generated>
expression := anObject
]

{ #category : #navigation }
{ #category : 'navigation' }
FASTTAssignment >> expressionGroup [
<generated>
<navigation: 'Expression'>
^ MooseSpecializedGroup with: self expression
]

{ #category : #accessing }
{ #category : 'testing' }
FASTTAssignment >> isAssignment [

<generated>
^ true
]

{ #category : 'accessing' }
FASTTAssignment >> variable [
"Relation named: #variable type: #FASTTVariableEntity opposite: #parentAssignmentExpression"

Expand All @@ -83,14 +92,14 @@ FASTTAssignment >> variable [
^ variable
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTAssignment >> variable: anObject [

<generated>
variable := anObject
]

{ #category : #navigation }
{ #category : 'navigation' }
FASTTAssignment >> variableGroup [
<generated>
<navigation: 'Variable'>
Expand Down
21 changes: 15 additions & 6 deletions src/FAST-Core-Model/FASTTBehaviouralEntity.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,18 @@ Local variables are intended to be stored in the local entities of the body
"
Trait {
#name : #FASTTBehaviouralEntity,
#name : 'FASTTBehaviouralEntity',
#instVars : [
'#statementBlock => FMOne type: #FASTTStatementBlock opposite: #fastBehaviouralParent'
],
#traits : 'FASTTScopableEntity + FASTTWithParameters',
#classTraits : 'FASTTScopableEntity classTrait + FASTTWithParameters classTrait',
#category : #'FAST-Core-Model-Traits'
#category : 'FAST-Core-Model-Traits',
#package : 'FAST-Core-Model',
#tag : 'Traits'
}

{ #category : #meta }
{ #category : 'meta' }
FASTTBehaviouralEntity classSide >> annotation [

<FMClass: #TBehaviouralEntity super: #Object>
Expand All @@ -45,7 +47,14 @@ FASTTBehaviouralEntity classSide >> annotation [
^ self
]

{ #category : #accessing }
{ #category : 'testing' }
FASTTBehaviouralEntity >> isBehaviouralEntity [

<generated>
^ true
]

{ #category : 'accessing' }
FASTTBehaviouralEntity >> statementBlock [
"Relation named: #statementBlock type: #FASTTStatementBlock opposite: #fastBehaviouralParent"

Expand All @@ -54,14 +63,14 @@ FASTTBehaviouralEntity >> statementBlock [
^ statementBlock
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTBehaviouralEntity >> statementBlock: anObject [

<generated>
statementBlock := anObject
]

{ #category : #navigation }
{ #category : 'navigation' }
FASTTBehaviouralEntity >> statementBlockGroup [
<generated>
<navigation: 'StatementBlock'>
Expand Down
31 changes: 20 additions & 11 deletions src/FAST-Core-Model/FASTTBinaryExpression.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,20 @@ A trait representing a binary expression of a node of a source code.
"
Trait {
#name : #FASTTBinaryExpression,
#name : 'FASTTBinaryExpression',
#instVars : [
'#leftOperand => FMOne type: #FASTTExpression opposite: #parentExpressionLeft',
'#operator => FMProperty',
'#rightOperand => FMOne type: #FASTTExpression opposite: #parentExpressionRight'
],
#traits : 'FASTTExpression',
#classTraits : 'FASTTExpression classTrait',
#category : #'FAST-Core-Model-Traits'
#category : 'FAST-Core-Model-Traits',
#package : 'FAST-Core-Model',
#tag : 'Traits'
}

{ #category : #meta }
{ #category : 'meta' }
FASTTBinaryExpression classSide >> annotation [

<FMClass: #TBinaryExpression super: #Object>
Expand All @@ -53,7 +55,14 @@ FASTTBinaryExpression classSide >> annotation [
^ self
]

{ #category : #accessing }
{ #category : 'testing' }
FASTTBinaryExpression >> isBinaryExpression [

<generated>
^ true
]

{ #category : 'accessing' }
FASTTBinaryExpression >> leftOperand [
"Relation named: #leftOperand type: #FASTTExpression opposite: #parentExpressionLeft"

Expand All @@ -62,21 +71,21 @@ FASTTBinaryExpression >> leftOperand [
^ leftOperand
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTBinaryExpression >> leftOperand: anObject [

<generated>
leftOperand := anObject
]

{ #category : #navigation }
{ #category : 'navigation' }
FASTTBinaryExpression >> leftOperandGroup [
<generated>
<navigation: 'LeftOperand'>
^ MooseSpecializedGroup with: self leftOperand
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTBinaryExpression >> operator [

<FMProperty: #operator type: #String>
Expand All @@ -85,13 +94,13 @@ FASTTBinaryExpression >> operator [
^ operator
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTBinaryExpression >> operator: anObject [
<generated>
operator := anObject
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTBinaryExpression >> rightOperand [
"Relation named: #rightOperand type: #FASTTExpression opposite: #parentExpressionRight"

Expand All @@ -100,14 +109,14 @@ FASTTBinaryExpression >> rightOperand [
^ rightOperand
]

{ #category : #accessing }
{ #category : 'accessing' }
FASTTBinaryExpression >> rightOperand: anObject [

<generated>
rightOperand := anObject
]

{ #category : #navigation }
{ #category : 'navigation' }
FASTTBinaryExpression >> rightOperandGroup [
<generated>
<navigation: 'RightOperand'>
Expand Down
15 changes: 12 additions & 3 deletions src/FAST-Core-Model/FASTTBooleanLiteral.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,26 @@ A boolean literal
"
Trait {
#name : #FASTTBooleanLiteral,
#name : 'FASTTBooleanLiteral',
#traits : 'FASTTLiteral',
#classTraits : 'FASTTLiteral classTrait',
#category : #'FAST-Core-Model-Traits'
#category : 'FAST-Core-Model-Traits',
#package : 'FAST-Core-Model',
#tag : 'Traits'
}

{ #category : #meta }
{ #category : 'meta' }
FASTTBooleanLiteral classSide >> annotation [

<FMClass: #TBooleanLiteral super: #Object>
<package: #'FAST-Core-Model'>
<generated>
^ self
]

{ #category : 'testing' }
FASTTBooleanLiteral >> isBooleanLiteral [

<generated>
^ true
]
15 changes: 12 additions & 3 deletions src/FAST-Core-Model/FASTTCharacterLiteral.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,26 @@ A character literal
"
Trait {
#name : #FASTTCharacterLiteral,
#name : 'FASTTCharacterLiteral',
#traits : 'FASTTLiteral',
#classTraits : 'FASTTLiteral classTrait',
#category : #'FAST-Core-Model-Traits'
#category : 'FAST-Core-Model-Traits',
#package : 'FAST-Core-Model',
#tag : 'Traits'
}

{ #category : #meta }
{ #category : 'meta' }
FASTTCharacterLiteral classSide >> annotation [

<FMClass: #TCharacterLiteral super: #Object>
<package: #'FAST-Core-Model'>
<generated>
^ self
]

{ #category : 'testing' }
FASTTCharacterLiteral >> isCharacterLiteral [

<generated>
^ true
]
Loading

0 comments on commit 0a9d1ba

Please sign in to comment.