Browse Source

added missing (derived) files

terfloth@itemis.de 12 years ago
parent
commit
ed5c13cf13
17 changed files with 411 additions and 192 deletions
  1. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/.settings/org.eclipse.xtend.core.Xtend.prefs
  2. 48 48
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpression/AssignmentAsExpression.cc
  3. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpression/AssignmentAsExpression.sgen
  4. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StextKeywords/STextKeywordsInStatesAndRegions.sgen
  5. 25 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StextKeywords/StextKeywords.cc
  6. 2 1
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AllTests.java
  7. 39 39
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AssignmentAsExpression.java
  8. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/StextKeywords.java
  9. 8 0
      test-plugins/org.yakindu.sct.generator.java.test/.settings/org.eclipse.xtend.core.Xtend.prefs
  10. 9 5
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/choice/ChoiceStatemachine.java
  11. 32 16
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/performancetest/PerformanceTestStatemachine.java
  12. 1 1
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java
  13. 48 0
      test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StextKeywordsTest.java
  14. 74 74
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/AssignmentAsExpressionTest.java
  15. 53 0
      test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/STextKeywordsInStatesAndRegionsTest.java
  16. 8 0
      test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.xtend.core.Xtend.prefs
  17. 1 0
      test-plugins/org.yakindu.sct.test.models/tests/StextKeywordsInStatesAndRegions.sctunit

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/.settings/org.eclipse.xtend.core.Xtend.prefs

@@ -0,0 +1,8 @@
+autobuilding=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.cleanDirectory=false
+outlet.DEFAULT_OUTPUT.cleanupDerived=true
+outlet.DEFAULT_OUTPUT.createDirectory=true
+outlet.DEFAULT_OUTPUT.derived=false
+outlet.DEFAULT_OUTPUT.override=true

+ 48 - 48
test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpression/AssignmentAsExpression.cc

@@ -1,48 +1,48 @@
-/**
-* Copyright (c) 2012 committers of YAKINDU and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*     committers of YAKINDU - initial API and implementation
-*/
-#include <string>
-#include "gtest/gtest.h"
-#include "AssignmentAsExpression.h"
-
-TEST(StatemachineTest, simpleAssignment) {
-	AssignmentAsExpression handle;
-	assignmentAsExpression_init(&handle);
-	assignmentAsExpression_enter(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Add));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_b(&handle)== 5);
-	EXPECT_TRUE(assignmentAsExpressionIface_get_a(&handle)== 9);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Subtract));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_d(&handle)== 6);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Multiply));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_e(&handle)== 15);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Divide));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_g(&handle)== 1);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Modulo));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_i(&handle)== 1);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Shift));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_j(&handle)== 16);
-	EXPECT_TRUE(assignmentAsExpressionIface_get_k(&handle)== 4);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_And));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_l(&handle)== 1);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_Or));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_p(&handle)== 15);
-	assignmentAsExpression_runCycle(&handle);
-	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_Xor));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_u(&handle)== 12);
-	assignmentAsExpression_exit(&handle);
-}
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "AssignmentAsExpression.h"
+
+TEST(StatemachineTest, simpleAssignment) {
+	AssignmentAsExpression handle;
+	assignmentAsExpression_init(&handle);
+	assignmentAsExpression_enter(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Add));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_b(&handle)== 5);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_a(&handle)== 9);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Subtract));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_d(&handle)== 6);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Multiply));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_e(&handle)== 15);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Divide));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_g(&handle)== 1);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Modulo));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_i(&handle)== 1);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Shift));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_j(&handle)== 16);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_k(&handle)== 4);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_And));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_l(&handle)== 1);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_Or));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_p(&handle)== 15);
+	assignmentAsExpression_runCycle(&handle);
+	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_Xor));
+	EXPECT_TRUE(assignmentAsExpressionIface_get_u(&handle)== 12);
+	assignmentAsExpression_exit(&handle);
+}

+ 8 - 8
test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpression/AssignmentAsExpression.sgen

@@ -1,8 +1,8 @@
-GeneratorModel for yakindu::c {
-	statechart AssignmentAsExpression {
-		feature Outlet {
-			targetProject = "gtests"
-			targetFolder = "AssignmentAsExpression"
-		}
-	}
-}
+GeneratorModel for yakindu::c {
+	statechart AssignmentAsExpression {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "AssignmentAsExpression"
+		}
+	}
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/StextKeywords/STextKeywordsInStatesAndRegions.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::c {
+	statechart STextKeywordsInStatesAndRegions {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "StextKeywords"
+		}
+	}
+}

+ 25 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/StextKeywords/StextKeywords.cc

@@ -0,0 +1,25 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "STextKeywordsInStatesAndRegions.h"
+
+TEST(StatemachineTest, activeCheckWithSTextNamedStates) {
+	STextKeywordsInStatesAndRegions handle;
+	sTextKeywordsInStatesAndRegions_init(&handle);
+	sTextKeywordsInStatesAndRegions_enter(&handle);
+	EXPECT_TRUE(sTextKeywordsInStatesAndRegions_isActive(&handle, STextKeywordsInStatesAndRegions_default_var));
+	EXPECT_TRUE(sTextKeywordsInStatesAndRegions_isActive(&handle, STextKeywordsInStatesAndRegions_operation_interface));
+	sTextKeywordsInStatesAndRegions_runCycle(&handle);
+	EXPECT_TRUE(sTextKeywordsInStatesAndRegions_isActive(&handle, STextKeywordsInStatesAndRegions_default_var));
+	EXPECT_TRUE(sTextKeywordsInStatesAndRegions_isActive(&handle, STextKeywordsInStatesAndRegions_operation_active));
+	sTextKeywordsInStatesAndRegions_runCycle(&handle);
+}

+ 2 - 1
test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AllTests.java

@@ -25,6 +25,7 @@ import org.junit.runners.Suite.SuiteClasses;
 		SameNameDifferentRegion.class, ShallowHistory.class,
 		SimpleHietachy.class, StateIsActive.class,
 		StatechartLocalReactions.class, StringExpressions.class,
-		SyncFork.class, SyncJoin.class, ValuedEvent.class, SimpleEvent.class})
+		SyncFork.class, SyncJoin.class, ValuedEvent.class, SimpleEvent.class,
+		StextKeywords.class})
 public class AllTests {
 }

+ 39 - 39
test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AssignmentAsExpression.java

@@ -1,39 +1,39 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     committers of YAKINDU - initial API and implementation
- */
-package org.yakindu.sct.generator.c.test;
-
-import java.util.Collection;
-
-import org.junit.Before;
-import org.junit.runner.RunWith;
-import org.yakindu.sct.generator.c.gtest.GTest;
-import org.yakindu.sct.generator.c.gtest.GTestRunner;
-import org.yakindu.sct.generator.c.gtest.GTestHelper;
-
-@GTest(sourceFile = "gtests/AssignmentAsExpression/AssignmentAsExpression.cc", program = "gtests/AssignmentAsExpression/AssignmentAsExpression", model = "testmodels/AssignmentAsExpression.sct")
-@RunWith(GTestRunner.class)
-public class AssignmentAsExpression {
-
-	protected final GTestHelper helper = new GTestHelper(this) {
-
-		@Override
-		protected void getSourceFiles(Collection<String> files) {
-			super.getSourceFiles(files);
-			files.add(getFileName(getTestProgram()) + ".c");
-		}
-	};
-
-	@Before
-	public void setUp() {
-		helper.generate();
-		helper.compile();
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.c.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/AssignmentAsExpression/AssignmentAsExpression.cc", program = "gtests/AssignmentAsExpression/AssignmentAsExpression", model = "testmodels/AssignmentAsExpression.sct")
+@RunWith(GTestRunner.class)
+public class AssignmentAsExpression {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".c");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/StextKeywords.java

@@ -0,0 +1,39 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.c.test;
+
+import java.util.Collection;
+
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.generator.c.gtest.GTest;
+import org.yakindu.sct.generator.c.gtest.GTestRunner;
+import org.yakindu.sct.generator.c.gtest.GTestHelper;
+
+@GTest(sourceFile = "gtests/StextKeywords/StextKeywords.cc", program = "gtests/StextKeywords/STextKeywordsInStatesAndRegions", model = "testmodels/STextKeywordsInStatesAndRegions.sct")
+@RunWith(GTestRunner.class)
+public class StextKeywords {
+
+	protected final GTestHelper helper = new GTestHelper(this) {
+
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+			files.add(getFileName(getTestProgram()) + ".c");
+		}
+	};
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.java.test/.settings/org.eclipse.xtend.core.Xtend.prefs

@@ -0,0 +1,8 @@
+autobuilding=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.cleanDirectory=false
+outlet.DEFAULT_OUTPUT.cleanupDerived=true
+outlet.DEFAULT_OUTPUT.createDirectory=true
+outlet.DEFAULT_OUTPUT.derived=false
+outlet.DEFAULT_OUTPUT.override=true

+ 9 - 5
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/choice/ChoiceStatemachine.java

@@ -141,10 +141,12 @@ public class ChoiceStatemachine implements IChoiceStatemachine {
 				nextStateIndex = 0;
 				stateVector[0] = State.main_region_B;
 			} else {
-				sCIDefault.value -= 1;
+				if (true) {
+					sCIDefault.value -= 1;
 
-				nextStateIndex = 0;
-				stateVector[0] = State.main_region_C;
+					nextStateIndex = 0;
+					stateVector[0] = State.main_region_C;
+				}
 			}
 		}
 	}
@@ -172,8 +174,10 @@ public class ChoiceStatemachine implements IChoiceStatemachine {
 				nextStateIndex = 0;
 				stateVector[0] = State.main_region_B;
 			} else {
-				nextStateIndex = 0;
-				stateVector[0] = State.main_region_A;
+				if (true) {
+					nextStateIndex = 0;
+					stateVector[0] = State.main_region_A;
+				}
 			}
 		}
 	}

+ 32 - 16
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/scr/performancetest/PerformanceTestStatemachine.java

@@ -500,8 +500,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}
@@ -562,8 +564,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}
@@ -624,8 +628,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}
@@ -686,8 +692,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}
@@ -748,8 +756,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}
@@ -810,8 +820,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}
@@ -955,8 +967,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}
@@ -1017,8 +1031,10 @@ public class PerformanceTestStatemachine
 											nextStateIndex = 0;
 											stateVector[0] = State.mr_B_r1_T;
 										} else {
-											nextStateIndex = 0;
-											stateVector[0] = State.mr_B_r1_S;
+											if (true) {
+												nextStateIndex = 0;
+												stateVector[0] = State.mr_B_r1_S;
+											}
 										}
 									}
 								}

+ 1 - 1
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/AllTestsTest.java

@@ -27,6 +27,6 @@ import org.junit.runners.Suite.SuiteClasses;
 		SimpleHietachyTest.class, StateIsActiveTest.class,
 		StatechartLocalReactionsTest.class, StringExpressionsTest.class,
 		SyncForkTest.class, SyncJoinTest.class, ValuedEventTest.class,
-		SimpleEventTest.class})
+		SimpleEventTest.class, StextKeywordsTest.class})
 public class AllTestsTest {
 }

+ 48 - 0
test-plugins/org.yakindu.sct.generator.java.test/src-gen/org/yakindu/sct/generator/java/test/StextKeywordsTest.java

@@ -0,0 +1,48 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.java.test;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import static org.junit.Assert.*;
+import org.yakindu.scr.stextkeywordsinstatesandregions.STextKeywordsInStatesAndRegionsStatemachine;
+import org.yakindu.scr.stextkeywordsinstatesandregions.STextKeywordsInStatesAndRegionsStatemachine.State;
+/**
+ *  Unit TestCase for STextKeywordsInStatesAndRegions
+ */
+@SuppressWarnings("all")
+public class StextKeywordsTest {
+
+	private STextKeywordsInStatesAndRegionsStatemachine statemachine;
+
+	@Before
+	public void setUp() {
+		statemachine = new STextKeywordsInStatesAndRegionsStatemachine();
+		statemachine.init();
+	}
+
+	@After
+	public void tearDown() {
+		statemachine = null;
+	}
+
+	@Test
+	public void testactiveCheckWithSTextNamedStates() {
+		statemachine.enter();
+		assertTrue(statemachine.isStateActive(State.default_var));
+		assertTrue(statemachine.isStateActive(State.operation_interface));
+		statemachine.runCycle();
+		assertTrue(statemachine.isStateActive(State.default_var));
+		assertTrue(statemachine.isStateActive(State.operation_active));
+		statemachine.runCycle();
+	}
+}

+ 74 - 74
test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/AssignmentAsExpressionTest.java

@@ -1,74 +1,74 @@
-/**
- * Copyright (c) 2012 committers of YAKINDU and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- *     committers of YAKINDU - initial API and implementation
- */
-package org.yakindu.sct.model.sexec.interpreter.test;
-import org.eclipse.xtext.junit4.InjectWith;
-import org.eclipse.xtext.junit4.XtextRunner;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
-import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
-import com.google.inject.Inject;
-import org.junit.Before;
-import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
-import org.yakindu.sct.model.sexec.ExecutionFlow;
-import util.TestModels;
-import static junit.framework.Assert.*;
-/**
- *  Unit TestCase for AssignmentAsExpression
- */
-@SuppressWarnings("all")
-@RunWith(XtextRunner.class)
-@InjectWith(SExecInjectionProvider.class)
-public class AssignmentAsExpressionTest extends AbstractExecutionFlowTest {
-
-	@Inject
-	private TestModels models;
-
-	@Before
-	public void setup() throws Exception {
-		ExecutionFlow flow = models
-				.loadExecutionFlowFromResource("AssignmentAsExpression.sct");
-		initInterpreter(flow);
-	}
-	@Test
-	public void simpleAssignment() throws Exception {
-		interpreter.enter();
-		assertTrue(isActive("Add"));
-		assertTrue(getInteger("b") == 5);
-		assertTrue(getInteger("a") == 9);
-		interpreter.runCycle();
-		assertTrue(isActive("Subtract"));
-		assertTrue(getInteger("d") == 6);
-		interpreter.runCycle();
-		assertTrue(isActive("Multiply"));
-		assertTrue(getInteger("e") == 15);
-		interpreter.runCycle();
-		assertTrue(isActive("Divide"));
-		assertTrue(getInteger("g") == 1);
-		interpreter.runCycle();
-		assertTrue(isActive("Modulo"));
-		assertTrue(getInteger("i") == 1);
-		interpreter.runCycle();
-		assertTrue(isActive("Shift"));
-		assertTrue(getInteger("j") == 16);
-		assertTrue(getInteger("k") == 4);
-		interpreter.runCycle();
-		assertTrue(isActive("boolean And"));
-		assertTrue(getInteger("l") == 1);
-		interpreter.runCycle();
-		assertTrue(isActive("boolean Or"));
-		assertTrue(getInteger("p") == 15);
-		interpreter.runCycle();
-		assertTrue(isActive("boolean Xor"));
-		assertTrue(getInteger("u") == 12);
-		interpreter.exit();
-	}
-}
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.model.sexec.interpreter.test;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
+import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
+import com.google.inject.Inject;
+import org.junit.Before;
+import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
+import org.yakindu.sct.model.sexec.ExecutionFlow;
+import util.TestModels;
+import static junit.framework.Assert.*;
+/**
+ *  Unit TestCase for AssignmentAsExpression
+ */
+@SuppressWarnings("all")
+@RunWith(XtextRunner.class)
+@InjectWith(SExecInjectionProvider.class)
+public class AssignmentAsExpressionTest extends AbstractExecutionFlowTest {
+
+	@Inject
+	private TestModels models;
+
+	@Before
+	public void setup() throws Exception {
+		ExecutionFlow flow = models
+				.loadExecutionFlowFromResource("AssignmentAsExpression.sct");
+		initInterpreter(flow);
+	}
+	@Test
+	public void simpleAssignment() throws Exception {
+		interpreter.enter();
+		assertTrue(isActive("Add"));
+		assertTrue(getInteger("b") == 5);
+		assertTrue(getInteger("a") == 9);
+		interpreter.runCycle();
+		assertTrue(isActive("Subtract"));
+		assertTrue(getInteger("d") == 6);
+		interpreter.runCycle();
+		assertTrue(isActive("Multiply"));
+		assertTrue(getInteger("e") == 15);
+		interpreter.runCycle();
+		assertTrue(isActive("Divide"));
+		assertTrue(getInteger("g") == 1);
+		interpreter.runCycle();
+		assertTrue(isActive("Modulo"));
+		assertTrue(getInteger("i") == 1);
+		interpreter.runCycle();
+		assertTrue(isActive("Shift"));
+		assertTrue(getInteger("j") == 16);
+		assertTrue(getInteger("k") == 4);
+		interpreter.runCycle();
+		assertTrue(isActive("boolean And"));
+		assertTrue(getInteger("l") == 1);
+		interpreter.runCycle();
+		assertTrue(isActive("boolean Or"));
+		assertTrue(getInteger("p") == 15);
+		interpreter.runCycle();
+		assertTrue(isActive("boolean Xor"));
+		assertTrue(getInteger("u") == 12);
+		interpreter.exit();
+	}
+}

+ 53 - 0
test-plugins/org.yakindu.sct.model.sexec.interpreter.test/src-gen/org/yakindu/sct/model/sexec/interpreter/test/STextKeywordsInStatesAndRegionsTest.java

@@ -0,0 +1,53 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.model.sexec.interpreter.test;
+import org.eclipse.xtext.junit4.InjectWith;
+import org.eclipse.xtext.junit4.XtextRunner;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.yakindu.sct.model.sexec.interpreter.test.util.AbstractExecutionFlowTest;
+import org.yakindu.sct.model.sexec.interpreter.test.util.SExecInjectionProvider;
+import com.google.inject.Inject;
+import org.junit.Before;
+import org.yakindu.sct.model.sexec.interpreter.IExecutionFlowInterpreter;
+import org.yakindu.sct.model.sexec.ExecutionFlow;
+import util.TestModels;
+import static junit.framework.Assert.*;
+/**
+ *  Unit TestCase for STextKeywordsInStatesAndRegions
+ */
+@SuppressWarnings("all")
+@RunWith(XtextRunner.class)
+@InjectWith(SExecInjectionProvider.class)
+public class STextKeywordsInStatesAndRegionsTest
+		extends
+			AbstractExecutionFlowTest {
+
+	@Inject
+	private TestModels models;
+
+	@Before
+	public void setup() throws Exception {
+		ExecutionFlow flow = models
+				.loadExecutionFlowFromResource("STextKeywordsInStatesAndRegions.sct");
+		initInterpreter(flow);
+	}
+	@Test
+	public void activeCheckWithSTextNamedStates() throws Exception {
+		interpreter.enter();
+		assertTrue(isActive("var"));
+		assertTrue(isActive("interface"));
+		interpreter.runCycle();
+		assertTrue(isActive("var"));
+		assertTrue(isActive("active"));
+		interpreter.runCycle();
+	}
+}

+ 8 - 0
test-plugins/org.yakindu.sct.test.models/.settings/org.eclipse.xtend.core.Xtend.prefs

@@ -0,0 +1,8 @@
+autobuilding=true
+eclipse.preferences.version=1
+is_project_specific=true
+outlet.DEFAULT_OUTPUT.cleanDirectory=false
+outlet.DEFAULT_OUTPUT.cleanupDerived=true
+outlet.DEFAULT_OUTPUT.createDirectory=true
+outlet.DEFAULT_OUTPUT.derived=false
+outlet.DEFAULT_OUTPUT.override=true

+ 1 - 0
test-plugins/org.yakindu.sct.test.models/tests/StextKeywordsInStatesAndRegions.sctunit

@@ -10,6 +10,7 @@ testgroup StextKeywords for statechart STextKeywordsInStatesAndRegions{
 		assert active(STextKeywordsInStatesAndRegions.default.var)
 		assert active(STextKeywordsInStatesAndRegions.operation.active)		
 		 
+		cycle
 	} 
 }