Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Haug2013-11-19 15:55:55 +0000
committerHenrik Rentz-Reichert2013-11-25 11:40:18 +0000
commitd9871bb6cfbd3b146f6c0da07136192291bedd24 (patch)
tree81122d4facdf5cfc027ef4d35e44f2a01c1f4196 /tests/org.eclipse.etrice.generator.common.tests
parent475da5253481df1a63b0ebf52071729c2bd86881 (diff)
downloadorg.eclipse.etrice-d9871bb6cfbd3b146f6c0da07136192291bedd24.tar.gz
org.eclipse.etrice-d9871bb6cfbd3b146f6c0da07136192291bedd24.tar.xz
org.eclipse.etrice-d9871bb6cfbd3b146f6c0da07136192291bedd24.zip
[core,gen] added enum room init + enum config support for java,c
Diffstat (limited to 'tests/org.eclipse.etrice.generator.common.tests')
-rw-r--r--tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room b/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room
index bf5124892..0021a6913 100644
--- a/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room
+++ b/tests/org.eclipse.etrice.generator.common.tests/models/EnumTest.room
@@ -23,10 +23,15 @@ RoomModel EnumTest {
Attribute caseId: int32
Attribute first: FirstEnum
- Attribute second: SecondEnum = "SecondEnum.one"
+ Attribute second: SecondEnum = "SecondEnum.two"
Attribute third: ThirdEnum
Attribute fourth: FourthEnum
Attribute fifth: FifthEnum
+
+ Attribute arrayFirst[1] : FirstEnum
+ Attribute arrayFourth[65] : FourthEnum = "FourthEnum.sixtyfive"
+ Attribute arrayFifth[2] : FifthEnum = "{ FifthEnum.f1, FifthEnum.f2}"
+
}
Behavior {
Operation EnumUser() {
@@ -39,7 +44,13 @@ RoomModel EnumTest {
Transition init: initial -> state0 { }
State state0 {
entry {
- "EXPECT_EQUAL_INT32(caseId, \"second: initialized value\", 1, second);"
+ "EXPECT_EQUAL_INT32(caseId, \"first: initialized value\", 0, first);"
+ "EXPECT_EQUAL_INT32(caseId, \"second: initialized value\", 2, second);"
+ ""
+ "EXPECT_EQUAL_INT32(caseId, \"arrayFirst: initialized set value\", 0, arrayFirst[0]);"
+ "EXPECT_EQUAL_INT32(caseId, \"arrayFouth: initialized set value\", 0x41, arrayFourth[20]);"
+ "EXPECT_EQUAL_INT16(caseId, \"arrayFifth: initialized set value\", (short)0x01, arrayFifth[0]);"
+ "EXPECT_EQUAL_INT16(caseId, \"arrayFifth: initialized set value\", (short)0x02, arrayFifth[1]);"
""
"first = FirstEnum.zero;"
"second = SecondEnum.three;"

Back to the top