Browse Source

Share project "org.yakindu.sct.generator.cpp.test" into "https://svn.codespot.com/a/eclipselabs.org/yakindu"

Andreas Mülder 12 years ago
parent
commit
9ae6d59d8d
100 changed files with 3268 additions and 0 deletions
  1. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/.classpath
  2. 34 0
      test-plugins/org.yakindu.sct.generator.cpp.test/.project
  3. 7 0
      test-plugins/org.yakindu.sct.generator.cpp.test/.settings/org.eclipse.jdt.core.prefs
  4. 10 0
      test-plugins/org.yakindu.sct.generator.cpp.test/META-INF/MANIFEST.MF
  5. 5 0
      test-plugins/org.yakindu.sct.generator.cpp.test/build.properties
  6. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AlwaysOncycleTest/AlwaysOncycle.sgen
  7. 33 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AlwaysOncycleTest/AlwaysOncycleTest.cc
  8. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.sgen
  9. 49 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpressionTest.cc
  10. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BitExpressionsTest/BitExpressions.sgen
  11. 32 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BitExpressionsTest/BitExpressionsTest.cc
  12. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BooleanExpressionsTest/BooleanExpressions.sgen
  13. 31 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BooleanExpressionsTest/BooleanExpressionsTest.cc
  14. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/CKeywordsTest/CKeywords.sgen
  15. 26 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/CKeywordsTest/CKeywordsTest.cc
  16. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ChoiceTest/Choice.sgen
  17. 91 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ChoiceTest/ChoiceTest.cc
  18. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeclarationsTest/Declarations.sgen
  19. 20 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeclarationsTest/DeclarationsTest.cc
  20. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeepHistoryTest/DeepHistory.sgen
  21. 38 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeepHistoryTest/DeepHistoryTest.cc
  22. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EnterStateTest/EnterState.sgen
  23. 44 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EnterStateTest/EnterStateTest.cc
  24. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.sgen
  25. 31 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransitionTest.cc
  26. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitStateTest/ExitState.sgen
  27. 53 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitStateTest/ExitStateTest.cc
  28. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/FeatureCallsTest/FeatureCalls.sgen
  29. 23 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/FeatureCallsTest/FeatureCallsTest.cc
  30. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardTest/Guard.sgen
  31. 36 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardTest/GuardTest.cc
  32. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedEntryTest/GuardedEntry.sgen
  33. 64 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedEntryTest/GuardedEntryTest.cc
  34. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedExitTest/GuardedExit.sgen
  35. 38 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedExitTest/GuardedExitTest.cc
  36. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStep.sgen
  37. 61 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStepTest.cc
  38. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InEventLifeCycleTest/InEventLifeCycle.sgen
  39. 24 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InEventLifeCycleTest/InEventLifeCycleTest.cc
  40. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/IntegerExpressionsTest/IntegerExpressions.sgen
  41. 42 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/IntegerExpressionsTest/IntegerExpressionsTest.cc
  42. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycle.sgen
  43. 36 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycleTest.cc
  44. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NamedInterfaceAccessTest/NamedInterfaceAccess.sgen
  45. 28 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NamedInterfaceAccessTest/NamedInterfaceAccessTest.cc
  46. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OutEventLifeCycleTest/OutEventLifeCycle.sgen
  47. 52 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OutEventLifeCycleTest/OutEventLifeCycleTest.cc
  48. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ParenthesisTest/Parenthesis.sgen
  49. 22 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ParenthesisTest/ParenthesisTest.cc
  50. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PerformanceTestsTest/PerformanceTest.sgen
  51. 83 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PerformanceTestsTest/PerformanceTestsTest.cc
  52. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PriorityValuesTest/PriorityValues.sgen
  53. 35 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PriorityValuesTest/PriorityValuesTest.cc
  54. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/RaiseEventTest/RaiseEvent.sgen
  55. 27 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/RaiseEventTest/RaiseEventTest.cc
  56. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/STextKeywordsInStatesAndRegionsTest/STextKeywordsInStatesAndRegions.sgen
  57. 480 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/STextKeywordsInStatesAndRegionsTest/STextKeywordsInStatesAndRegionsTest.cc
  58. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SameNameDifferentRegionTest/SameNameDifferentRegion.sgen
  59. 29 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SameNameDifferentRegionTest/SameNameDifferentRegionTest.cc
  60. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ShallowHistoryTest/ShallowHistory.sgen
  61. 50 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ShallowHistoryTest/ShallowHistoryTest.cc
  62. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleEventTest/SimpleEvent.sgen
  63. 25 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleEventTest/SimpleEventTest.cc
  64. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleHierachyTest/SimpleHierachy.sgen
  65. 27 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleHierachyTest/SimpleHierachyTest.cc
  66. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateIsActiveTest/StateIsActive.sgen
  67. 27 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateIsActiveTest/StateIsActiveTest.cc
  68. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateWithEmptyRegionTest/StateWithEmptyRegion.sgen
  69. 23 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateWithEmptyRegionTest/StateWithEmptyRegionTest.cc
  70. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatechartLocalReactionsTest/StatechartLocalReactions.sgen
  71. 32 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatechartLocalReactionsTest/StatechartLocalReactionsTest.cc
  72. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StringExpressionsTest/StringExpressions.sgen
  73. 31 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StringExpressionsTest/StringExpressionsTest.cc
  74. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncForkTest/SyncFork.sgen
  75. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncForkTest/SyncForkTest.cc
  76. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncJoinTest/SyncJoin.sgen
  77. 100 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncJoinTest/SyncJoinTest.cc
  78. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TransitionWithoutConditionTest/TransitionWithoutCondition.sgen
  79. 23 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TransitionWithoutConditionTest/TransitionWithoutConditionTest.cc
  80. 8 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ValuedEventsTest/ValuedEvents.sgen
  81. 24 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ValuedEventsTest/ValuedEventsTest.cc
  82. 309 0
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen
  83. 38 0
      test-plugins/org.yakindu.sct.generator.cpp.test/pom.xml
  84. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AlwaysOncycleTest.java
  85. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AssignmentAsExpressionTest.java
  86. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/BitExpressionsTest.java
  87. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/BooleanExpressionsTest.java
  88. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/CKeywordsTest.java
  89. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/ChoiceTest.java
  90. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/DeclarationsTest.java
  91. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/DeepHistoryTest.java
  92. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/EnterStateTest.java
  93. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/ExitOnSelfTransitionTest.java
  94. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/ExitStateTest.java
  95. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/FeatureCallsTest.java
  96. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/GuardTest.java
  97. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/GuardedEntryTest.java
  98. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/GuardedExitTest.java
  99. 39 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/HistoryWithoutInitialStepTest.java
  100. 0 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/InEventLifeCycleTest.java

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/.classpath

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="test-gen"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

+ 34 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/.project

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.yakindu.sct.generator.cpp.test</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
+	</natures>
+</projectDescription>

+ 7 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6

+ 10 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/META-INF/MANIFEST.MF

@@ -0,0 +1,10 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: Cpp Generator Test Plugin
+Bundle-SymbolicName: org.yakindu.sct.generator.cpp.test
+Bundle-Version: 2.1.1.qualifier
+Bundle-Vendor: YAKINDU
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Require-Bundle: org.yakindu.sct.test.models;bundle-version="2.1.1",
+ org.yakindu.sct.generator.c.test;bundle-version="2.1.1",
+ org.junit;bundle-version="4.11.0"

+ 5 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/build.properties

@@ -0,0 +1,5 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               gtests/

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AlwaysOncycleTest/AlwaysOncycle.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart AlwaysOncycle {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "AlwaysOncycleTest"
+		}
+	}
+}

+ 33 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AlwaysOncycleTest/AlwaysOncycleTest.cc

@@ -0,0 +1,33 @@
+/**
+* Copyright (c) 2013 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 "AlwaysOncycle.hpp"
+
+TEST(StatemachineTest, alwaysOncycleTest) {
+	AlwaysOncycle* statechart = new AlwaysOncycle();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(AlwaysOncycle_main_region_StateA));
+	while (statechart->getSCInterface().get_value()< 5) {
+		statechart->runCycle();
+		EXPECT_TRUE(statechart->isActive(AlwaysOncycle_main_region_StateA));
+	}
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AlwaysOncycle_main_region_StateB));
+	while (statechart->getSCInterface().get_value()< 5) {
+		statechart->runCycle();
+		EXPECT_TRUE(statechart->isActive(AlwaysOncycle_main_region_StateB));
+	}
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AlwaysOncycle_main_region_StateA));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpression.sgen

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

+ 49 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpressionTest.cc

@@ -0,0 +1,49 @@
+/**
+* Copyright (c) 2013 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.hpp"
+
+TEST(StatemachineTest, simpleAssignment) {
+	AssignmentAsExpression* statechart = new AssignmentAsExpression();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_Add));
+	EXPECT_TRUE(statechart->getSCInterface().get_b()== 5);
+	EXPECT_TRUE(statechart->getSCInterface().get_a()== 9);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_Subtract));
+	EXPECT_TRUE(statechart->getSCInterface().get_d()== 6);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_Multiply));
+	EXPECT_TRUE(statechart->getSCInterface().get_e()== 15);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_Divide));
+	EXPECT_TRUE(statechart->getSCInterface().get_g()== 1);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_Modulo));
+	EXPECT_TRUE(statechart->getSCInterface().get_i()== 1);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_Shift));
+	EXPECT_TRUE(statechart->getSCInterface().get_j()== 16);
+	EXPECT_TRUE(statechart->getSCInterface().get_k()== 4);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_boolean_And));
+	EXPECT_TRUE(statechart->getSCInterface().get_l()== 1);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_boolean_Or));
+	EXPECT_TRUE(statechart->getSCInterface().get_p()== 15);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(AssignmentAsExpression_main_region_boolean_Xor));
+	EXPECT_TRUE(statechart->getSCInterface().get_u()== 12);
+	statechart->exit();
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BitExpressionsTest/BitExpressions.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart BitExpressions {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "BitExpressionsTest"
+		}
+	}
+}

+ 32 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BitExpressionsTest/BitExpressionsTest.cc

@@ -0,0 +1,32 @@
+/**
+* Copyright (c) 2013 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 "BitExpressions.hpp"
+
+TEST(StatemachineTest, BitExpressions) {
+	BitExpressions* statechart = new BitExpressions();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(BitExpressions_main_region_StateA));
+	EXPECT_TRUE(statechart->getSCInterface().get_myBit1()== 5);
+	EXPECT_TRUE(statechart->getSCInterface().get_myBit2()== 7);
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(BitExpressions_main_region_StateB));
+	EXPECT_TRUE(statechart->getSCInterface().get_leftBitshift()== 10);
+	EXPECT_TRUE(statechart->getSCInterface().get_rightBitshift()== 2);
+	EXPECT_TRUE(statechart->getSCInterface().get_complementBitshift()== - 6 );
+	EXPECT_TRUE(statechart->getSCInterface().get_bitwiseAnd()== 5);
+	EXPECT_TRUE(statechart->getSCInterface().get_bitwiseOr()== 7);
+	EXPECT_TRUE(statechart->getSCInterface().get_bitwiseXor()== 2);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BooleanExpressionsTest/BooleanExpressions.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart BooleanExpressions {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "BooleanExpressionsTest"
+		}
+	}
+}

+ 31 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BooleanExpressionsTest/BooleanExpressionsTest.cc

@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2013 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 "BooleanExpressions.hpp"
+
+TEST(StatemachineTest, booleanExpressions) {
+	BooleanExpressions* statechart = new BooleanExpressions();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(BooleanExpressions_main_region_StateA));
+	EXPECT_TRUE(statechart->getSCInterface().get_myBool1()== true);
+	EXPECT_TRUE(statechart->getSCInterface().get_myBool2()== false);
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(BooleanExpressions_main_region_StateB));
+	EXPECT_TRUE(statechart->getSCInterface().get_and()== false);
+	EXPECT_TRUE(statechart->getSCInterface().get_or()== true);
+	EXPECT_TRUE(statechart->getSCInterface().get_not()== false);
+	EXPECT_TRUE(statechart->getSCInterface().get_equal()== false);
+	EXPECT_TRUE(statechart->getSCInterface().get_notequal()== true);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/CKeywordsTest/CKeywords.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart CKeywords {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "CKeywordsTest"
+		}
+	}
+}

+ 26 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/CKeywordsTest/CKeywordsTest.cc

@@ -0,0 +1,26 @@
+/**
+* Copyright (c) 2013 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 "CKeywords.hpp"
+
+TEST(StatemachineTest, CKeywordsTest) {
+	CKeywords* statechart = new CKeywords();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(CKeywords_auto_char));
+	statechart->raise_auto();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(CKeywords_auto_const));
+	EXPECT_TRUE(statechart->isActive(CKeywords_auto_const_switch_case));
+	EXPECT_TRUE(statechart->isActive(CKeywords_auto_const_switch_case_enum_asm));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ChoiceTest/Choice.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart Choice {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "ChoiceTest"
+		}
+	}
+}

+ 91 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ChoiceTest/ChoiceTest.cc

@@ -0,0 +1,91 @@
+/**
+* Copyright (c) 2013 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 "Choice.hpp"
+
+TEST(StatemachineTest, elseChoiceUsingNonDefaultTransition) {
+	Choice* statechart = new Choice();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_A));
+	statechart->getSCInterface().set_c(true);
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_C));
+	delete statechart;
+}
+TEST(StatemachineTest, elseChoiceUsingDefaultTransition) {
+	Choice* statechart = new Choice();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_A));
+	statechart->getSCInterface().set_c(false);
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_B));
+	delete statechart;
+}
+TEST(StatemachineTest, defaultChoiceUsingNonDefaultTransition) {
+	Choice* statechart = new Choice();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_A));
+	statechart->getSCInterface().set_c(true);
+	statechart->raise_g();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_C));
+	delete statechart;
+}
+TEST(StatemachineTest, defaultChoiceUsingDefaultTransition) {
+	Choice* statechart = new Choice();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_A));
+	statechart->getSCInterface().set_c(false);
+	statechart->raise_g();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_B));
+	delete statechart;
+}
+TEST(StatemachineTest, uncheckedChoiceUsingNonDefaultTransition) {
+	Choice* statechart = new Choice();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_A));
+	statechart->getSCInterface().set_c(true);
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_C));
+	delete statechart;
+}
+TEST(StatemachineTest, uncheckedChoiceUsingDefaultTransition) {
+	Choice* statechart = new Choice();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_A));
+	statechart->getSCInterface().set_c(false);
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_B));
+	delete statechart;
+}
+TEST(StatemachineTest, alwaysTrueTransitionInChoice) {
+	Choice* statechart = new Choice();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_A));
+	statechart->getSCInterface().set_c(true);
+	statechart->raise_h();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Choice_main_region_B));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeclarationsTest/Declarations.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart Declarations {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "DeclarationsTest"
+		}
+	}
+}

+ 20 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeclarationsTest/DeclarationsTest.cc

@@ -0,0 +1,20 @@
+/**
+* Copyright (c) 2013 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 "Declarations.hpp"
+
+TEST(StatemachineTest, declarationsTest) {
+	Declarations* statechart = new Declarations();
+	statechart->init();
+	statechart->enter();
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeepHistoryTest/DeepHistory.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart DeepHistory {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "DeepHistoryTest"
+		}
+	}
+}

+ 38 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeepHistoryTest/DeepHistoryTest.cc

@@ -0,0 +1,38 @@
+/**
+* Copyright (c) 2013 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 "DeepHistory.hpp"
+
+TEST(StatemachineTest, deepHistoryTest) {
+	DeepHistory* statechart = new DeepHistory();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_event1();
+	statechart->runCycle();
+	statechart->raise_event3();
+	statechart->runCycle();
+	statechart->raise_event5();
+	statechart->runCycle();
+	statechart->raise_event7();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!isActive(DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(statechart->isActive(DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	statechart->raise_event2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(statechart->!isActive(DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	statechart->raise_event1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!isActive(DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(statechart->isActive(DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EnterStateTest/EnterState.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart EnterState {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "EnterStateTest"
+		}
+	}
+}

+ 44 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EnterStateTest/EnterStateTest.cc

@@ -0,0 +1,44 @@
+/**
+* Copyright (c) 2013 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 "EnterState.hpp"
+
+TEST(StatemachineTest, defaultEntry) {
+	EnterState* statechart = new EnterState();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(EnterState_r_A));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(EnterState_r_B_r_E));
+	delete statechart;
+}
+TEST(StatemachineTest, namedEntryThroughNamedTransition) {
+	EnterState* statechart = new EnterState();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(EnterState_r_A));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(EnterState_r_B_r_F));
+	delete statechart;
+}
+TEST(StatemachineTest, namedEntryThroughDefaultTransition) {
+	EnterState* statechart = new EnterState();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(EnterState_r_A));
+	statechart->raise_g();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(EnterState_r_B_r_E));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart ExitOnSelfTransition {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "ExitOnSelfTransitionTest"
+		}
+	}
+}

+ 31 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransitionTest.cc

@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2013 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 "ExitOnSelfTransition.hpp"
+
+TEST(StatemachineTest, ExitOnSelfTransitionTest) {
+	ExitOnSelfTransition* statechart = new ExitOnSelfTransition();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(ExitOnSelfTransition_main_region_A));
+	EXPECT_TRUE(statechart->getSCInterface().get_entryCount()== 1);
+	EXPECT_TRUE(statechart->getSCInterface().get_exitCount()== 0);
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->getSCInterface().get_entryCount()== 2);
+	EXPECT_TRUE(statechart->getSCInterface().get_exitCount()== 1);
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->getSCInterface().get_entryCount()== 2);
+	EXPECT_TRUE(statechart->getSCInterface().get_exitCount()== 2);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitStateTest/ExitState.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart ExitState {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "ExitStateTest"
+		}
+	}
+}

+ 53 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitStateTest/ExitStateTest.cc

@@ -0,0 +1,53 @@
+/**
+* Copyright (c) 2013 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 "ExitState.hpp"
+
+TEST(StatemachineTest, defaultExit) {
+	ExitState* statechart = new ExitState();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_A));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_E));
+	delete statechart;
+}
+TEST(StatemachineTest, namedExitThroughNamedTransition) {
+	ExitState* statechart = new ExitState();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_A));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_F));
+	delete statechart;
+}
+TEST(StatemachineTest, namedExitThroughDefaultTransition) {
+	ExitState* statechart = new ExitState();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_A));
+	statechart->raise_g();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_E));
+	delete statechart;
+}
+TEST(StatemachineTest, remainInA) {
+	ExitState* statechart = new ExitState();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_A));
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(ExitState_r_A));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/FeatureCallsTest/FeatureCalls.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart FeatureCalls {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "FeatureCallsTest"
+		}
+	}
+}

+ 23 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/FeatureCallsTest/FeatureCallsTest.cc

@@ -0,0 +1,23 @@
+/**
+* Copyright (c) 2013 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 "FeatureCalls.hpp"
+
+TEST(StatemachineTest, FeatureCalls) {
+	FeatureCalls* statechart = new FeatureCalls();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(FeatureCalls_main_region_A));
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(FeatureCalls_main_region_A));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardTest/Guard.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart Guard {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "GuardTest"
+		}
+	}
+}

+ 36 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardTest/GuardTest.cc

@@ -0,0 +1,36 @@
+/**
+* Copyright (c) 2013 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 "Guard.hpp"
+
+TEST(StatemachineTest, guardTest) {
+	Guard* statechart = new Guard();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Guard_main_region_A));
+	statechart->raise_event1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Guard_main_region_A));
+	statechart->raise_event2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Guard_main_region_B));
+	statechart->raise_return();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Guard_main_region_A));
+	statechart->raise_event1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Guard_main_region_B));
+	statechart->raise_return();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(Guard_main_region_A));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedEntryTest/GuardedEntry.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart GuardedEntry {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "GuardedEntryTest"
+		}
+	}
+}

+ 64 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedEntryTest/GuardedEntryTest.cc

@@ -0,0 +1,64 @@
+/**
+* Copyright (c) 2013 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 "GuardedEntry.hpp"
+
+TEST(StatemachineTest, EntryNotTakenOnStatechartEnter) {
+	GuardedEntry* statechart = new GuardedEntry();
+	statechart->init();
+	EXPECT_TRUE(statechart->getSCInterface().get_guard()== false);
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_A));
+	EXPECT_TRUE(statechart->getSCInterface().get_done()== false);
+	delete statechart;
+}
+TEST(StatemachineTest, EntryTakenOnStatechartEnter) {
+	GuardedEntry* statechart = new GuardedEntry();
+	statechart->init();
+	statechart->getSCInterface().set_guard(true);
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_A));
+	EXPECT_TRUE(statechart->getSCInterface().get_done()== true);
+	delete statechart;
+}
+TEST(StatemachineTest, EntryTakenInTransition) {
+	GuardedEntry* statechart = new GuardedEntry();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_A));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_B));
+	statechart->getSCInterface().set_guard(true);
+	statechart->getSCInterface().set_done(false);
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_A));
+	EXPECT_TRUE(statechart->getSCInterface().get_done());
+	delete statechart;
+}
+TEST(StatemachineTest, EntryNotTakenInTransition) {
+	GuardedEntry* statechart = new GuardedEntry();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_A));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_B));
+	statechart->getSCInterface().set_guard(false);
+	statechart->getSCInterface().set_done(false);
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(GuardedEntry_main_region_A));
+	EXPECT_TRUE(statechart->!getSCInterface().get_done());
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedExitTest/GuardedExit.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart GuardedExit {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "GuardedExitTest"
+		}
+	}
+}

+ 38 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedExitTest/GuardedExitTest.cc

@@ -0,0 +1,38 @@
+/**
+* Copyright (c) 2013 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 "GuardedExit.hpp"
+
+TEST(StatemachineTest, ExitTaken) {
+	GuardedExit* statechart = new GuardedExit();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(GuardedExit_main_region_A));
+	EXPECT_TRUE(statechart->!getSCInterface().get_guard());
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(GuardedExit_main_region_B));
+	EXPECT_TRUE(statechart->!getSCInterface().get_done());
+	delete statechart;
+}
+TEST(StatemachineTest, ExitNotTaken) {
+	GuardedExit* statechart = new GuardedExit();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(GuardedExit_main_region_A));
+	statechart->getSCInterface().set_guard(true);
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(GuardedExit_main_region_B));
+	EXPECT_TRUE(statechart->getSCInterface().get_done());
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStep.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart HistoryWithoutInitialStep {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "HistoryWithoutInitialStepTest"
+		}
+	}
+}

+ 61 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStepTest.cc

@@ -0,0 +1,61 @@
+/**
+* Copyright (c) 2013 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 "HistoryWithoutInitialStep.hpp"
+
+TEST(StatemachineTest, enterThroughInitialEntry) {
+	HistoryWithoutInitialStep* statechart = new HistoryWithoutInitialStep();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_A));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_B_r1_C));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_B_r1_D));
+	delete statechart;
+}
+TEST(StatemachineTest, enterCThroughHistory) {
+	HistoryWithoutInitialStep* statechart = new HistoryWithoutInitialStep();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_A));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_B_r1_C));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_A));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_B_r1_C));
+	delete statechart;
+}
+TEST(StatemachineTest, enterDThroughHistory) {
+	HistoryWithoutInitialStep* statechart = new HistoryWithoutInitialStep();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_A));
+	statechart->raise_e1();
+	statechart->runCycle();
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_B_r1_D));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_A));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(HistoryWithoutInitialStep_main_region_B_r1_D));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InEventLifeCycleTest/InEventLifeCycle.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart InEventLifeCycle {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "InEventLifeCycleTest"
+		}
+	}
+}

+ 24 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InEventLifeCycleTest/InEventLifeCycleTest.cc

@@ -0,0 +1,24 @@
+/**
+* Copyright (c) 2013 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 "InEventLifeCycle.hpp"
+
+TEST(StatemachineTest, eventLifeCycle) {
+	InEventLifeCycle* statechart = new InEventLifeCycle();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_e();
+	EXPECT_TRUE(statechart->getSCInterface().get_i()== 0);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->getSCInterface().get_i()== 1);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/IntegerExpressionsTest/IntegerExpressions.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart IntegerExpressions {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "IntegerExpressionsTest"
+		}
+	}
+}

+ 42 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/IntegerExpressionsTest/IntegerExpressionsTest.cc

@@ -0,0 +1,42 @@
+/**
+* Copyright (c) 2013 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 "IntegerExpressions.hpp"
+
+TEST(StatemachineTest, integerExpressions) {
+	IntegerExpressions* statechart = new IntegerExpressions();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(IntegerExpressions_main_region_StateA));
+	EXPECT_TRUE(statechart->getSCInterface().get_myInt1()== 10);
+	EXPECT_TRUE(statechart->getSCInterface().get_myInt2()== 5);
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->getSCInterface().get_less()== false);
+	EXPECT_TRUE(statechart->getSCInterface().get_greater()== true);
+	EXPECT_TRUE(statechart->getSCInterface().get_equalOrLess()== false);
+	EXPECT_TRUE(statechart->getSCInterface().get_equalOrGreater()== true);
+	EXPECT_TRUE(statechart->getSCInterface().get_equal()== false);
+	EXPECT_TRUE(statechart->getSCInterface().get_notEqual()== true);
+	EXPECT_TRUE(statechart->getSCInterface().get_plus()== 15);
+	EXPECT_TRUE(statechart->getSCInterface().get_minus()== 5);
+	EXPECT_TRUE(statechart->getSCInterface().get_multiply()== 50);
+	EXPECT_TRUE(statechart->getSCInterface().get_division()== 2);
+	EXPECT_TRUE(statechart->getSCInterface().get_modulo()== 0);
+	EXPECT_TRUE(statechart->getSCInterface().get_negat()== - 10 );
+	EXPECT_TRUE(statechart->getSCInterface().get_multiAssign()== 20);
+	EXPECT_TRUE(statechart->getSCInterface().get_divAssign()== 2);
+	EXPECT_TRUE(statechart->getSCInterface().get_plusAssign()== 12);
+	EXPECT_TRUE(statechart->getSCInterface().get_minusAssign()== - 8 );
+	EXPECT_TRUE(statechart->getSCInterface().get_moduloAssign()== 0);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycle.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart InternalEventLifeCycle {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "InternalEventLifeCycleTest"
+		}
+	}
+}

+ 36 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycleTest.cc

@@ -0,0 +1,36 @@
+/**
+* Copyright (c) 2013 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 "InternalEventLifeCycle.hpp"
+
+TEST(StatemachineTest, InternalEventLifeCycleTest) {
+	InternalEventLifeCycle* statechart = new InternalEventLifeCycle();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r2_C));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r2_D));
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r2_D));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r2_C));
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r1_A));
+	EXPECT_TRUE(statechart->isActive(InternalEventLifeCycle_r2_C));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NamedInterfaceAccessTest/NamedInterfaceAccess.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart NamedInterfaceAccess {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "NamedInterfaceAccessTest"
+		}
+	}
+}

+ 28 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NamedInterfaceAccessTest/NamedInterfaceAccessTest.cc

@@ -0,0 +1,28 @@
+/**
+* Copyright (c) 2013 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 "NamedInterfaceAccess.hpp"
+
+TEST(StatemachineTest, SafeOpenSuccess) {
+	NamedInterfaceAccess* statechart = new NamedInterfaceAccess();
+	statechart->init();
+	statechart->enter();
+	statechart->runCycle();
+	statechart->getSCIUser().raise_numberPressed( 3);
+	statechart->runCycle();
+	statechart->getSCIUser().raise_numberPressed( 7);
+	statechart->runCycle();
+	statechart->getSCIUser().raise_numberPressed( 5);
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->getSCTSafe().isRaised_open());
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OutEventLifeCycleTest/OutEventLifeCycle.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart OutEventLifeCycle {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "OutEventLifeCycleTest"
+		}
+	}
+}

+ 52 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OutEventLifeCycleTest/OutEventLifeCycleTest.cc

@@ -0,0 +1,52 @@
+/**
+* Copyright (c) 2013 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 "OutEventLifeCycle.hpp"
+
+TEST(StatemachineTest, availableAfterCycle) {
+	OutEventLifeCycle* statechart = new OutEventLifeCycle();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->getSCInterface().);
+	delete statechart;
+}
+TEST(StatemachineTest, availableWithinCycle) {
+	OutEventLifeCycle* statechart = new OutEventLifeCycle();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->getSCInterface().get_f_available_in_cycle());
+	delete statechart;
+}
+TEST(StatemachineTest, unvailableWithin2ndCycle) {
+	OutEventLifeCycle* statechart = new OutEventLifeCycle();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_e();
+	statechart->runCycle();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!getSCInterface().get_f_available_in_next_cycle());
+	delete statechart;
+}
+TEST(StatemachineTest, unvailableAfter2ndCycle) {
+	OutEventLifeCycle* statechart = new OutEventLifeCycle();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_e();
+	statechart->runCycle();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!getSCInterface().);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ParenthesisTest/Parenthesis.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart Parenthesis {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "ParenthesisTest"
+		}
+	}
+}

+ 22 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ParenthesisTest/ParenthesisTest.cc

@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2013 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 "Parenthesis.hpp"
+
+TEST(StatemachineTest, simple) {
+	Parenthesis* statechart = new Parenthesis();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(Parenthesis_mainRegion_A));
+	EXPECT_TRUE(statechart->getSCInterface().get_erg()== 8);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PerformanceTestsTest/PerformanceTest.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart PerformanceTest {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "PerformanceTestsTest"
+		}
+	}
+}

+ 83 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PerformanceTestsTest/PerformanceTestsTest.cc

@@ -0,0 +1,83 @@
+/**
+* Copyright (c) 2013 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 "PerformanceTest.hpp"
+
+TEST(StatemachineTest, test_100_000) {
+	PerformanceTest* statechart = new PerformanceTest();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(PerformanceTest_mr_A));
+	while (statechart->getSCInterface().get_c()< 100000) {
+		if (isActive(PerformanceTest_mr_A)) {
+					statechart->raise_e1();
+				  }
+				else {
+					if (getSCInterface().get_c()%2== 0) {
+								statechart->raise_e2();
+							  }
+							else {
+								statechart->raise_e3();;
+							}
+					;
+				}
+		statechart->runCycle();
+	}
+	EXPECT_TRUE(statechart->getSCInterface().get_a()> 2);
+	delete statechart;
+}
+TEST(StatemachineTest, test_1_000_000) {
+	PerformanceTest* statechart = new PerformanceTest();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(PerformanceTest_mr_A));
+	while (statechart->getSCInterface().get_c()< 1000000) {
+		if (isActive(PerformanceTest_mr_A)) {
+					statechart->raise_e1();
+				  }
+				else {
+					if (getSCInterface().get_c()%2== 0) {
+								statechart->raise_e2();
+							  }
+							else {
+								statechart->raise_e3();;
+							}
+					;
+				}
+		statechart->runCycle();
+	}
+	EXPECT_TRUE(statechart->getSCInterface().get_a()> 2);
+	delete statechart;
+}
+TEST(StatemachineTest, test_10_000_000) {
+	PerformanceTest* statechart = new PerformanceTest();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(PerformanceTest_mr_A));
+	while (statechart->getSCInterface().get_c()< 10000000) {
+		if (isActive(PerformanceTest_mr_A)) {
+					statechart->raise_e1();
+				  }
+				else {
+					if (getSCInterface().get_c()%2== 0) {
+								statechart->raise_e2();
+							  }
+							else {
+								statechart->raise_e3();;
+							}
+					;
+				}
+		statechart->runCycle();
+	}
+	EXPECT_TRUE(statechart->getSCInterface().get_a()> 2);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PriorityValuesTest/PriorityValues.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart PriorityValues {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "PriorityValuesTest"
+		}
+	}
+}

+ 35 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PriorityValuesTest/PriorityValuesTest.cc

@@ -0,0 +1,35 @@
+/**
+* Copyright (c) 2013 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 "PriorityValues.hpp"
+
+TEST(StatemachineTest, transitionPriority) {
+	PriorityValues* statechart = new PriorityValues();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(PriorityValues_main_region_A));
+	statechart->raise_event1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(PriorityValues_main_region_C));
+	delete statechart;
+}
+TEST(StatemachineTest, regionPriority) {
+	PriorityValues* statechart = new PriorityValues();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(PriorityValues_someRegion_A));
+	statechart->raise_event2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(PriorityValues_someRegion_B));
+	EXPECT_TRUE(statechart->!isActive(PriorityValues_main_region_E));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/RaiseEventTest/RaiseEvent.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart RaiseEvent {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "RaiseEventTest"
+		}
+	}
+}

+ 27 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/RaiseEventTest/RaiseEventTest.cc

@@ -0,0 +1,27 @@
+/**
+* Copyright (c) 2013 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 "RaiseEvent.hpp"
+
+TEST(StatemachineTest, raiseEvent) {
+	RaiseEvent* statechart = new RaiseEvent();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(RaiseEvent_second_region_SateA));
+	EXPECT_TRUE(statechart->isActive(RaiseEvent_main_region_StateA));
+	statechart->raise_e2();
+	statechart->runCycle();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(RaiseEvent_second_region_StateB));
+	EXPECT_TRUE(statechart->isActive(RaiseEvent_main_region_StateB));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/STextKeywordsInStatesAndRegionsTest/STextKeywordsInStatesAndRegions.sgen

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

+ 480 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/STextKeywordsInStatesAndRegionsTest/STextKeywordsInStatesAndRegionsTest.cc

@@ -0,0 +1,480 @@
+/**
+* Copyright (c) 2013 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.hpp"
+
+TEST(StatemachineTest, activeCheckWithSTextNamedStates) {
+	STextKeywordsInStatesAndRegions* statechart = new STextKeywordsInStatesAndRegions();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_raise));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_active));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_interface));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_event));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_in));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_var));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_external));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_default));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_entry));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_always));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_raise));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_valueof));
+	statechart->raise_e2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_default_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_operation_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_namespace_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_local_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_interface_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_internal_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_event_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_in_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_out_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_var_valueof));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_readonly_namespace));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_external_internal));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_else_local));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_entry_out));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_exit_readonly));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_always_operation));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_oncycle_else));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_raise_exit));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_valueof_oncycle));
+	EXPECT_TRUE(statechart->isActive(STextKeywordsInStatesAndRegions_active_valueof));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SameNameDifferentRegionTest/SameNameDifferentRegion.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart SameNameDifferentRegion {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "SameNameDifferentRegionTest"
+		}
+	}
+}

+ 29 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SameNameDifferentRegionTest/SameNameDifferentRegionTest.cc

@@ -0,0 +1,29 @@
+/**
+* Copyright (c) 2013 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 "SameNameDifferentRegion.hpp"
+
+TEST(StatemachineTest, sameNameDifferenRegionTest) {
+	SameNameDifferentRegion* statechart = new SameNameDifferentRegion();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(SameNameDifferentRegion_main_region_StateA));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SameNameDifferentRegion_main_region_StateB));
+	EXPECT_TRUE(statechart->isActive(SameNameDifferentRegion_main_region_StateB_r1_StateA));
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SameNameDifferentRegion_main_region_StateB));
+	EXPECT_TRUE(statechart->isActive(SameNameDifferentRegion_main_region_StateB_r1_StateB));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ShallowHistoryTest/ShallowHistory.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart ShallowHistory {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "ShallowHistoryTest"
+		}
+	}
+}

+ 50 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ShallowHistoryTest/ShallowHistoryTest.cc

@@ -0,0 +1,50 @@
+/**
+* Copyright (c) 2013 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 "ShallowHistory.hpp"
+
+TEST(StatemachineTest, shallowHistoryTest) {
+	ShallowHistory* statechart = new ShallowHistory();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_event1();
+	statechart->runCycle();
+	statechart->raise_event3();
+	statechart->runCycle();
+	statechart->raise_event5();
+	statechart->runCycle();
+	statechart->raise_event7();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!isActive(ShallowHistory_mainRegion_State1));
+	EXPECT_TRUE(statechart->isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	statechart->raise_event6();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	EXPECT_TRUE(statechart->isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+	statechart->raise_event5();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8));
+	EXPECT_TRUE(statechart->isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	statechart->raise_event2();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	EXPECT_TRUE(statechart->isActive(ShallowHistory_mainRegion_State1));
+	statechart->raise_event1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+	EXPECT_TRUE(statechart->!isActive(ShallowHistory_mainRegion_State1));
+	statechart->raise_event5();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->!isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+	EXPECT_TRUE(statechart->isActive(ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleEventTest/SimpleEvent.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart SimpleEvent {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "SimpleEventTest"
+		}
+	}
+}

+ 25 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleEventTest/SimpleEventTest.cc

@@ -0,0 +1,25 @@
+/**
+* Copyright (c) 2013 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 "SimpleEvent.hpp"
+
+TEST(StatemachineTest, simpleEventTest) {
+	SimpleEvent* statechart = new SimpleEvent();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(SimpleEvent_main_region_A));
+	EXPECT_TRUE(statechart->5== 5);
+	statechart->raise_event1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SimpleEvent_main_region_B));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleHierachyTest/SimpleHierachy.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart SimpleHierachy {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "SimpleHierachyTest"
+		}
+	}
+}

+ 27 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleHierachyTest/SimpleHierachyTest.cc

@@ -0,0 +1,27 @@
+/**
+* Copyright (c) 2013 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 "SimpleHierachy.hpp"
+
+TEST(StatemachineTest, simpleHierachyTest) {
+	SimpleHierachy* statechart = new SimpleHierachy();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(SimpleHierachy_main_region_A));
+	statechart->raise_event1();
+	statechart->raise_event1();
+	statechart->raise_event1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SimpleHierachy_main_region_B));
+	EXPECT_TRUE(statechart->isActive(SimpleHierachy_main_region_B_subregion1_B1));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateIsActiveTest/StateIsActive.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart StateIsActive {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "StateIsActiveTest"
+		}
+	}
+}

+ 27 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateIsActiveTest/StateIsActiveTest.cc

@@ -0,0 +1,27 @@
+/**
+* Copyright (c) 2013 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 "StateIsActive.hpp"
+
+TEST(StatemachineTest, stateIsActive) {
+	StateIsActive* statechart = new StateIsActive();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(StateIsActive_R1_R1A));
+	EXPECT_TRUE(statechart->isActive(StateIsActive_R2_R2A));
+	statechart->raise_event1();
+	statechart->runCycle();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(StateIsActive_R1_R1B));
+	EXPECT_TRUE(statechart->isActive(StateIsActive_R2_R2B));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateWithEmptyRegionTest/StateWithEmptyRegion.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart StateWithEmptyRegion {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "StateWithEmptyRegionTest"
+		}
+	}
+}

+ 23 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateWithEmptyRegionTest/StateWithEmptyRegionTest.cc

@@ -0,0 +1,23 @@
+/**
+* Copyright (c) 2013 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 "StateWithEmptyRegion.hpp"
+
+TEST(StatemachineTest, StateWithEmptyRegionTest) {
+	StateWithEmptyRegion* statechart = new StateWithEmptyRegion();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(StateWithEmptyRegion_main_region_A));
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(StateWithEmptyRegion_main_region_B));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatechartLocalReactionsTest/StatechartLocalReactions.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart StatechartLocalReactions {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "StatechartLocalReactionsTest"
+		}
+	}
+}

+ 32 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatechartLocalReactionsTest/StatechartLocalReactionsTest.cc

@@ -0,0 +1,32 @@
+/**
+* Copyright (c) 2013 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 "StatechartLocalReactions.hpp"
+
+TEST(StatemachineTest, statechartLocalReactionsTest) {
+	StatechartLocalReactions* statechart = new StatechartLocalReactions();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(StatechartLocalReactions_main_region_S1));
+	EXPECT_TRUE(statechart->isActive(StatechartLocalReactions_region2_a));
+	while (statechart->getSCInterface().get_myInt()< 10) {
+		EXPECT_TRUE(statechart->isActive(StatechartLocalReactions_region2_a));
+		if (getSCInterface().get_myInt()%2== 0) {
+					EXPECT_TRUE(statechart->isActive(StatechartLocalReactions_main_region_S1));
+				  }
+				else {
+					EXPECT_TRUE(statechart->isActive(StatechartLocalReactions_main_region_S2));;
+				}
+		statechart->runCycle();
+	}
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StringExpressionsTest/StringExpressions.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart StringExpressions {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "StringExpressionsTest"
+		}
+	}
+}

+ 31 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StringExpressionsTest/StringExpressionsTest.cc

@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2013 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 "StringExpressions.hpp"
+
+TEST(StatemachineTest, StringExpressionsTest) {
+	StringExpressions* statechart = new StringExpressions();
+	statechart->init();
+	EXPECT_TRUE(statechart->strcmp(getSCInterface().get_quotedString(), "\"x\"") == 0);
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(StringExpressions_main_region_StateA));
+	EXPECT_TRUE(statechart->strcmp(getSCInterface().get_myString(), "hello") == 0);
+	EXPECT_TRUE(statechart->strcmp(getSCInterface().get_myString2(), "world") == 0);
+	EXPECT_TRUE(statechart->strcmp(getSCInterface().get_quotedString(), "'y'") == 0);
+	statechart->raise_e1();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(StringExpressions_main_region_StateB));
+	EXPECT_TRUE(statechart->getSCInterface().get_equals()== false);
+	EXPECT_TRUE(statechart->getSCInterface().get_notEqual()== true);
+	EXPECT_TRUE(statechart->strcmp(getSCInterface().get_quotedString(), "\"z\"") == 0);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncForkTest/SyncFork.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart SyncFork {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "SyncForkTest"
+		}
+	}
+}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncForkTest/SyncForkTest.cc

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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 "SyncFork.hpp"
+
+TEST(StatemachineTest, syncForkTest) {
+	SyncFork* statechart = new SyncFork();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_A));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B));
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B_r2_D1));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B));
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B_r2_D2));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_A));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B));
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncFork_main_region_B_r2_D1));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncJoinTest/SyncJoin.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart SyncJoin {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "SyncJoinTest"
+		}
+	}
+}

+ 100 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncJoinTest/SyncJoinTest.cc

@@ -0,0 +1,100 @@
+/**
+* Copyright (c) 2013 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 "SyncJoin.hpp"
+
+TEST(StatemachineTest, syncJoin_C2_Waits) {
+	SyncJoin* statechart = new SyncJoin();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D1));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D1));
+	statechart->raise_jc();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D1));
+	statechart->raise_jd();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D1));
+	statechart->raise_jc();
+	statechart->raise_jd();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D1));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	statechart->raise_jc();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	statechart->raise_jd();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	statechart->raise_jc();
+	statechart->raise_jd();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_A));
+	delete statechart;
+}
+TEST(StatemachineTest, syncJoin_D2_Waits) {
+	SyncJoin* statechart = new SyncJoin();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D1));
+	statechart->raise_f();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	statechart->raise_jc();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	statechart->raise_jd();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	statechart->raise_jc();
+	statechart->raise_jd();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	statechart->raise_e();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_B_r2_D2));
+	delete statechart;
+}
+TEST(StatemachineTest, doubleEntryActionBug) {
+	SyncJoin* statechart = new SyncJoin();
+	statechart->init();
+	statechart->enter();
+	statechart->raise_e();
+	statechart->raise_f();
+	statechart->runCycle();
+	statechart->raise_jc();
+	statechart->raise_jd();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(SyncJoin_main_region_A));
+	EXPECT_TRUE(statechart->getSCInterface().get_x()== 1);
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TransitionWithoutConditionTest/TransitionWithoutCondition.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart TransitionWithoutCondition {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "TransitionWithoutConditionTest"
+		}
+	}
+}

+ 23 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TransitionWithoutConditionTest/TransitionWithoutConditionTest.cc

@@ -0,0 +1,23 @@
+/**
+* Copyright (c) 2013 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 "TransitionWithoutCondition.hpp"
+
+TEST(StatemachineTest, TransitionWithoutConditionTest) {
+	TransitionWithoutCondition* statechart = new TransitionWithoutCondition();
+	statechart->init();
+	statechart->enter();
+	EXPECT_TRUE(statechart->isActive(TransitionWithoutCondition_main_region_A));
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(TransitionWithoutCondition_main_region_A));
+	delete statechart;
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ValuedEventsTest/ValuedEvents.sgen

@@ -0,0 +1,8 @@
+GeneratorModel for yakindu::cpp {
+	statechart ValuedEvents {
+		feature Outlet {
+			targetProject = "gtests"
+			targetFolder = "ValuedEventsTest"
+		}
+	}
+}

+ 24 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ValuedEventsTest/ValuedEventsTest.cc

@@ -0,0 +1,24 @@
+/**
+* Copyright (c) 2013 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 "ValuedEvents.hpp"
+
+TEST(StatemachineTest, valuedEventsTest) {
+	ValuedEvents* statechart = new ValuedEvents();
+	statechart->init();
+	statechart->enter();
+	statechart->runCycle();
+	EXPECT_TRUE(statechart->isActive(ValuedEvents_main_region_A));
+	EXPECT_TRUE(statechart->isActive(ValuedEvents__region1_C));
+	EXPECT_TRUE(statechart->getSCInterface().get_myVar()== 42);
+	delete statechart;
+}

+ 309 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen

@@ -0,0 +1,309 @@
+GeneratorModel for sctunit::cpp {
+
+	test AlwaysOncycle{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test AssignmentAsExpression{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test BitExpressions{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test BooleanExpressions{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test Choice{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test CKeywords{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test Declarations{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test DeepHistory{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test EnterState{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test ExitOnSelfTransition{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test ExitState{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test FeatureCalls{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test Guard{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test GuardedEntry{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test GuardedExit{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test HistoryWithoutInitialStep{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test InEventLifeCycle{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test IntegerExpressions{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}	
+	
+	test InternalEventLifeCycle{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+		
+	test NamedInterfaceAccess{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+
+	test OutEventLifeCycle{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}	
+	
+	test Parenthesis{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+		
+	test PerformanceTests{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test PriorityValues{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}	
+	
+	test RaiseEvent{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+		
+	test SameNameDifferentRegion{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}	
+	
+	
+	test ShallowHistory{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test SimpleEvent{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test SimpleHierachy{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test StatechartLocalReactions{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test StateIsActive{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test StateWithEmptyRegion{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test STextKeywordsInStatesAndRegions{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test StringExpressions{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test SyncFork{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test SyncJoin{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+	test TransitionWithoutCondition{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}	
+
+	test ValuedEvents{
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "test-gen"			
+		}			
+	}
+	
+		
+}

+ 38 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/pom.xml

@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.yakindu.sct</groupId>
+		<artifactId>org.yakindu.sct.releng</artifactId>
+		<version>2.1.1-SNAPSHOT</version>
+		<relativePath>../org.yakindu.sct.releng/pom.xml</relativePath>
+	</parent>
+	<artifactId>org.yakindu.sct.generator.cpp.test</artifactId>
+	<groupId>org.yakindu.sct.plugins</groupId>
+	<packaging>eclipse-test-plugin</packaging>
+
+	<properties>
+		<testFailureIgnore>false</testFailureIgnore>
+	</properties>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.eclipse.tycho</groupId>
+				<artifactId>tycho-surefire-plugin</artifactId>
+				<version>${tycho-version}</version>
+				<configuration>
+					<includes>
+						<include>**/All*Tests.class</include>
+					</includes> 
+					<useUIHarness>false</useUIHarness>
+					<useUIThread>false</useUIThread>
+					<testFailureIgnore>${testFailureIgnore}</testFailureIgnore>
+					<argLine>${test.vmargs}</argLine>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+</project>

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AlwaysOncycleTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/AlwaysOncycleTest/AlwaysOncycleTest.cc", program = "gtests/AlwaysOncycleTest/AlwaysOncycle", model = "testmodels/SCTUnit/AlwaysOncycle.sct" )
+	@RunWith(GTestRunner.class)
+	public class AlwaysOncycleTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AssignmentAsExpressionTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/AssignmentAsExpressionTest/AssignmentAsExpressionTest.cc", program = "gtests/AssignmentAsExpressionTest/AssignmentAsExpression", model = "testmodels/SCTUnit/AssignmentAsExpression.sct" )
+	@RunWith(GTestRunner.class)
+	public class AssignmentAsExpressionTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/BitExpressionsTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/BitExpressionsTest/BitExpressionsTest.cc", program = "gtests/BitExpressionsTest/BitExpressions", model = "testmodels/SCTUnit/BitExpressions.sct" )
+	@RunWith(GTestRunner.class)
+	public class BitExpressionsTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/BooleanExpressionsTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/BooleanExpressionsTest/BooleanExpressionsTest.cc", program = "gtests/BooleanExpressionsTest/BooleanExpressions", model = "testmodels/SCTUnit/BooleanExpressions.sct" )
+	@RunWith(GTestRunner.class)
+	public class BooleanExpressionsTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/CKeywordsTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/CKeywordsTest/CKeywordsTest.cc", program = "gtests/CKeywordsTest/CKeywords", model = "testmodels/SCTUnit/CKeywords.sct" )
+	@RunWith(GTestRunner.class)
+	public class CKeywordsTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/ChoiceTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/ChoiceTest/ChoiceTest.cc", program = "gtests/ChoiceTest/Choice", model = "testmodels/SCTUnit/Choice.sct" )
+	@RunWith(GTestRunner.class)
+	public class ChoiceTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/DeclarationsTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/DeclarationsTest/DeclarationsTest.cc", program = "gtests/DeclarationsTest/Declarations", model = "testmodels/SCTUnit/Declarations.sct" )
+	@RunWith(GTestRunner.class)
+	public class DeclarationsTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/DeepHistoryTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/DeepHistoryTest/DeepHistoryTest.cc", program = "gtests/DeepHistoryTest/DeepHistory", model = "testmodels/SCTUnit/DeepHistory.sct" )
+	@RunWith(GTestRunner.class)
+	public class DeepHistoryTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/EnterStateTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/EnterStateTest/EnterStateTest.cc", program = "gtests/EnterStateTest/EnterState", model = "testmodels/SCTUnit/EnterState.sct" )
+	@RunWith(GTestRunner.class)
+	public class EnterStateTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/ExitOnSelfTransitionTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/ExitOnSelfTransitionTest/ExitOnSelfTransitionTest.cc", program = "gtests/ExitOnSelfTransitionTest/ExitOnSelfTransition", model = "testmodels/SCTUnit/ExitOnSelfTransition.sct" )
+	@RunWith(GTestRunner.class)
+	public class ExitOnSelfTransitionTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/ExitStateTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/ExitStateTest/ExitStateTest.cc", program = "gtests/ExitStateTest/ExitState", model = "testmodels/SCTUnit/ExitState.sct" )
+	@RunWith(GTestRunner.class)
+	public class ExitStateTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/FeatureCallsTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/FeatureCallsTest/FeatureCallsTest.cc", program = "gtests/FeatureCallsTest/FeatureCalls", model = "testmodels/SCTUnit/FeatureCalls.sct" )
+	@RunWith(GTestRunner.class)
+	public class FeatureCallsTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/GuardTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/GuardTest/GuardTest.cc", program = "gtests/GuardTest/Guard", model = "testmodels/SCTUnit/Guard.sct" )
+	@RunWith(GTestRunner.class)
+	public class GuardTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/GuardedEntryTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/GuardedEntryTest/GuardedEntryTest.cc", program = "gtests/GuardedEntryTest/GuardedEntry", model = "testmodels/SCTUnit/GuardedEntry.sct" )
+	@RunWith(GTestRunner.class)
+	public class GuardedEntryTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/GuardedExitTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/GuardedExitTest/GuardedExitTest.cc", program = "gtests/GuardedExitTest/GuardedExit", model = "testmodels/SCTUnit/GuardedExit.sct" )
+	@RunWith(GTestRunner.class)
+	public class GuardedExitTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 39 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/HistoryWithoutInitialStepTest.java

@@ -0,0 +1,39 @@
+/**
+* Copyright (c) 2013 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.cpp.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/HistoryWithoutInitialStepTest/HistoryWithoutInitialStepTest.cc", program = "gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStep", model = "testmodels/SCTUnit/HistoryWithoutInitialStep.sct" )
+	@RunWith(GTestRunner.class)
+	public class HistoryWithoutInitialStepTest {
+	
+		protected final GTestHelper helper = new GTestHelper(this) {
+	
+		@Override
+		protected void getSourceFiles(Collection<String> files) {
+			super.getSourceFiles(files);
+		files.add(getFileName(getTestProgram()) + ".cpp");
+		}
+		};
+	
+		@Before
+		public void setUp() {
+		helper.generate();
+		helper.compile();
+		}
+	}

+ 0 - 0
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/InEventLifeCycleTest.java


Some files were not shown because too many files changed in this diff