Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorHenrik Rentz-Reichert2018-01-05 16:16:05 -0500
committerHenrik Rentz-Reichert2018-01-08 14:47:48 -0500
commit33e5411e9632baa741e2e93e91922cd40693cfd3 (patch)
tree1814b0a170406345b83937901b928040fd58c6a9 /tests
parent97db531e8fa6d639abf4ac2bbbb1dbdb5ad79f15 (diff)
downloadorg.eclipse.etrice-33e5411e9632baa741e2e93e91922cd40693cfd3.tar.gz
org.eclipse.etrice-33e5411e9632baa741e2e93e91922cd40693cfd3.tar.xz
org.eclipse.etrice-33e5411e9632baa741e2e93e91922cd40693cfd3.zip
Bug 529445 - [newfsmgen] make old style transition data deprecated
Implementation as suggested in the bug. Change-Id: I6a6f6ea966e4060646427078d82cb2b12eb046b6
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.etrice.abstractexec.behavior.tests/models/bug417433.room24
-rw-r--r--tests/org.eclipse.etrice.abstractexec.behavior.tests/models/cashTerminal.room76
-rw-r--r--tests/org.eclipse.etrice.abstractexec.behavior.tests/models/reachability.room8
-rw-r--r--tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics.room36
-rw-r--r--tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics_basic.room32
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room44
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatFSMExample.room4
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatInheritedFSMExample.room8
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/HierInheritedFSMExample.room8
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/MultipleConnectedChoicepointExample.room34
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesInheritanceExample.room20
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesTriggersExample.room14
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/TriggerExample.room8
-rw-r--r--tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/TestMultipleConnectedChoicepoint.xtend13
-rw-r--r--tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java5
15 files changed, 99 insertions, 235 deletions
diff --git a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/bug417433.room b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/bug417433.room
index 34901348f..7b3173a47 100644
--- a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/bug417433.room
+++ b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/bug417433.room
@@ -29,19 +29,13 @@ RoomModel org.franca.examples [ "Generated from Franca IDL model org.franca.exam
}
}
State waitingForMove {
- entry {
- "messageAPI.move(new StructPosition(0, 0, 0));"
- }
+ entry '''messageAPI.move(new StructPosition(0, 0, 0));'''
}
State waitingForGrab {
- entry {
- "messageAPI.grab(0.0);"
- }
+ entry '''messageAPI.grab(0.0);'''
}
State waitingForRelease {
- entry {
- "messageAPI.release();"
- }
+ entry '''messageAPI.release();'''
}
State ready
}
@@ -50,15 +44,15 @@ RoomModel org.franca.examples [ "Generated from Franca IDL model org.franca.exam
ProtocolClass RobotArm {
incoming {
- Message move(pos: StructPosition)
- Message grab(gripAngle: Double)
+ Message move(StructPosition)
+ Message grab(Double)
Message release()
}
outgoing {
- Message replyMove(ok: Boolean) [ "reply for move" ]
- Message replyGrab(ok: Boolean) [ "reply for grab" ]
- Message replyRelease(ok: Boolean) [ "reply for release" ]
- Message operable(pos: StructPosition)
+ Message replyMove(Boolean) [ "reply for move" ]
+ Message replyGrab(Boolean) [ "reply for grab" ]
+ Message replyRelease(Boolean) [ "reply for release" ]
+ Message operable(StructPosition)
}
semantics {
in : grab -> out : replyGrab
diff --git a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/cashTerminal.room b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/cashTerminal.room
index 8f7164e05..270ce69f4 100644
--- a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/cashTerminal.room
+++ b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/cashTerminal.room
@@ -12,17 +12,13 @@ RoomModel CashTerminal {
Behavior {
StateMachine{
Transition init: initial -> state0_sm {
- action {
- "auth.hello();"
- }
+ action '''auth.hello();'''
}
Transition tr0: state0_sm -> offline_sm {
triggers {
<serviceNA: auth>
}
- action {
- "terminal.showOffline();"
- }
+ action '''terminal.showOffline();'''
}
Transition tr1: state0_sm -> idle_sm {
triggers {
@@ -40,32 +36,24 @@ RoomModel CashTerminal {
triggers {
<correctPIN: auth>
}
- action {
- "terminal.dispenseMoney();"
- }
+ action '''terminal.dispenseMoney();'''
}
Transition tr6: tp1 of handleCard -> idle_sm
State state0_sm
State idle_sm {
- entry {
- "terminal.showWelcome();"
- }
+ entry '''terminal.showWelcome();'''
}
State offline_sm
State handleCard {
subgraph {
Transition init: initial -> state0_sm {
- action {
- "auth.checkCard();"
- }
+ action '''auth.checkCard();'''
}
Transition tr0: state0_sm -> wait_sm {
triggers {
<validCard: auth>
}
- action {
- "terminal.showPIN();"
- }
+ action '''terminal.showPIN();'''
}
Transition tr1: wait_sm -> my tp0 {
triggers {
@@ -92,22 +80,16 @@ RoomModel CashTerminal {
}
}
Transition tr2: cp cp0 -> my tp1 {
- action {
- "terminal.confiscateCard();"
- }
+ action '''terminal.confiscateCard();'''
}
Transition tr3: cp cp0 -> wait_sm {
- cond {
- "if(count_tries < 2)"
- }
+ cond '''if(count_tries < 2)'''
}
ChoicePoint cp0
EntryPoint tp0
ExitPoint tp1
State wait_sm {
- entry {
- "auth.checkPIN();"
- }
+ entry '''auth.checkPIN();'''
}
}
}
@@ -126,17 +108,11 @@ RoomModel CashTerminal {
Behavior {
StateMachine {
Transition tr0: cp cp0 -> error_rm {
- action {
- "client.serviceNA();"
- }
+ action '''client.serviceNA();'''
}
Transition tr2: cp cp0 -> online {
- cond {
- "if(okay)"
- }
- action {
- "client.hello();"
- }
+ cond '''if(okay)'''
+ action '''client.hello();'''
}
Transition tr4: online -> cp cp1 {
triggers {
@@ -150,32 +126,20 @@ RoomModel CashTerminal {
}
}
Transition tr1: cp cp1 -> state0 {
- action {
- "client.invalidCard();"
- }
+ action '''client.invalidCard();'''
}
Transition tr3: cp cp1 -> pin_checker {
- cond {
- "correct"
- }
- action {
- "client.validCard();"
- }
+ cond '''correct'''
+ action '''client.validCard();'''
}
Transition tr5_vm: cp cp2 -> pin_checker {
- action {
- // violates semantics: more than 2 checks possible
- "client.hello();"
- "client.wrongPIN();"
- }
+ action '''
+ client.hello();
+ client.wrongPIN();'''
}
Transition tr5: cp cp2 -> state0 {
- cond {
- "correct"
- }
- action {
- "client.correctPIN()"
- }
+ cond '''correct'''
+ action '''client.correctPIN()'''
}
Transition tr7: pin_checker -> cp cp2 {
triggers {
diff --git a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/reachability.room b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/reachability.room
index edd53e8d3..33cae1ad3 100644
--- a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/reachability.room
+++ b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/reachability.room
@@ -161,9 +161,7 @@ RoomModel Reachability {
Transition tr0_1: my tp0_1 -> cp cp0_1
Transition tr3_1: cp cp0_1 -> state0_1
Transition tr4_1: cp cp0_1 -> state1_1 {
- cond {
- "true"
- }
+ cond '''true'''
}
Transition tr2_1: state1_1 -> my tp1_1 {
triggers {
@@ -265,9 +263,7 @@ RoomModel Reachability {
Behavior {
StateMachine {
RefinedTransition state0_1.sg.tr4zzz_0 {
- action {
- ""
- }
+ action ''''''
}
Transition tr_new_0: state_new1_0 -> state_new2_0 {
triggers {
diff --git a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics.room b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics.room
index a1c316575..e3c3d1cae 100644
--- a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics.room
+++ b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics.room
@@ -15,33 +15,25 @@ RoomModel Semantics {
triggers {
<in1: p0>
}
- action {
- "p0.out1();"
- }
+ action '''p0.out1();'''
}
Transition tr1: state1 -> state2 {
triggers {
<in2: p0>
}
- action {
- "p0.out2();"
- }
+ action '''p0.out2();'''
}
Transition tr2: state2 -> state3 {
triggers {
<in3: p0>
}
- action {
- "p0.out3();"
- }
+ action '''p0.out3();'''
}
Transition tr3: state3 -> state4 {
triggers {
<in4: p0>
}
- action {
- "p0.out4();"
- }
+ action '''p0.out4();'''
}
Transition tr4: state1 -> wrong {
triggers {
@@ -86,18 +78,13 @@ RoomModel Semantics {
triggers {
<someEvent1: dummy>
}
- action {
- "motor1.start();"
- }
+ action '''motor1.start();'''
}
Transition tr1: MotorStarted -> Idle {
triggers {
<done: motor1>
}
- action {
- // this action code receives a warning
- "motor1.start();"
- }
+ action '''motor1.start();'''
}
Transition tr2: MotorStarted -> Idle {
triggers {
@@ -127,9 +114,7 @@ RoomModel Semantics {
triggers {
<someEvent1: dummy>
}
- action {
- "motor1.start();"
- }
+ action '''motor1.start();'''
}
Transition tr2: MotorStarted -> Idle {
triggers {
@@ -161,10 +146,9 @@ RoomModel Semantics {
triggers {
<someEvent1: dummy>
}
- action {
- "motor1.start();"
- "motor2.start();"
- }
+ action '''
+ motor1.start();
+ motor2.start();'''
}
Transition tr1: MotorStarted -> Motor1done {
triggers {
diff --git a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics_basic.room b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics_basic.room
index 547d26982..5eb00c3b3 100644
--- a/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics_basic.room
+++ b/tests/org.eclipse.etrice.abstractexec.behavior.tests/models/semantics_basic.room
@@ -19,9 +19,7 @@ RoomModel Semantics_basic {
}
Transition tr2: state0 -> tp0 of state2 {
triggers {
- <in1: p0 guard {
- "if(true)"
- }>
+ <in1: p0 guard '''if(true)'''>
}
}
Transition tr3: tp1 of state2 -> state0
@@ -36,9 +34,7 @@ RoomModel Semantics_basic {
}
}
State state0 {
- entry {
- "p0.out3();"
- }
+ entry '''p0.out3();'''
}
State state1 {
subgraph {
@@ -47,9 +43,7 @@ RoomModel Semantics_basic {
subgraph {
Transition init: initial -> state1_0_0_vm { }
State state1_0_0_vm {
- entry {
- "p0.out2();"
- }
+ entry '''p0.out2();'''
}
}
}
@@ -60,9 +54,7 @@ RoomModel Semantics_basic {
Transition tr0: my tp0 -> state0
Transition tr1: state0 -> my tp1 {
triggers {
- <in2: p0 guard {
- "if(true)"
- }>
+ <in2: p0 guard '''if(true)'''>
}
}
EntryPoint tp0
@@ -93,9 +85,7 @@ RoomModel Semantics_basic {
}
Transition tr2: state2 -> state3 {
triggers {
- <in3: p0 guard {
- "if(true)"
- }>
+ <in3: p0 guard '''if(true)'''>
}
}
Transition tr3: state1 -> state3 {
@@ -119,9 +109,7 @@ RoomModel Semantics_basic {
}
}
State state0 {
- entry {
- "p0.out1();"
- }
+ entry '''p0.out1();'''
}
State state1
State state2
@@ -139,9 +127,7 @@ RoomModel Semantics_basic {
Behavior {
StateMachine {
Transition init: initial -> state0 {
- action {
- "p0.out1();"
- }
+ action '''p0.out1();'''
}
Transition tr0: state0 -> state1 {
triggers {
@@ -156,9 +142,7 @@ RoomModel Semantics_basic {
TransitionPoint tp0
State state0
State state1 {
- entry {
- "p0.out1()"
- }
+ entry '''p0.out1()'''
}
}
}
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room
index e117cc638..047671379 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/CodeInheritanceExample.room
@@ -5,23 +5,17 @@ RoomModel TemplateModel {
Behavior {
StateMachine {
RefinedState BaseEntryExit {
- entry {
- "// derived entry"
- }
+ entry '''// derived entry'''
}
RefinedState Base {
- exit {
- "// derived exit"
- }
+ exit '''// derived exit'''
subgraph {
Transition init: initial -> state0 { }
State state0
}
}
RefinedState BaseSub {
- entry {
- "// derived entry"
- }
+ entry '''// derived entry'''
}
}
}
@@ -37,41 +31,29 @@ RoomModel TemplateModel {
Behavior {
StateMachine {
Transition init: initial -> BaseEntryExit {
- action {
- "// base init"
- }
+ action '''// base init'''
}
Transition tr0: BaseEntryExit -> Base {
triggers {
<m1: p0>
}
- action {
- "// base"
- }
+ action '''// base'''
}
Transition tr1: Base -> BaseSub {
triggers {
<m1: p0>
}
- action {
- "// base"
- }
+ action '''// base'''
}
Transition tr2: BaseSub -> BaseEntryExitSub {
triggers {
<m1: p0>
}
- action {
- "// base"
- }
+ action '''// base'''
}
State BaseEntryExit {
- entry {
- "// base entry"
- }
- exit {
- "// base exit"
- }
+ entry '''// base entry'''
+ exit '''// base exit'''
}
State Base
State BaseSub {
@@ -81,12 +63,8 @@ RoomModel TemplateModel {
}
}
State BaseEntryExitSub {
- entry {
- "// base entry"
- }
- exit {
- "// base exit"
- }
+ entry '''// base entry'''
+ exit '''// base exit'''
subgraph {
Transition init: initial -> state0 { }
State state0
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatFSMExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatFSMExample.room
index 340c2a2fc..06733d711 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatFSMExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatFSMExample.room
@@ -28,9 +28,7 @@ RoomModel TemplateModel {
}
Transition tr2: cp cp0 -> state3
Transition tr3: cp cp0 -> state2 {
- cond {
- "true"
- }
+ cond '''true'''
}
Transition tr5: my tr4 -> state0 {
triggers {
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatInheritedFSMExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatInheritedFSMExample.room
index 81fca1eaf..a16806aa8 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatInheritedFSMExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/FlatInheritedFSMExample.room
@@ -5,9 +5,7 @@ RoomModel TemplateModel {
StateMachine {
State state3
RefinedState state1 {
- entry {
- "//refined"
- }
+ entry '''//refined'''
}
Transition tr2: state1 -> state3 {
triggers {
@@ -15,9 +13,7 @@ RoomModel TemplateModel {
}
}
RefinedTransition tr0 {
- action {
- "//refined"
- }
+ action '''//refined'''
}
State state4
State state5
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/HierInheritedFSMExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/HierInheritedFSMExample.room
index 8c4da3559..f0426d01d 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/HierInheritedFSMExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/HierInheritedFSMExample.room
@@ -98,14 +98,10 @@ RoomModel TemplateModel {
Behavior {
StateMachine {
RefinedState state0 {
- entry {
- ""
- }
+ entry ''''''
}
RefinedTransition tr3 {
- action {
- ""
- }
+ action ''''''
}
}
}
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/MultipleConnectedChoicepointExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/MultipleConnectedChoicepointExample.room
index ddaeabc48..feca3a90c 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/MultipleConnectedChoicepointExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/MultipleConnectedChoicepointExample.room
@@ -16,9 +16,7 @@ RoomModel TemplateModel {
triggers {
<m1: p0>
}
- action {
- "// left"
- }
+ action '''// left'''
}
Transition tr1: state0 -> tp0 of state1 {
triggers {
@@ -26,22 +24,14 @@ RoomModel TemplateModel {
}
}
Transition tr3: cp cp0 -> state2 {
- action {
- "// dflt branch"
- }
+ action '''// dflt branch'''
}
Transition tr4: cp cp0 -> state3 {
- cond {
- "data.x>0"
- }
- action {
- "// false branch"
- }
+ cond '''data.x>0'''
+ action '''// false branch'''
}
Transition tr2: tp1 of state1 -> cp cp0 {
- action {
- "// right"
- }
+ action '''// right'''
}
ChoicePoint cp0
State state0
@@ -57,17 +47,13 @@ RoomModel TemplateModel {
triggers {
<m1: p0>
}
- action {
- "//state1/tr2"
- }
+ action '''//state1/tr2'''
}
Transition tr3: state1 -> my tp1 {
triggers {
<m3: p0>
}
- action {
- "//state1/tr3"
- }
+ action '''//state1/tr3'''
}
EntryPoint tp0
ExitPoint tp1
@@ -84,9 +70,9 @@ RoomModel TemplateModel {
ProtocolClass PC {
incoming {
Message m0()
- Message m1(data: DC2)
- Message m2(data: DC3)
- Message m3(data: DC4)
+ Message m1(DC2)
+ Message m2(DC3)
+ Message m3(DC4)
}
outgoing {
Message m1()
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesInheritanceExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesInheritanceExample.room
index 354489aa8..755fe0c94 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesInheritanceExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesInheritanceExample.room
@@ -1,10 +1,10 @@
RoomModel states_inheritance.t {
- PrimitiveType int32: ptInteger -> int32 (Integer) default "0"
+ PrimitiveType int32: ptInteger -> "int32" (Integer) default "0"
ProtocolClass PTimer {
incoming {
- Message start (time_ms : int32)
+ Message start (int32)
Message kill ()
}
outgoing {
@@ -14,7 +14,7 @@ RoomModel states_inheritance.t {
ProtocolClass PTimeout {
incoming {
- Message start (time_ms : int32)
+ Message start (int32)
Message kill ()
}
outgoing {
@@ -36,7 +36,7 @@ RoomModel states_inheritance.t {
ProtocolClass PTest1 {
incoming {
Message a ()
- Message b (x : int32)
+ Message b (int32)
Message c ()
}
outgoing {
@@ -138,9 +138,7 @@ RoomModel states_inheritance.t {
}
Transition tr3: cp CP1 -> State1 {}
Transition tr4: cp CP1 -> State3 {
- cond {
- "data==2"
- }
+ cond '''data==2'''
}
Transition tr5: my tp0 -> tp1 of State3 {
triggers {
@@ -148,9 +146,7 @@ RoomModel states_inheritance.t {
}
}
Transition tr6: cp CP1 -> State4 {
- cond {
- "data==3"
- }
+ cond '''data==3'''
}
Transition tr7: tp3 of State3 -> State2 {}
Transition tr8: State3 -> State2 {
@@ -218,9 +214,7 @@ RoomModel states_inheritance.t {
}
}
Transition tr11: cp CP1 -> State5 {
- cond {
- "data==4"
- }
+ cond '''data==4'''
}
Transition tr12: State5 -> tp6 of State3 {
triggers {
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesTriggersExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesTriggersExample.room
index 46ee6dede..b42da6e6b 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesTriggersExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/StatesTriggersExample.room
@@ -4,7 +4,7 @@ RoomModel TemplateModel {
ProtocolClass PTimer {
incoming {
- Message start (time_ms : int32)
+ Message start (int32)
Message kill ()
}
outgoing {
@@ -14,7 +14,7 @@ RoomModel TemplateModel {
ProtocolClass PTimeout {
incoming {
- Message start (time_ms : int32)
+ Message start (int32)
Message kill ()
}
outgoing {
@@ -36,7 +36,7 @@ RoomModel TemplateModel {
ProtocolClass PTest1 {
incoming {
Message a ()
- Message b (x : int32)
+ Message b (int32)
Message c ()
}
outgoing {
@@ -129,9 +129,7 @@ RoomModel TemplateModel {
}
Transition tr3: cp CP1 -> State1 {}
Transition tr4: cp CP1 -> State3 {
- cond {
- "data==2"
- }
+ cond '''data==2'''
}
Transition tr5: my tp0 -> tp1 of State3 {
triggers {
@@ -139,9 +137,7 @@ RoomModel TemplateModel {
}
}
Transition tr6: cp CP1 -> State4 {
- cond {
- "data==3"
- }
+ cond '''data==3'''
}
Transition tr7: tp3 of State3 -> State2 {}
Transition tr8: State3 -> State2 {
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/TriggerExample.room b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/TriggerExample.room
index bd6c646b6..83cbc00ca 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/TriggerExample.room
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/models/TriggerExample.room
@@ -38,9 +38,7 @@ RoomModel TemplateModel {
}
Transition in1wGuard: state1_1 -> state1_0 {
triggers {
- <in1: p0 guard {
- "condA"
- }>
+ <in1: p0 guard '''condA'''>
}
}
}
@@ -55,9 +53,7 @@ RoomModel TemplateModel {
}
Transition in1withGuard: state1 -> state2 {
triggers {
- <in1: p0 guard {
- "condA"
- }>
+ <in1: p0 guard '''condA'''>
}
}
Transition in2: my tr2 -> my tr2 {
diff --git a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/TestMultipleConnectedChoicepoint.xtend b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/TestMultipleConnectedChoicepoint.xtend
index 613854ace..ed0bf18b5 100644
--- a/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/TestMultipleConnectedChoicepoint.xtend
+++ b/tests/org.eclipse.etrice.core.genmodel.fsm.tests/src/org/eclipse/etrice/core/genmodel/fsm/tests/TestMultipleConnectedChoicepoint.xtend
@@ -30,6 +30,7 @@ import static org.junit.Assert.assertNotNull
import static org.junit.Assert.assertTrue
import static extension org.eclipse.etrice.core.genmodel.fsm.FsmGenExtensions.*
+import org.eclipse.etrice.core.room.MessageData
class TestMultipleConnectedChoicepoint extends FsmGenTestBase {
@@ -73,7 +74,7 @@ class TestMultipleConnectedChoicepoint extends FsmGenTestBase {
var tr = gc.graph.links.filter[(transition as Transition).name.equals("tr0")].head
assertNotNull("transition found", tr)
assertTrue("transition is TriggeredTransition", tr.transition instanceof TriggeredTransition)
- var data = tr.commonData as VarDecl
+ var data = tr.commonData as MessageData
assertTrue("data is DataClass", data.refType.type instanceof DataClass)
assertEquals("data is of type", "DC2", data.refType.type.name)
@@ -82,34 +83,34 @@ class TestMultipleConnectedChoicepoint extends FsmGenTestBase {
tr = s.subgraph.links.filter[(transition as Transition).name.equals("tr2")].head
assertTrue("transition is TriggeredTransition", tr.transition instanceof TriggeredTransition)
- data = tr.commonData as VarDecl
+ data = tr.commonData as MessageData
assertTrue("data is DataClass", data.refType.type instanceof DataClass)
assertEquals("data is of type", "DC2", data.refType.type.name)
tr = s.subgraph.links.filter[(transition as Transition).name.equals("tr3")].head
assertTrue("transition is TriggeredTransition", tr.transition instanceof TriggeredTransition)
- data = tr.commonData as VarDecl
+ data = tr.commonData as MessageData
assertTrue("data is DataClass", data.refType.type instanceof DataClass)
assertEquals("data is of type", "DC4", data.refType.type.name)
tr = gc.graph.links.filter[(transition as Transition).name.equals("tr1")].head
assertNotNull("transition found", tr)
assertTrue("transition is TriggeredTransition", tr.transition instanceof TriggeredTransition)
- data = tr.commonData as VarDecl
+ data = tr.commonData as MessageData
assertTrue("data is DataClass", data.refType.type instanceof DataClass)
assertEquals("data is of type", "DC3", data.refType.type.name)
tr = gc.graph.links.filter[(transition as Transition).name.equals("tr3")].head
assertNotNull("transition found", tr)
assertTrue("transition is ContinuationTransition", tr.transition instanceof ContinuationTransition)
- data = tr.commonData as VarDecl
+ data = tr.commonData as MessageData
assertTrue("data is DataClass", data.refType.type instanceof DataClass)
assertEquals("data is of type", "DC", data.refType.type.name)
tr = gc.graph.links.filter[(transition as Transition).name.equals("tr4")].head
assertNotNull("transition found", tr)
assertTrue("transition is CPBranchTransition", tr.transition instanceof CPBranchTransition)
- data = tr.commonData as VarDecl
+ data = tr.commonData as MessageData
assertTrue("data is DataClass", data.refType.type instanceof DataClass)
assertEquals("data is of type", "DC", data.refType.type.name)
}
diff --git a/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java b/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java
index b01d2f89d..ccfc8fa17 100644
--- a/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java
+++ b/tests/org.eclipse.etrice.generator.tests/src/org/eclipse/etrice/generator/base/TestDetailCodeTranslator.java
@@ -37,6 +37,7 @@ import org.eclipse.etrice.core.room.EnumerationType;
import org.eclipse.etrice.core.room.ExternalType;
import org.eclipse.etrice.core.room.InterfaceItem;
import org.eclipse.etrice.core.room.Message;
+import org.eclipse.etrice.core.room.MessageData;
import org.eclipse.etrice.core.room.Operation;
import org.eclipse.etrice.core.room.Port;
import org.eclipse.etrice.core.room.PortOperation;
@@ -168,8 +169,8 @@ public class TestDetailCodeTranslator {
out1.setName("out1");
Message out2 = RoomFactory.eINSTANCE.createMessage();
out2.setName("out2");
- VarDecl typedID = RoomFactory.eINSTANCE.createVarDecl();
- typedID.setName("param");
+ MessageData typedID = RoomFactory.eINSTANCE.createMessageData();
+ typedID.setDeprecatedName("param");
PrimitiveType type = RoomFactory.eINSTANCE.createPrimitiveType();
type.setName("int32");
type.setCastName("Integer");

Back to the top