Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJuergen Haug2019-08-26 08:47:17 -0400
committerJuergen Haug2019-08-26 08:47:17 -0400
commita53edb84d9bf41a5c874f874474f9f91725377ed (patch)
treec4dc25a0c44cd7aa12910581f1255e03796ea438 /tests
parent3db28f8c02d066d107e343baf958712bc35fc9eb (diff)
downloadorg.eclipse.etrice-a53edb84d9bf41a5c874f874474f9f91725377ed.tar.gz
org.eclipse.etrice-a53edb84d9bf41a5c874f874474f9f91725377ed.tar.xz
org.eclipse.etrice-a53edb84d9bf41a5c874f874474f9f91725377ed.zip
added RoomModel template with correct namespace + minor improvements
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/build.gradle3
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/Bug541775_NoInitialTransition.room32
2 files changed, 34 insertions, 1 deletions
diff --git a/tests/org.eclipse.etrice.generator.common.tests/build.gradle b/tests/org.eclipse.etrice.generator.common.tests/build.gradle
index 685efc007..06fd90738 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/build.gradle
+++ b/tests/org.eclipse.etrice.generator.common.tests/build.gradle
@@ -24,12 +24,13 @@ def tests = [
choicePointTestExtended: ['models/ChoicePointTestExtended.room', genericPhysical],
dataDrivenTest: ['models/DataDrivenTest.room', genericPhysical],
/* enumTest: ['models/EnumTest.room', genericPhysical], not supported in c++ */
- compileTest: ['models/CompileTest.room', genericPhysical, 'models/StatemachineInterfaceTest.room', 'models/StatemachineInterfaceInheritedTest.room', 'models/StatemachineInterfaceTest.room', 'models/ContinuationTransitionTest.room', 'models/Bug541775_NoInitialTransition.room'],
+ compileTest: ['models/CompileTest.room', genericPhysical, 'models/StatemachineInterfaceTest.room', 'models/StatemachineInterfaceInheritedTest.room', 'models/StatemachineInterfaceTest.room', 'models/ContinuationTransitionTest.room'],
handlerTest: ['models/HandlerTest.room', genericPhysical],
operationInheritanceTest: ['models/OperationInheritanceTest.room', genericPhysical],
pingPongThreadTest: ['models/PingPongThreadTest.etmap', 'models/PingPongThreadTest.room'],
pingPongThreadReplPortTest: ['models/PingPongThreadReplPortTest.etmap', 'models/PingPongThreadReplPortTest.room'],
+ bug541775Test: ['models/Bug541775_NoInitialTransition.room', genericPhysical],
]
tests.each { name, models ->
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/Bug541775_NoInitialTransition.room b/tests/org.eclipse.etrice.generator.common.tests/models/Bug541775_NoInitialTransition.room
index cdeb83a8d..630944b2f 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/Bug541775_NoInitialTransition.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/Bug541775_NoInitialTransition.room
@@ -1,11 +1,15 @@
RoomModel Bug541775_NoInitialTransition {
+ import etrice.api.annotations.TestInstance
+ import etrice.api.types.int32
+
ProtocolClass PDummy {
incoming {
Message in1
}
}
+ // generate and compile this actor
abstract ActorClass ANoInitialTransition {
Structure {
Port p1: PDummy
@@ -21,4 +25,32 @@ RoomModel Bug541775_NoInitialTransition {
}
}
}
+
+ ActorClass AInitialTransition extends ANoInitialTransition {
+ @TestInstance
+ Structure {
+ Attribute caseId: int32
+ }
+ Behavior {
+ ctor '''
+ caseId = etUnit_openAll("log", "Bug541775Test", "org.eclipse.etrice.generator.common.tests.Bug541775", "Bug541775_case");
+ '''
+ dtor '''
+ etUnit_closeAll(caseId);
+ '''
+ StateMachine {
+ State state0 {
+ subgraph {
+ State state0
+ Transition init: initial -> state0
+ }
+ }
+ Transition init0: initial -> state0 {
+ action '''
+ etUnit_testFinished(caseId);
+ '''
+ }
+ }
+ }
+ }
} \ No newline at end of file

Back to the top