Browse Source

Newly generated the Testmodels for the Cpp Domain (#1470)

* Newly generated the Testmodels for the Cpp Domain

* Refactored SGen Model for the Generation of the Cpp Tests
jthoene 8 years ago
parent
commit
7b47814b32
100 changed files with 1001 additions and 3329 deletions
  1. 6 6
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AlwaysOncycleTest/AlwaysOncycleTest.cc
  2. 9 9
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/AssignmentAsExpressionTest/AssignmentAsExpressionTest.cc
  3. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BitExpressionsTest/BitExpressionsTest.cc
  4. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/BooleanExpressionsTest/BooleanExpressionsTest.cc
  5. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/CKeywordsTest/CKeywordsTest.cc
  6. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/CastExpressionsTest/CastExpressionsTest.cc
  7. 9 9
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ChoiceTest/ChoiceTest.cc
  8. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/ConditionalExpressionTest.cc
  9. 0 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/ConditionalExpressions.cpp
  10. 0 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/ConditionalExpressions.h
  11. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/ConditionalExpressions.sgen
  12. 0 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/StatemachineInterface.h
  13. 0 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/sc_types.h
  14. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScopeTest.cc
  15. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScopeTest.cc
  16. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScopeTest.cc
  17. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/Constants.sgen
  18. 7 7
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/ConstantsTestsTest.cc
  19. 0 390
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/Constants.cpp
  20. 0 191
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/Constants.h
  21. 0 42
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/StatemachineInterface.h
  22. 0 24
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/sc_types.h
  23. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeclarationsTest/DeclarationsTest.cc
  24. 4 30
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeepEntryTest/DeepEntryTest.cc
  25. 13 13
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeepHistoryTest/DeepHistoryTest.cc
  26. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DynamicChoiceTest/DynamicChoiceTest.cc
  27. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EmptyTransitionTest/EmptyTransitionTest.cc
  28. 7 7
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EnterStateTest/EnterStateTest.cc
  29. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EntryChoiceTest/EntryChoiceTest.cc
  30. 12 8
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransitionTest.cc
  31. 9 9
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EntryReactionActionTest/EntryReactionActionTest.cc
  32. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitOnSelfTransitionTest/ExitOnSelfTransitionTest.cc
  33. 8 8
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ExitStateTest/ExitStateTest.cc
  34. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/FeatureCallsTest/FeatureCallsTest.cc
  35. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/FinalStateTest/FinalStateTest.cc
  36. 11 11
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardTest/GuardTest.cc
  37. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedEntryTest/GuardedEntryTest.cc
  38. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/GuardedExitTest/GuardedExitTest.cc
  39. 11 11
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/HistoryWithExitPointTest/HistoryWithExitPointTest.cc
  40. 15 15
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/HistoryWithoutInitialStepTest/HistoryWithoutInitialStepTest.cc
  41. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InEventLifeCycleTest/InEventLifeCycleTest.cc
  42. 3 3
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/IntegerExpressionsTest/IntegerExpressionsTest.cc
  43. 7 7
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/InternalEventLifeCycleTest/InternalEventLifeCycleTest.cc
  44. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LocalReactionsTest/LocalReactionsTest.cc
  45. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAnd.sgen
  46. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAndTestsTest.cc
  47. 0 222
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAnd.cpp
  48. 0 123
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAnd.h
  49. 0 42
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/StatemachineInterface.h
  50. 0 24
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/sc_types.h
  51. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOr.sgen
  52. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOrTestsTest.cc
  53. 0 222
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOr.cpp
  54. 0 123
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOr.h
  55. 0 42
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/StatemachineInterface.h
  56. 0 24
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/sc_types.h
  57. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NamedInterfaceAccessTest/NamedInterfaceAccessTest.cc
  58. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NullCheckTest/NullCheckTest.cc
  59. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/Operations.sgen
  60. 22 27
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/OperationsTest.cc
  61. 0 193
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/OperationsTestCustom.cc
  62. 0 70
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/Operations_OCB.h
  63. 0 400
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/Operations.cpp
  64. 0 239
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/Operations.h
  65. 0 19
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/Operations.sgen
  66. 0 151
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/OperationsTestTest.cc
  67. 0 42
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/StatemachineInterface.h
  68. 0 24
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/sc_types.h
  69. 6 6
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OutEventLifeCycleTest/OutEventLifeCycleTest.cc
  70. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ParenthesisTest/ParenthesisTest.cc
  71. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/PriorityValuesTest/PriorityValuesTest.cc
  72. 4 4
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/RaiseEventTest/RaiseEventTest.cc
  73. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ReadOnlyVariableTest/ReadOnlyVariableTest.cc
  74. 41 41
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/STextKeywordsInStatesAndRegionsTest/STextKeywordsInStatesAndRegionsTest.cc
  75. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SameNameDifferentRegionTest/SameNameDifferentRegionTest.cc
  76. 19 19
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ShallowHistoryTest/ShallowHistoryTest.cc
  77. 21 21
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ShallowHistoryWithDeepEntryTest/ShallowHistoryWithDeepEntryTest.cc
  78. 4 4
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleEventTest/SimpleEventTest.cc
  79. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SimpleHierachyTest/SimpleHierachyTest.cc
  80. 4 4
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StateIsActiveTest/StateIsActiveTest.cc
  81. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatechartActiveTest/StatechartActiveTest.cc
  82. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatechartLocalReactionsTest/StatechartLocalReactionsTest.cc
  83. 36 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatemachineKeywordsTest/StatemachineKeywords.cc
  84. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StaticChoiceTest/StaticChoiceTest.cc
  85. 9 9
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StringExpressionsTest/StringExpressionsTest.cc
  86. 9 9
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncForkTest/SyncForkTest.cc
  87. 36 36
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/SyncJoinTest/SyncJoinTest.cc
  88. 1 4
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TimedTransitionsTest/TimedTransitionsTest.cc
  89. 2 2
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TransitionWithoutConditionTest/TransitionWithoutConditionTest.cc
  90. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TriggerExpressionPrecedenceTest/TriggerExpressionPrecedenceTest.cc
  91. 17 17
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TriggerGuardExpressionsTest/TriggerGuardExpressionsTest.cc
  92. 5 5
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TypeAliasTest/TypeAliasTest.cc
  93. 7 7
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ValuedEventsTest/ValuedEventsTest.cc
  94. 0 76
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.declarations.sgen
  95. 0 27
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.entries.sgen
  96. 0 28
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.expressions.sgen
  97. 522 118
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen
  98. 1 1
      test-plugins/org.yakindu.sct.generator.cpp.test/pom.xml
  99. 6 6
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AllTestsTest.java
  100. 0 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AlwaysOncycleTest.java

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "AlwaysOncycle.h"
 #include "sc_types.h"
-AlwaysOncycle* statechart;
+static AlwaysOncycle* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -26,7 +26,7 @@ class StatemachineTest : public ::testing::Test{
 };
 
 
-TEST_F(StatemachineTest, alwaysOncycleTest) {
+TEST_F(StatemachineTest, alwaysOnCycleTest) {
 	
 	
 	statechart->enter();
@@ -34,20 +34,20 @@ TEST_F(StatemachineTest, alwaysOncycleTest) {
 	EXPECT_TRUE(statechart->isStateActive(AlwaysOncycle::main_region_StateA));
 	
 	while (statechart->getDefaultSCI()->get_value()< 5l) {
-		statechart->runCycle();
+		statechart->runCycle();;
 		EXPECT_TRUE(statechart->isStateActive(AlwaysOncycle::main_region_StateA));
 	}
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AlwaysOncycle::main_region_StateB));
 	
 	while (statechart->getDefaultSCI()->get_value()< 5l) {
-		statechart->runCycle();
+		statechart->runCycle();;
 		EXPECT_TRUE(statechart->isStateActive(AlwaysOncycle::main_region_StateB));
 	}
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AlwaysOncycle::main_region_StateA));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "AssignmentAsExpression.h"
 #include "sc_types.h"
-AssignmentAsExpression* statechart;
+static AssignmentAsExpression* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -37,31 +37,31 @@ TEST_F(StatemachineTest, simpleAssignment) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_a()== 9l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_Subtract));
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_d()== 6l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_Multiply));
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_e()== 15l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_Divide));
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_g()== 1l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_Modulo));
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_i()== 1l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_Shift));
 	
@@ -69,19 +69,19 @@ TEST_F(StatemachineTest, simpleAssignment) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_k()== 4l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_boolean_And));
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_l()== 1l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_boolean_Or));
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_p()== 15l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(AssignmentAsExpression::main_region_boolean_Xor));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "BitExpressions.h"
 #include "sc_types.h"
-BitExpressions* statechart;
+static BitExpressions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -37,9 +37,9 @@ TEST_F(StatemachineTest, BitExpressions) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_myBit2()== 7l);
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(BitExpressions::main_region_StateB));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "BooleanExpressions.h"
 #include "sc_types.h"
-BooleanExpressions* statechart;
+static BooleanExpressions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -37,9 +37,9 @@ TEST_F(StatemachineTest, booleanExpressions) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_myBool2()== false);
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(BooleanExpressions::main_region_StateB));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "CKeywords.h"
 #include "sc_types.h"
-CKeywords* statechart;
+static CKeywords* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,9 +33,9 @@ TEST_F(StatemachineTest, CKeywordsTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(CKeywords::auto_char));
 	
-	statechart->raise_auto();
+	statechart->getDefaultSCI()->raise_auto();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(CKeywords::auto_loop));
 	

+ 3 - 3
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/CastExpressionsTest/CastExpressionsTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "CastExpressions.h"
 #include "sc_types.h"
-CastExpressions* statechart;
+static CastExpressions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,11 +35,11 @@ TEST_F(StatemachineTest, CastExpressionTest) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_intValue()== 5l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_realValue()== 15l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(CastExpressions::main_region_C));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "Choice.h"
 #include "sc_types.h"
-Choice* statechart;
+static Choice* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -29,29 +29,29 @@ void initForEventE(bool valueForC){
 	statechart->enter();
 	EXPECT_TRUE(statechart->isStateActive(Choice::main_region_A));
 	statechart->getDefaultSCI()->set_c(valueForC);
-	statechart->raise_e();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_e();
+	statechart->runCycle();;
 }
 void initForEventF(bool valueForC){
 	statechart->enter();
 	EXPECT_TRUE(statechart->isStateActive(Choice::main_region_A));
 	statechart->getDefaultSCI()->set_c(valueForC);
-	statechart->raise_f();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_f();
+	statechart->runCycle();;
 }
 void initForEventG(bool valueForC){
 	statechart->enter();
 	EXPECT_TRUE(statechart->isStateActive(Choice::main_region_A));
 	statechart->getDefaultSCI()->set_c(valueForC);
-	statechart->raise_g();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_g();
+	statechart->runCycle();;
 }
 void initForEventH(bool valueForC){
 	statechart->enter();
 	EXPECT_TRUE(statechart->isStateActive(Choice::main_region_A));
 	statechart->getDefaultSCI()->set_c(valueForC);
-	statechart->raise_h();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_h();
+	statechart->runCycle();;
 }
 
 TEST_F(StatemachineTest, elseChoiceUsingNonDefaultTransition) {

+ 3 - 3
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/ConditionalExpressionTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ConditionalExpressions.h"
 #include "sc_types.h"
-ConditionalExpressions* statechart;
+static ConditionalExpressions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,9 +35,9 @@ TEST_F(StatemachineTest, ConditionalExpressionTest) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_condition()== 1l);
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ConditionalExpressions::main_region_B));
 	

test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/ConditionalExpressions.cpp → test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/ConditionalExpressions.cpp


test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/ConditionalExpressions.h → test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/ConditionalExpressions.h


+ 1 - 1
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/ConditionalExpressions.sgen

@@ -2,7 +2,7 @@ GeneratorModel for yakindu::cpp {
 	statechart ConditionalExpressions {
 		feature Outlet {
 			targetProject = "gtests"
-			targetFolder = "ConditionalExpressionTest"
+			targetFolder = "ConditionalExpressionsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/StatemachineInterface.h → test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/StatemachineInterface.h


test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionTest/sc_types.h → test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConditionalExpressionsTest/sc_types.h


+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstOnlyDefaultScopeTest/ConstOnlyDefaultScopeTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ConstOnlyDefaultScope.h"
 #include "sc_types.h"
-ConstOnlyDefaultScope* statechart;
+static ConstOnlyDefaultScope* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -41,7 +41,7 @@ TEST_F(StatemachineTest, stateTransition) {
 	
 	statechart->getSCI_A()->raise_e(1l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ConstOnlyDefaultScope::ConstOnlyDefaultScope_main_region_B));
 	

+ 3 - 3
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstOnlyInternalScopeTest/ConstOnlyInternalScopeTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ConstOnlyInternalScope.h"
 #include "sc_types.h"
-ConstOnlyInternalScope* statechart;
+static ConstOnlyInternalScope* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -39,9 +39,9 @@ TEST_F(StatemachineTest, stateTransition) {
 	
 	statechart->enter();
 	
-	statechart->raise_e( 1l);
+	statechart->getDefaultSCI()->raise_e( 1l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ConstOnlyInternalScope::ConstOnlyInternalScope_main_region_B));
 	

+ 3 - 3
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstOnlyNamedScopeTest/ConstOnlyNamedScopeTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ConstOnlyNamedScope.h"
 #include "sc_types.h"
-ConstOnlyNamedScope* statechart;
+static ConstOnlyNamedScope* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -39,9 +39,9 @@ TEST_F(StatemachineTest, stateTransition) {
 	
 	statechart->enter();
 	
-	statechart->raise_e( 1l);
+	statechart->getDefaultSCI()->raise_e( 1l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ConstOnlyNamedScope::ConstOnlyNamedScope_main_region_B));
 	

+ 1 - 1
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/Constants.sgen

@@ -2,7 +2,7 @@ GeneratorModel for yakindu::cpp {
 	statechart Constants {
 		feature Outlet {
 			targetProject = "gtests"
-			targetFolder = "ConstantsTestsTest"
+			targetFolder = "ConstantsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 7 - 7
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/ConstantsTestsTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "Constants.h"
 #include "sc_types.h"
-Constants* statechart;
+static Constants* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -39,23 +39,23 @@ TEST_F(StatemachineTest, constantDefinition) {
 	
 	EXPECT_TRUE(strcmp(statechart->getSCI_Named()->get_y(), "Hello World") == 0);
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_result()== 20l);
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Constants::main_region_C));
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_result()== 100l);
 	
-	statechart->raise_e2( statechart->getDefaultSCI()->get_x());
+	statechart->getDefaultSCI()->raise_e2( statechart->getDefaultSCI()->get_x());
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_result()== 1000l);
 	

+ 0 - 390
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/Constants.cpp

@@ -1,390 +0,0 @@
-
-#include "Constants.h"
-#include <string.h>
-
-/*! \file Implementation of the state machine 'Constants'
-*/
-
-Constants::Constants()
-{
-	
-	
-	stateConfVectorPosition = 0;
-	
-}
-
-Constants::~Constants()
-{
-}
-
-const sc_integer Constants::DefaultSCI::x = 10;
-const sc_integer Constants::DefaultSCI::y = Constants::DefaultSCI::x * 2;
-
-const sc_string Constants::SCI_Named::y = "Hello World";
-const sc_integer Constants::SCI_Named::two = 2;
-
-const sc_integer Constants::InternalSCI::internalConstant = 5;
-
-
-void Constants::init()
-{
-	for (int i = 0; i < maxOrthogonalStates; ++i)
-		stateConfVector[i] = Constants_last_state;
-	
-	stateConfVectorPosition = 0;
-
-	clearInEvents();
-	clearOutEvents();
-	
-	/* Default init sequence for statechart Constants */
-	iface.result = 0;
-}
-
-void Constants::enter()
-{
-	/* Default enter sequence for statechart Constants */
-	enseq_main_region_default();
-}
-
-void Constants::exit()
-{
-	/* Default exit sequence for statechart Constants */
-	exseq_main_region();
-}
-
-sc_boolean Constants::isActive() const
-{
-	return stateConfVector[0] != Constants_last_state;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean Constants::isFinal() const
-{
-   return false;}
-
-void Constants::runCycle()
-{
-	
-	clearOutEvents();
-	
-	for (stateConfVectorPosition = 0;
-		stateConfVectorPosition < maxOrthogonalStates;
-		stateConfVectorPosition++)
-		{
-			
-		switch (stateConfVector[stateConfVectorPosition])
-		{
-		case main_region_A :
-		{
-			react_main_region_A();
-			break;
-		}
-		case main_region_B :
-		{
-			react_main_region_B();
-			break;
-		}
-		case main_region_C :
-		{
-			react_main_region_C();
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	clearInEvents();
-}
-
-void Constants::clearInEvents()
-{
-	iface.e_raised = false;
-	iface.e2_raised = false;
-}
-
-void Constants::clearOutEvents()
-{
-}
-
-
-sc_boolean Constants::isStateActive(ConstantsStates state) const
-{
-	switch (state)
-	{
-		case main_region_A : 
-			return (sc_boolean) (stateConfVector[0] == main_region_A
-			);
-		case main_region_B : 
-			return (sc_boolean) (stateConfVector[0] == main_region_B
-			);
-		case main_region_C : 
-			return (sc_boolean) (stateConfVector[0] == main_region_C
-			);
-		default: return false;
-	}
-}
-
-Constants::DefaultSCI* Constants::getDefaultSCI()
-{
-	return &iface;
-}
-
-void Constants::DefaultSCI::raise_e()
-{
-	e_raised = true;
-}
-
-void Constants::raise_e()
-{
-	iface.raise_e();
-}
-
-void Constants::DefaultSCI::raise_e2(sc_integer value)
-{
-	e2_value = value;
-	e2_raised = true;
-}
-
-void Constants::raise_e2(sc_integer value)
-{
-	iface.raise_e2(value);
-}
-
-
-const sc_integer Constants::DefaultSCI::get_x() const
-{
-	return x;
-}
-
-const sc_integer Constants::get_x() const
-{
-	return Constants::DefaultSCI::x;
-}
-
-const sc_integer Constants::DefaultSCI::get_y() const
-{
-	return y;
-}
-
-const sc_integer Constants::get_y() const
-{
-	return Constants::DefaultSCI::y;
-}
-
-sc_integer Constants::DefaultSCI::get_result() const
-{
-	return result;
-}
-
-sc_integer Constants::get_result() const
-{
-	return iface.result;
-}
-
-void Constants::DefaultSCI::set_result(sc_integer value)
-{
-	result = value;
-}
-
-void Constants::set_result(sc_integer value)
-{
-	iface.result = value;
-}
-
-Constants::SCI_Named* Constants::getSCI_Named()
-{
-	return &ifaceNamed;
-}
-
-
-const sc_string Constants::SCI_Named::get_y() const
-{
-	return y;
-}
-
-const sc_integer Constants::SCI_Named::get_two() const
-{
-	return two;
-}
-
-
-const sc_integer Constants::InternalSCI::get_internalConstant() const
-{
-	return internalConstant;
-}
-
-
-// implementations of all internal functions
-
-sc_boolean Constants::check_main_region_A_tr0_tr0()
-{
-	return iface.e_raised;
-}
-
-sc_boolean Constants::check_main_region_B_tr0_tr0()
-{
-	return iface.e_raised;
-}
-
-sc_boolean Constants::check_main_region_C_tr0_tr0()
-{
-	return iface.e2_raised;
-}
-
-void Constants::effect_main_region_A_tr0()
-{
-	exseq_main_region_A();
-	enseq_main_region_B_default();
-}
-
-void Constants::effect_main_region_B_tr0()
-{
-	exseq_main_region_B();
-	enseq_main_region_C_default();
-}
-
-void Constants::effect_main_region_C_tr0()
-{
-	exseq_main_region_C();
-	iface.result = iface.e2_value * Constants::DefaultSCI::x * Constants::SCI_Named::two * Constants::InternalSCI::internalConstant;
-	enseq_main_region_A_default();
-}
-
-/* Entry action for state 'B'. */
-void Constants::enact_main_region_B()
-{
-	/* Entry action for state 'B'. */
-	iface.result = Constants::SCI_Named::two * Constants::DefaultSCI::x;
-}
-
-/* Entry action for state 'C'. */
-void Constants::enact_main_region_C()
-{
-	/* Entry action for state 'C'. */
-	iface.result = iface.result * Constants::InternalSCI::internalConstant;
-}
-
-/* 'default' enter sequence for state A */
-void Constants::enseq_main_region_A_default()
-{
-	/* 'default' enter sequence for state A */
-	stateConfVector[0] = main_region_A;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state B */
-void Constants::enseq_main_region_B_default()
-{
-	/* 'default' enter sequence for state B */
-	enact_main_region_B();
-	stateConfVector[0] = main_region_B;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state C */
-void Constants::enseq_main_region_C_default()
-{
-	/* 'default' enter sequence for state C */
-	enact_main_region_C();
-	stateConfVector[0] = main_region_C;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-void Constants::enseq_main_region_default()
-{
-	/* 'default' enter sequence for region main region */
-	react_main_region__entry_Default();
-}
-
-/* Default exit sequence for state A */
-void Constants::exseq_main_region_A()
-{
-	/* Default exit sequence for state A */
-	stateConfVector[0] = Constants_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state B */
-void Constants::exseq_main_region_B()
-{
-	/* Default exit sequence for state B */
-	stateConfVector[0] = Constants_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state C */
-void Constants::exseq_main_region_C()
-{
-	/* Default exit sequence for state C */
-	stateConfVector[0] = Constants_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-void Constants::exseq_main_region()
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of Constants.main_region) at position 0... */
-	switch(stateConfVector[ 0 ])
-	{
-		case main_region_A :
-		{
-			exseq_main_region_A();
-			break;
-		}
-		case main_region_B :
-		{
-			exseq_main_region_B();
-			break;
-		}
-		case main_region_C :
-		{
-			exseq_main_region_C();
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-void Constants::react_main_region_A()
-{
-	/* The reactions of state A. */
-	if (check_main_region_A_tr0_tr0())
-	{ 
-		effect_main_region_A_tr0();
-	} 
-}
-
-/* The reactions of state B. */
-void Constants::react_main_region_B()
-{
-	/* The reactions of state B. */
-	if (check_main_region_B_tr0_tr0())
-	{ 
-		effect_main_region_B_tr0();
-	} 
-}
-
-/* The reactions of state C. */
-void Constants::react_main_region_C()
-{
-	/* The reactions of state C. */
-	if (check_main_region_C_tr0_tr0())
-	{ 
-		effect_main_region_C_tr0();
-	} 
-}
-
-/* Default react sequence for initial entry  */
-void Constants::react_main_region__entry_Default()
-{
-	/* Default react sequence for initial entry  */
-	enseq_main_region_A_default();
-}
-
-

+ 0 - 191
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/Constants.h

@@ -1,191 +0,0 @@
-
-#ifndef CONSTANTS_H_
-#define CONSTANTS_H_
-
-#include "sc_types.h"
-#include "StatemachineInterface.h"
-
-/*! \file Header of the state machine 'Constants'.
-*/
-
-class Constants : public StatemachineInterface
-{
-	
-	public:
-		
-		Constants();
-		
-		~Constants();
-		
-		/*! Enumeration of all states */ 
-		typedef enum
-		{
-			main_region_A,
-			main_region_B,
-			main_region_C,
-			Constants_last_state
-		} ConstantsStates;
-		
-		//! Inner class for default interface scope.
-		class DefaultSCI
-		{
-			
-			public:
-				/*! Raises the in event 'e' that is defined in the default interface scope. */
-				void raise_e();
-				
-				/*! Raises the in event 'e2' that is defined in the default interface scope. */
-				void raise_e2(sc_integer value);
-				
-				/*! Gets the value of the variable 'x' that is defined in the default interface scope. */
-				const sc_integer get_x() const;
-				
-				/*! Gets the value of the variable 'y' that is defined in the default interface scope. */
-				const sc_integer get_y() const;
-				
-				/*! Gets the value of the variable 'result' that is defined in the default interface scope. */
-				sc_integer get_result() const;
-				
-				/*! Sets the value of the variable 'result' that is defined in the default interface scope. */
-				void set_result(sc_integer value);
-				
-				
-			private:
-				friend class Constants;
-				sc_boolean e_raised;
-				sc_boolean e2_raised;
-				sc_integer e2_value;
-				static const sc_integer x;
-				static const sc_integer y;
-				sc_integer result;
-		};
-				
-		
-		/*! Returns an instance of the interface class 'DefaultSCI'. */
-		DefaultSCI* getDefaultSCI();
-		
-		/*! Raises the in event 'e' that is defined in the default interface scope. */
-		void raise_e();
-		
-		/*! Raises the in event 'e2' that is defined in the default interface scope. */
-		void raise_e2(sc_integer value);
-		
-		/*! Gets the value of the variable 'x' that is defined in the default interface scope. */
-		const sc_integer get_x() const;
-		
-		/*! Gets the value of the variable 'y' that is defined in the default interface scope. */
-		const sc_integer get_y() const;
-		
-		/*! Gets the value of the variable 'result' that is defined in the default interface scope. */
-		sc_integer get_result() const;
-		
-		/*! Sets the value of the variable 'result' that is defined in the default interface scope. */
-		void set_result(sc_integer value);
-		
-		//! Inner class for Named interface scope.
-		class SCI_Named
-		{
-			
-			public:
-				/*! Gets the value of the variable 'y' that is defined in the interface scope 'Named'. */
-				const sc_string get_y() const;
-				
-				/*! Gets the value of the variable 'two' that is defined in the interface scope 'Named'. */
-				const sc_integer get_two() const;
-				
-				
-			private:
-				friend class Constants;
-				static const sc_string y;
-				static const sc_integer two;
-		};
-				
-		
-		/*! Returns an instance of the interface class 'SCI_Named'. */
-		SCI_Named* getSCI_Named();
-		
-		
-		
-		/*
-		 * Functions inherited from StatemachineInterface
-		 */
-		virtual void init();
-		
-		virtual void enter();
-		
-		virtual void exit();
-		
-		virtual void runCycle();
-		
-		/*!
-		* Checks if the state machine is active (until 2.4.1 this method was used for states).
-		* A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-		*/
-		virtual sc_boolean isActive() const;
-		
-		
-		/*!
-		* Checks if all active states are final. 
-		* If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-		*/
-		virtual sc_boolean isFinal() const;
-		
-		
-		/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
-		sc_boolean isStateActive(ConstantsStates state) const;
-	
-	private:
-	
-		//! Inner class for internal interface scope.
-		class InternalSCI
-		{
-			
-			public:
-				/*! Gets the value of the variable 'internalConstant' that is defined in the internal scope. */
-				const sc_integer get_internalConstant() const;
-				
-				
-			private:
-				friend class Constants;
-				static const sc_integer internalConstant;
-		};
-	
-		//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
-		static const sc_integer maxOrthogonalStates = 1;
-		
-		
-		ConstantsStates stateConfVector[maxOrthogonalStates];
-		
-		sc_ushort stateConfVectorPosition;
-		
-		DefaultSCI iface;
-		SCI_Named ifaceNamed;
-		InternalSCI ifaceInternalSCI;
-		
-		// prototypes of all internal functions
-		
-		sc_boolean check_main_region_A_tr0_tr0();
-		sc_boolean check_main_region_B_tr0_tr0();
-		sc_boolean check_main_region_C_tr0_tr0();
-		void effect_main_region_A_tr0();
-		void effect_main_region_B_tr0();
-		void effect_main_region_C_tr0();
-		void enact_main_region_B();
-		void enact_main_region_C();
-		void enseq_main_region_A_default();
-		void enseq_main_region_B_default();
-		void enseq_main_region_C_default();
-		void enseq_main_region_default();
-		void exseq_main_region_A();
-		void exseq_main_region_B();
-		void exseq_main_region_C();
-		void exseq_main_region();
-		void react_main_region_A();
-		void react_main_region_B();
-		void react_main_region_C();
-		void react_main_region__entry_Default();
-		void clearInEvents();
-		void clearOutEvents();
-		
-};
-#endif /* CONSTANTS_H_ */

+ 0 - 42
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/StatemachineInterface.h

@@ -1,42 +0,0 @@
-
-#ifndef STATEMACHINEINTERFACE_H_
-#define STATEMACHINEINTERFACE_H_
-
-/*! \file Basic interface for state machines.
- */
-class StatemachineInterface
-{
-	public:
-	
-		virtual ~StatemachineInterface() = 0;
-		
-		/*! Initializes the state machine. Used to initialize internal variables etc.
-		*/
-		virtual void init() = 0;
-	
-		/*! Enters the state machine. Sets the state machine into a defined state.
-		*/
-		virtual void enter() = 0;
-	
-		/*! Exits the state machine. Leaves the state machine with a defined state.
-		*/
-		virtual void exit() = 0;
-	
-		/*! Start a run-to-completion cycle.
-		*/
-		virtual void runCycle() = 0;
-		
-		/*! Checks whether the state machine is active. 
-	 	    A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-	 	*/	
-		virtual	sc_boolean isActive() const = 0;
-		
-		/*! Checks if all active states are final. 
-	 		If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-	 	*/
-		virtual sc_boolean isFinal() const = 0;
-};
-
-inline StatemachineInterface::~StatemachineInterface() {}
-
-#endif /* STATEMACHINEINTERFACE_H_ */

+ 0 - 24
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ConstantsTestsTest/sc_types.h

@@ -1,24 +0,0 @@
-
-#ifndef SC_TYPES_H_
-#define SC_TYPES_H_
-
-/* As <cstdint> is not available on all platforms we choose to include <stdint.h>. You can switch to <cstdint> by commenting and uncommenting the lines below.*/
-// #include <cstdint>
-#include <stdint.h>
-
-
-#define sc_string      char*
-
-typedef int_fast16_t   sc_short;
-typedef uint_fast16_t  sc_ushort;
-typedef int32_t        sc_integer;
-typedef double         sc_real;
-typedef bool           sc_boolean;
-
-typedef intptr_t       sc_eventid;
-
-#ifndef null
-	#define null 0
-#endif
-
-#endif /* SC_TYPES_H_ */

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "Declarations.h"
 #include "sc_types.h"
-Declarations* statechart;
+static Declarations* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:

+ 4 - 30
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DeepEntryTest/DeepEntryTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "DeepEntry.h"
 #include "sc_types.h"
-DeepEntry* statechart;
+static DeepEntry* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -29,38 +29,12 @@ class StatemachineTest : public ::testing::Test{
 TEST_F(StatemachineTest, enterToSubstate) {
 	
 	
-	EXPECT_TRUE(statechart->getDefaultSCI()->get_x()== 0l);
-	
-	EXPECT_TRUE(statechart->getDefaultSCI()->get_y()== 0l);
-	
-	EXPECT_TRUE(statechart->getDefaultSCI()->get_z()== 0l);
-	
 	statechart->enter();
 	
-	EXPECT_TRUE(statechart->getDefaultSCI()->get_x()== 1l);
-	
-	EXPECT_TRUE(statechart->getDefaultSCI()->get_y()== 1l);
-	
-	EXPECT_TRUE(statechart->getDefaultSCI()->get_z()== 2l);
-	
-	statechart->raise_e();
-	
-	statechart->runCycle();
-	
-	EXPECT_TRUE(statechart->isStateActive(DeepEntry::r2_B_r_BB));
-	
-	statechart->raise_f();
-	
-	statechart->runCycle();
-	
-	EXPECT_TRUE(statechart->isStateActive(DeepEntry::r2_C));
-	
-	statechart->raise_f();
-	
-	statechart->runCycle();
+	long vergleich = 4l;
 	
-	EXPECT_TRUE(statechart->isStateActive(DeepEntry::r2_B_r_BB));
+	EXPECT_TRUE(vergleich== 4l);
 	
-	EXPECT_TRUE(statechart->getDefaultSCI()->get_y()== 1l);
+	statechart->exit();
 	
 }

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "DeepHistory.h"
 #include "sc_types.h"
-DeepHistory* statechart;
+static DeepHistory* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,37 +31,37 @@ TEST_F(StatemachineTest, deepHistoryTest) {
 	
 	statechart->enter();
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->raise_event3();
+	statechart->getDefaultSCI()->raise_event3();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->raise_event5();
+	statechart->getDefaultSCI()->raise_event5();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->raise_event7();
+	statechart->getDefaultSCI()->raise_event7();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(DeepHistory::mainRegion_State1));
 	
 	EXPECT_TRUE(statechart->isStateActive(DeepHistory::mainRegion_State2__region0_State4__region0_State7__region0_State9));
 	
-	statechart->raise_event2();
+	statechart->getDefaultSCI()->raise_event2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(DeepHistory::mainRegion_State1));
 	
 	EXPECT_TRUE(!statechart->isStateActive(DeepHistory::mainRegion_State2__region0_State4__region0_State7__region0_State9));
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(DeepHistory::mainRegion_State1));
 	

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/DynamicChoiceTest/DynamicChoiceTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "DynamicChoice.h"
 #include "sc_types.h"
-DynamicChoice* statechart;
+static DynamicChoice* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,7 +33,7 @@ TEST_F(StatemachineTest, DynamicChoiceTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(DynamicChoice::main_region_Start));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(DynamicChoice::main_region_A));
 	

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EmptyTransitionTest/EmptyTransitionTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "EmptyTransition.h"
 #include "sc_types.h"
-EmptyTransition* statechart;
+static EmptyTransition* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,7 +31,7 @@ TEST_F(StatemachineTest, EmptyTransitionTest) {
 	
 	statechart->enter();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(EmptyTransition::main_region_B));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "EnterState.h"
 #include "sc_types.h"
-EnterState* statechart;
+static EnterState* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,9 +33,9 @@ TEST_F(StatemachineTest, defaultEntry) {
 	
 	EXPECT_TRUE(statechart->isStateActive(EnterState::r_A));
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(EnterState::r_B_r_E));
 	
@@ -47,9 +47,9 @@ TEST_F(StatemachineTest, namedEntryThroughNamedTransition) {
 	
 	EXPECT_TRUE(statechart->isStateActive(EnterState::r_A));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(EnterState::r_B_r_F));
 	
@@ -61,9 +61,9 @@ TEST_F(StatemachineTest, namedEntryThroughDefaultTransition) {
 	
 	EXPECT_TRUE(statechart->isStateActive(EnterState::r_A));
 	
-	statechart->raise_g();
+	statechart->getDefaultSCI()->raise_g();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(EnterState::r_B_r_E));
 	

+ 3 - 3
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EntryChoiceTest/EntryChoiceTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "EntryChoice.h"
 #include "sc_types.h"
-EntryChoice* statechart;
+static EntryChoice* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,9 +31,9 @@ TEST_F(StatemachineTest, EntryChoiceTest) {
 	
 	statechart->enter();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(EntryChoice::main_region_A));
 	

+ 12 - 8
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EntryExitSelfTransitionTest/EntryExitSelfTransitionTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "EntryExitSelfTransition.h"
 #include "sc_types.h"
-EntryExitSelfTransition* statechart;
+static EntryExitSelfTransition* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -27,7 +27,7 @@ class StatemachineTest : public ::testing::Test{
 
 void init(){
 	statechart->enter();
-	statechart->runCycle();
+	statechart->runCycle();;
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_entries()== 1l);
 	EXPECT_TRUE(statechart->isStateActive(EntryExitSelfTransition::main_region_A__region0_B));
 	statechart->getDefaultSCI()->set_entries(0l);
@@ -38,9 +38,9 @@ TEST_F(StatemachineTest, SelfTransitionToChildState) {
 	
 	init();
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_entries()== 1l);
 	
@@ -48,15 +48,17 @@ TEST_F(StatemachineTest, SelfTransitionToChildState) {
 	
 	EXPECT_TRUE(statechart->isStateActive(EntryExitSelfTransition::main_region_A__region0_C));
 	
+	statechart->exit();
+	
 }
 TEST_F(StatemachineTest, SelfTransitionFromChildState) {
 	
 	
 	init();
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_entries()== 0l);
 	
@@ -64,9 +66,9 @@ TEST_F(StatemachineTest, SelfTransitionFromChildState) {
 	
 	EXPECT_TRUE(statechart->isStateActive(EntryExitSelfTransition::main_region_A__region0_C));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(EntryExitSelfTransition::main_region_A__region0_B));
 	
@@ -74,4 +76,6 @@ TEST_F(StatemachineTest, SelfTransitionFromChildState) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_exits()== 1l);
 	
+	statechart->exit();
+	
 }

+ 9 - 9
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/EntryReactionActionTest/EntryReactionActionTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "EntryReactionAction.h"
 #include "sc_types.h"
-EntryReactionAction* statechart;
+static EntryReactionAction* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -27,10 +27,10 @@ class StatemachineTest : public ::testing::Test{
 
 void init(){
 	statechart->enter();
-	statechart->raise_b();
-	statechart->runCycle();
-	statechart->raise_d();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_b();
+	statechart->runCycle();;
+	statechart->getDefaultSCI()->raise_d();
+	statechart->runCycle();;
 	statechart->getDefaultSCI()->set_enteredR1(false);
 	statechart->getDefaultSCI()->set_enteredR2(false);
 	statechart->getDefaultSCI()->set_enteredBdefault(false);
@@ -56,9 +56,9 @@ TEST_F(StatemachineTest, entryOnRTS) {
 	
 	init();
 	
-	statechart->raise_b();
+	statechart->getDefaultSCI()->raise_b();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->getDefaultSCI()->get_enteredR1());
 	
@@ -74,9 +74,9 @@ TEST_F(StatemachineTest, noEntryTransitionActionOnHistory) {
 	
 	init();
 	
-	statechart->raise_d();
+	statechart->getDefaultSCI()->raise_d();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->getDefaultSCI()->get_enteredR1());
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ExitOnSelfTransition.h"
 #include "sc_types.h"
-ExitOnSelfTransition* statechart;
+static ExitOnSelfTransition* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -37,17 +37,17 @@ TEST_F(StatemachineTest, ExitOnSelfTransitionTest) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_exitCount()== 0l);
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_entryCount()== 2l);
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_exitCount()== 1l);
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_entryCount()== 2l);
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ExitState.h"
 #include "sc_types.h"
-ExitState* statechart;
+static ExitState* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,9 +33,9 @@ TEST_F(StatemachineTest, defaultExit) {
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_A));
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_E));
 	
@@ -47,9 +47,9 @@ TEST_F(StatemachineTest, namedExitThroughNamedTransition) {
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_A));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_F));
 	
@@ -61,9 +61,9 @@ TEST_F(StatemachineTest, namedExitThroughDefaultTransition) {
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_A));
 	
-	statechart->raise_g();
+	statechart->getDefaultSCI()->raise_g();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_E));
 	
@@ -75,7 +75,7 @@ TEST_F(StatemachineTest, remainInA) {
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_A));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ExitState::r_A));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "FeatureCalls.h"
 #include "sc_types.h"
-FeatureCalls* statechart;
+static FeatureCalls* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,7 +33,7 @@ TEST_F(StatemachineTest, FeatureCalls) {
 	
 	EXPECT_TRUE(statechart->isStateActive(FeatureCalls::main_region_A));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(FeatureCalls::main_region_A));
 	

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/FinalStateTest/FinalStateTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "FinalState.h"
 #include "sc_types.h"
-FinalState* statechart;
+static FinalState* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,7 +31,7 @@ TEST_F(StatemachineTest, StatechartNameTest) {
 	
 	statechart->enter();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isFinal());
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "Guard.h"
 #include "sc_types.h"
-Guard* statechart;
+static Guard* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,33 +33,33 @@ TEST_F(StatemachineTest, guardTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(Guard::main_region_A));
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Guard::main_region_A));
 	
-	statechart->raise_event2();
+	statechart->getDefaultSCI()->raise_event2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Guard::main_region_B));
 	
-	statechart->raise_return();
+	statechart->getDefaultSCI()->raise_return();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Guard::main_region_A));
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Guard::main_region_B));
 	
-	statechart->raise_return();
+	statechart->getDefaultSCI()->raise_return();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Guard::main_region_A));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "GuardedEntry.h"
 #include "sc_types.h"
-GuardedEntry* statechart;
+static GuardedEntry* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -28,13 +28,13 @@ class StatemachineTest : public ::testing::Test{
 void initEntryInTransition(bool guardVar, bool doneVar){
 	statechart->enter();
 	EXPECT_TRUE(statechart->isStateActive(GuardedEntry::main_region_A));
-	statechart->raise_e();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_e();
+	statechart->runCycle();;
 	EXPECT_TRUE(statechart->isStateActive(GuardedEntry::main_region_B));
 	statechart->getDefaultSCI()->set_guard(guardVar);
 	statechart->getDefaultSCI()->set_done(doneVar);
-	statechart->raise_e();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_e();
+	statechart->runCycle();;
 	EXPECT_TRUE(statechart->isStateActive(GuardedEntry::main_region_A));
 }
 

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "GuardedExit.h"
 #include "sc_types.h"
-GuardedExit* statechart;
+static GuardedExit* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -26,8 +26,8 @@ class StatemachineTest : public ::testing::Test{
 };
 
 void checkDone(bool shouldBeDone){
-	statechart->raise_e();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_e();
+	statechart->runCycle();;
 	EXPECT_TRUE(statechart->isStateActive(GuardedExit::main_region_B));
 	EXPECT_TRUE(shouldBeDone ? statechart->getDefaultSCI()->get_done()  : !statechart->getDefaultSCI()->get_done());
 }

+ 11 - 11
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/HistoryWithExitPointTest/HistoryWithExitPointTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "HistoryWithExitPoint.h"
 #include "sc_types.h"
-HistoryWithExitPoint* statechart;
+static HistoryWithExitPoint* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,33 +33,33 @@ TEST_F(StatemachineTest, historyEntryAfterExit) {
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithExitPoint::mr_A_r_X1));
 	
-	statechart->raise_push();
+	statechart->getDefaultSCI()->raise_push();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithExitPoint::mr_B));
 	
-	statechart->raise_back();
+	statechart->getDefaultSCI()->raise_back();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithExitPoint::mr_A_r_X1));
 	
-	statechart->raise_next();
+	statechart->getDefaultSCI()->raise_next();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithExitPoint::mr_A_r_X2));
 	
-	statechart->raise_push();
+	statechart->getDefaultSCI()->raise_push();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithExitPoint::mr_B));
 	
-	statechart->raise_back();
+	statechart->getDefaultSCI()->raise_back();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithExitPoint::mr_A_r_X2));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "HistoryWithoutInitialStep.h"
 #include "sc_types.h"
-HistoryWithoutInitialStep* statechart;
+static HistoryWithoutInitialStep* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -28,8 +28,8 @@ class StatemachineTest : public ::testing::Test{
 void init(){
 	statechart->enter();
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_A));
-	statechart->raise_toB();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_toB();
+	statechart->runCycle();;
 }
 
 TEST_F(StatemachineTest, enterThroughInitialEntry) {
@@ -39,9 +39,9 @@ TEST_F(StatemachineTest, enterThroughInitialEntry) {
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_B_r1_C));
 	
-	statechart->raise_next();
+	statechart->getDefaultSCI()->raise_next();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_B_r1_D));
 	
@@ -53,15 +53,15 @@ TEST_F(StatemachineTest, enterCThroughHistory) {
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_B_r1_C));
 	
-	statechart->raise_toA();
+	statechart->getDefaultSCI()->raise_toA();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_A));
 	
-	statechart->raise_toHistory();
+	statechart->getDefaultSCI()->raise_toHistory();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_B_r1_C));
 	
@@ -71,21 +71,21 @@ TEST_F(StatemachineTest, enterDThroughHistory) {
 	
 	init();
 	
-	statechart->raise_next();
+	statechart->getDefaultSCI()->raise_next();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_B_r1_D));
 	
-	statechart->raise_toA();
+	statechart->getDefaultSCI()->raise_toA();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_A));
 	
-	statechart->raise_toHistory();
+	statechart->getDefaultSCI()->raise_toHistory();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(HistoryWithoutInitialStep::main_region_B_r1_D));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "InEventLifeCycle.h"
 #include "sc_types.h"
-InEventLifeCycle* statechart;
+static InEventLifeCycle* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,11 +31,11 @@ TEST_F(StatemachineTest, eventLifeCycle) {
 	
 	statechart->enter();
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_i()== 0l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_i()== 1l);
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "IntegerExpressions.h"
 #include "sc_types.h"
-IntegerExpressions* statechart;
+static IntegerExpressions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -37,9 +37,9 @@ TEST_F(StatemachineTest, integerExpressions) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_myInt2()== 5l);
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_less()== false);
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "InternalEventLifeCycle.h"
 #include "sc_types.h"
-InternalEventLifeCycle* statechart;
+static InternalEventLifeCycle* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,29 +35,29 @@ TEST_F(StatemachineTest, InternalEventLifeCycleTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r2_C));
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r1_A));
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r2_D));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r1_A));
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r2_D));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r1_A));
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r2_C));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(InternalEventLifeCycle::r1_A));
 	

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LocalReactionsTest/LocalReactionsTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "LocalReactions.h"
 #include "sc_types.h"
-LocalReactions* statechart;
+static LocalReactions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,7 +33,7 @@ TEST_F(StatemachineTest, LocalReactionsTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(LocalReactions::main_region_A));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_x()== 1l);
 	

+ 1 - 1
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAnd.sgen

@@ -2,7 +2,7 @@ GeneratorModel for yakindu::cpp {
 	statechart LogicalAnd {
 		feature Outlet {
 			targetProject = "gtests"
-			targetFolder = "LogicalAndTestsTest"
+			targetFolder = "LogicalAndTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAndTestsTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "LogicalAnd.h"
 #include "sc_types.h"
-LogicalAnd* statechart;
+static LogicalAnd* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,7 +31,7 @@ TEST_F(StatemachineTest, operandEvaluationOrder) {
 	
 	statechart->enter();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_x()== 4l && statechart->getDefaultSCI()->get_b()) << "logical and expression was executed in wrong order..." ;
 	

+ 0 - 222
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAnd.cpp

@@ -1,222 +0,0 @@
-
-#include "LogicalAnd.h"
-#include <string.h>
-
-/*! \file Implementation of the state machine 'LogicalAnd'
-*/
-
-LogicalAnd::LogicalAnd()
-{
-	
-	
-	stateConfVectorPosition = 0;
-	
-}
-
-LogicalAnd::~LogicalAnd()
-{
-}
-
-
-void LogicalAnd::init()
-{
-	for (int i = 0; i < maxOrthogonalStates; ++i)
-		stateConfVector[i] = LogicalAnd_last_state;
-	
-	stateConfVectorPosition = 0;
-
-	clearInEvents();
-	clearOutEvents();
-	
-	/* Default init sequence for statechart LogicalAnd */
-	iface.x = 1;
-	iface.b = false;
-}
-
-void LogicalAnd::enter()
-{
-	/* Default enter sequence for statechart LogicalAnd */
-	enseq_main_region_default();
-}
-
-void LogicalAnd::exit()
-{
-	/* Default exit sequence for statechart LogicalAnd */
-	exseq_main_region();
-}
-
-sc_boolean LogicalAnd::isActive() const
-{
-	return stateConfVector[0] != LogicalAnd_last_state;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean LogicalAnd::isFinal() const
-{
-   return false;}
-
-void LogicalAnd::runCycle()
-{
-	
-	clearOutEvents();
-	
-	for (stateConfVectorPosition = 0;
-		stateConfVectorPosition < maxOrthogonalStates;
-		stateConfVectorPosition++)
-		{
-			
-		switch (stateConfVector[stateConfVectorPosition])
-		{
-		case main_region_A :
-		{
-			react_main_region_A();
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	clearInEvents();
-}
-
-void LogicalAnd::clearInEvents()
-{
-}
-
-void LogicalAnd::clearOutEvents()
-{
-}
-
-
-sc_boolean LogicalAnd::isStateActive(LogicalAndStates state) const
-{
-	switch (state)
-	{
-		case main_region_A : 
-			return (sc_boolean) (stateConfVector[0] == main_region_A
-			);
-		default: return false;
-	}
-}
-
-LogicalAnd::DefaultSCI* LogicalAnd::getDefaultSCI()
-{
-	return &iface;
-}
-
-
-sc_integer LogicalAnd::DefaultSCI::get_x() const
-{
-	return x;
-}
-
-sc_integer LogicalAnd::get_x() const
-{
-	return iface.x;
-}
-
-void LogicalAnd::DefaultSCI::set_x(sc_integer value)
-{
-	x = value;
-}
-
-void LogicalAnd::set_x(sc_integer value)
-{
-	iface.x = value;
-}
-
-sc_boolean LogicalAnd::DefaultSCI::get_b() const
-{
-	return b;
-}
-
-sc_boolean LogicalAnd::get_b() const
-{
-	return iface.b;
-}
-
-void LogicalAnd::DefaultSCI::set_b(sc_boolean value)
-{
-	b = value;
-}
-
-void LogicalAnd::set_b(sc_boolean value)
-{
-	iface.b = value;
-}
-
-
-// implementations of all internal functions
-
-sc_boolean LogicalAnd::check_main_region_A_tr0_tr0()
-{
-	return iface.x == 1;
-}
-
-void LogicalAnd::effect_main_region_A_tr0()
-{
-	exseq_main_region_A();
-	iface.b = ((iface.x += 1) == 2 && (iface.x *= 2) == 4);
-	enseq_main_region_A_default();
-}
-
-/* 'default' enter sequence for state A */
-void LogicalAnd::enseq_main_region_A_default()
-{
-	/* 'default' enter sequence for state A */
-	stateConfVector[0] = main_region_A;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-void LogicalAnd::enseq_main_region_default()
-{
-	/* 'default' enter sequence for region main region */
-	react_main_region__entry_Default();
-}
-
-/* Default exit sequence for state A */
-void LogicalAnd::exseq_main_region_A()
-{
-	/* Default exit sequence for state A */
-	stateConfVector[0] = LogicalAnd_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-void LogicalAnd::exseq_main_region()
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of LogicalAnd.main_region) at position 0... */
-	switch(stateConfVector[ 0 ])
-	{
-		case main_region_A :
-		{
-			exseq_main_region_A();
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-void LogicalAnd::react_main_region_A()
-{
-	/* The reactions of state A. */
-	if (check_main_region_A_tr0_tr0())
-	{ 
-		effect_main_region_A_tr0();
-	} 
-}
-
-/* Default react sequence for initial entry  */
-void LogicalAnd::react_main_region__entry_Default()
-{
-	/* Default react sequence for initial entry  */
-	enseq_main_region_A_default();
-}
-
-

+ 0 - 123
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/LogicalAnd.h

@@ -1,123 +0,0 @@
-
-#ifndef LOGICALAND_H_
-#define LOGICALAND_H_
-
-#include "sc_types.h"
-#include "StatemachineInterface.h"
-
-/*! \file Header of the state machine 'LogicalAnd'.
-*/
-
-class LogicalAnd : public StatemachineInterface
-{
-	
-	public:
-		
-		LogicalAnd();
-		
-		~LogicalAnd();
-		
-		/*! Enumeration of all states */ 
-		typedef enum
-		{
-			main_region_A,
-			LogicalAnd_last_state
-		} LogicalAndStates;
-		
-		//! Inner class for default interface scope.
-		class DefaultSCI
-		{
-			
-			public:
-				/*! Gets the value of the variable 'x' that is defined in the default interface scope. */
-				sc_integer get_x() const;
-				
-				/*! Sets the value of the variable 'x' that is defined in the default interface scope. */
-				void set_x(sc_integer value);
-				
-				/*! Gets the value of the variable 'b' that is defined in the default interface scope. */
-				sc_boolean get_b() const;
-				
-				/*! Sets the value of the variable 'b' that is defined in the default interface scope. */
-				void set_b(sc_boolean value);
-				
-				
-			private:
-				friend class LogicalAnd;
-				sc_integer x;
-				sc_boolean b;
-		};
-				
-		
-		/*! Returns an instance of the interface class 'DefaultSCI'. */
-		DefaultSCI* getDefaultSCI();
-		
-		/*! Gets the value of the variable 'x' that is defined in the default interface scope. */
-		sc_integer get_x() const;
-		
-		/*! Sets the value of the variable 'x' that is defined in the default interface scope. */
-		void set_x(sc_integer value);
-		
-		/*! Gets the value of the variable 'b' that is defined in the default interface scope. */
-		sc_boolean get_b() const;
-		
-		/*! Sets the value of the variable 'b' that is defined in the default interface scope. */
-		void set_b(sc_boolean value);
-		
-		
-		/*
-		 * Functions inherited from StatemachineInterface
-		 */
-		virtual void init();
-		
-		virtual void enter();
-		
-		virtual void exit();
-		
-		virtual void runCycle();
-		
-		/*!
-		* Checks if the state machine is active (until 2.4.1 this method was used for states).
-		* A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-		*/
-		virtual sc_boolean isActive() const;
-		
-		
-		/*!
-		* Checks if all active states are final. 
-		* If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-		*/
-		virtual sc_boolean isFinal() const;
-		
-		
-		/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
-		sc_boolean isStateActive(LogicalAndStates state) const;
-	
-	private:
-	
-	
-		//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
-		static const sc_integer maxOrthogonalStates = 1;
-		
-		
-		LogicalAndStates stateConfVector[maxOrthogonalStates];
-		
-		sc_ushort stateConfVectorPosition;
-		
-		DefaultSCI iface;
-		
-		// prototypes of all internal functions
-		
-		sc_boolean check_main_region_A_tr0_tr0();
-		void effect_main_region_A_tr0();
-		void enseq_main_region_A_default();
-		void enseq_main_region_default();
-		void exseq_main_region_A();
-		void exseq_main_region();
-		void react_main_region_A();
-		void react_main_region__entry_Default();
-		void clearInEvents();
-		void clearOutEvents();
-		
-};
-#endif /* LOGICALAND_H_ */

+ 0 - 42
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/StatemachineInterface.h

@@ -1,42 +0,0 @@
-
-#ifndef STATEMACHINEINTERFACE_H_
-#define STATEMACHINEINTERFACE_H_
-
-/*! \file Basic interface for state machines.
- */
-class StatemachineInterface
-{
-	public:
-	
-		virtual ~StatemachineInterface() = 0;
-		
-		/*! Initializes the state machine. Used to initialize internal variables etc.
-		*/
-		virtual void init() = 0;
-	
-		/*! Enters the state machine. Sets the state machine into a defined state.
-		*/
-		virtual void enter() = 0;
-	
-		/*! Exits the state machine. Leaves the state machine with a defined state.
-		*/
-		virtual void exit() = 0;
-	
-		/*! Start a run-to-completion cycle.
-		*/
-		virtual void runCycle() = 0;
-		
-		/*! Checks whether the state machine is active. 
-	 	    A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-	 	*/	
-		virtual	sc_boolean isActive() const = 0;
-		
-		/*! Checks if all active states are final. 
-	 		If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-	 	*/
-		virtual sc_boolean isFinal() const = 0;
-};
-
-inline StatemachineInterface::~StatemachineInterface() {}
-
-#endif /* STATEMACHINEINTERFACE_H_ */

+ 0 - 24
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalAndTestsTest/sc_types.h

@@ -1,24 +0,0 @@
-
-#ifndef SC_TYPES_H_
-#define SC_TYPES_H_
-
-/* As <cstdint> is not available on all platforms we choose to include <stdint.h>. You can switch to <cstdint> by commenting and uncommenting the lines below.*/
-// #include <cstdint>
-#include <stdint.h>
-
-
-#define sc_string      char*
-
-typedef int_fast16_t   sc_short;
-typedef uint_fast16_t  sc_ushort;
-typedef int32_t        sc_integer;
-typedef double         sc_real;
-typedef bool           sc_boolean;
-
-typedef intptr_t       sc_eventid;
-
-#ifndef null
-	#define null 0
-#endif
-
-#endif /* SC_TYPES_H_ */

+ 1 - 1
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOr.sgen

@@ -2,7 +2,7 @@ GeneratorModel for yakindu::cpp {
 	statechart LogicalOr {
 		feature Outlet {
 			targetProject = "gtests"
-			targetFolder = "LogicalOrTestsTest"
+			targetFolder = "LogicalOrTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOrTestsTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "LogicalOr.h"
 #include "sc_types.h"
-LogicalOr* statechart;
+static LogicalOr* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,7 +31,7 @@ TEST_F(StatemachineTest, operandEvaluationOrder) {
 	
 	statechart->enter();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_x()== 4l && statechart->getDefaultSCI()->get_b()) << "logical or expression was executed in wrong order..." ;
 	

+ 0 - 222
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOr.cpp

@@ -1,222 +0,0 @@
-
-#include "LogicalOr.h"
-#include <string.h>
-
-/*! \file Implementation of the state machine 'LogicalOr'
-*/
-
-LogicalOr::LogicalOr()
-{
-	
-	
-	stateConfVectorPosition = 0;
-	
-}
-
-LogicalOr::~LogicalOr()
-{
-}
-
-
-void LogicalOr::init()
-{
-	for (int i = 0; i < maxOrthogonalStates; ++i)
-		stateConfVector[i] = LogicalOr_last_state;
-	
-	stateConfVectorPosition = 0;
-
-	clearInEvents();
-	clearOutEvents();
-	
-	/* Default init sequence for statechart LogicalOr */
-	iface.x = 1;
-	iface.b = false;
-}
-
-void LogicalOr::enter()
-{
-	/* Default enter sequence for statechart LogicalOr */
-	enseq_main_region_default();
-}
-
-void LogicalOr::exit()
-{
-	/* Default exit sequence for statechart LogicalOr */
-	exseq_main_region();
-}
-
-sc_boolean LogicalOr::isActive() const
-{
-	return stateConfVector[0] != LogicalOr_last_state;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean LogicalOr::isFinal() const
-{
-   return false;}
-
-void LogicalOr::runCycle()
-{
-	
-	clearOutEvents();
-	
-	for (stateConfVectorPosition = 0;
-		stateConfVectorPosition < maxOrthogonalStates;
-		stateConfVectorPosition++)
-		{
-			
-		switch (stateConfVector[stateConfVectorPosition])
-		{
-		case main_region_A :
-		{
-			react_main_region_A();
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	clearInEvents();
-}
-
-void LogicalOr::clearInEvents()
-{
-}
-
-void LogicalOr::clearOutEvents()
-{
-}
-
-
-sc_boolean LogicalOr::isStateActive(LogicalOrStates state) const
-{
-	switch (state)
-	{
-		case main_region_A : 
-			return (sc_boolean) (stateConfVector[0] == main_region_A
-			);
-		default: return false;
-	}
-}
-
-LogicalOr::DefaultSCI* LogicalOr::getDefaultSCI()
-{
-	return &iface;
-}
-
-
-sc_integer LogicalOr::DefaultSCI::get_x() const
-{
-	return x;
-}
-
-sc_integer LogicalOr::get_x() const
-{
-	return iface.x;
-}
-
-void LogicalOr::DefaultSCI::set_x(sc_integer value)
-{
-	x = value;
-}
-
-void LogicalOr::set_x(sc_integer value)
-{
-	iface.x = value;
-}
-
-sc_boolean LogicalOr::DefaultSCI::get_b() const
-{
-	return b;
-}
-
-sc_boolean LogicalOr::get_b() const
-{
-	return iface.b;
-}
-
-void LogicalOr::DefaultSCI::set_b(sc_boolean value)
-{
-	b = value;
-}
-
-void LogicalOr::set_b(sc_boolean value)
-{
-	iface.b = value;
-}
-
-
-// implementations of all internal functions
-
-sc_boolean LogicalOr::check_main_region_A_tr0_tr0()
-{
-	return iface.x == 1;
-}
-
-void LogicalOr::effect_main_region_A_tr0()
-{
-	exseq_main_region_A();
-	iface.b = ((iface.x += 1) != 2 || (iface.x *= 2) == 4);
-	enseq_main_region_A_default();
-}
-
-/* 'default' enter sequence for state A */
-void LogicalOr::enseq_main_region_A_default()
-{
-	/* 'default' enter sequence for state A */
-	stateConfVector[0] = main_region_A;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-void LogicalOr::enseq_main_region_default()
-{
-	/* 'default' enter sequence for region main region */
-	react_main_region__entry_Default();
-}
-
-/* Default exit sequence for state A */
-void LogicalOr::exseq_main_region_A()
-{
-	/* Default exit sequence for state A */
-	stateConfVector[0] = LogicalOr_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-void LogicalOr::exseq_main_region()
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of LogicalOr.main_region) at position 0... */
-	switch(stateConfVector[ 0 ])
-	{
-		case main_region_A :
-		{
-			exseq_main_region_A();
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state A. */
-void LogicalOr::react_main_region_A()
-{
-	/* The reactions of state A. */
-	if (check_main_region_A_tr0_tr0())
-	{ 
-		effect_main_region_A_tr0();
-	} 
-}
-
-/* Default react sequence for initial entry  */
-void LogicalOr::react_main_region__entry_Default()
-{
-	/* Default react sequence for initial entry  */
-	enseq_main_region_A_default();
-}
-
-

+ 0 - 123
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/LogicalOr.h

@@ -1,123 +0,0 @@
-
-#ifndef LOGICALOR_H_
-#define LOGICALOR_H_
-
-#include "sc_types.h"
-#include "StatemachineInterface.h"
-
-/*! \file Header of the state machine 'LogicalOr'.
-*/
-
-class LogicalOr : public StatemachineInterface
-{
-	
-	public:
-		
-		LogicalOr();
-		
-		~LogicalOr();
-		
-		/*! Enumeration of all states */ 
-		typedef enum
-		{
-			main_region_A,
-			LogicalOr_last_state
-		} LogicalOrStates;
-		
-		//! Inner class for default interface scope.
-		class DefaultSCI
-		{
-			
-			public:
-				/*! Gets the value of the variable 'x' that is defined in the default interface scope. */
-				sc_integer get_x() const;
-				
-				/*! Sets the value of the variable 'x' that is defined in the default interface scope. */
-				void set_x(sc_integer value);
-				
-				/*! Gets the value of the variable 'b' that is defined in the default interface scope. */
-				sc_boolean get_b() const;
-				
-				/*! Sets the value of the variable 'b' that is defined in the default interface scope. */
-				void set_b(sc_boolean value);
-				
-				
-			private:
-				friend class LogicalOr;
-				sc_integer x;
-				sc_boolean b;
-		};
-				
-		
-		/*! Returns an instance of the interface class 'DefaultSCI'. */
-		DefaultSCI* getDefaultSCI();
-		
-		/*! Gets the value of the variable 'x' that is defined in the default interface scope. */
-		sc_integer get_x() const;
-		
-		/*! Sets the value of the variable 'x' that is defined in the default interface scope. */
-		void set_x(sc_integer value);
-		
-		/*! Gets the value of the variable 'b' that is defined in the default interface scope. */
-		sc_boolean get_b() const;
-		
-		/*! Sets the value of the variable 'b' that is defined in the default interface scope. */
-		void set_b(sc_boolean value);
-		
-		
-		/*
-		 * Functions inherited from StatemachineInterface
-		 */
-		virtual void init();
-		
-		virtual void enter();
-		
-		virtual void exit();
-		
-		virtual void runCycle();
-		
-		/*!
-		* Checks if the state machine is active (until 2.4.1 this method was used for states).
-		* A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-		*/
-		virtual sc_boolean isActive() const;
-		
-		
-		/*!
-		* Checks if all active states are final. 
-		* If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-		*/
-		virtual sc_boolean isFinal() const;
-		
-		
-		/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
-		sc_boolean isStateActive(LogicalOrStates state) const;
-	
-	private:
-	
-	
-		//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
-		static const sc_integer maxOrthogonalStates = 1;
-		
-		
-		LogicalOrStates stateConfVector[maxOrthogonalStates];
-		
-		sc_ushort stateConfVectorPosition;
-		
-		DefaultSCI iface;
-		
-		// prototypes of all internal functions
-		
-		sc_boolean check_main_region_A_tr0_tr0();
-		void effect_main_region_A_tr0();
-		void enseq_main_region_A_default();
-		void enseq_main_region_default();
-		void exseq_main_region_A();
-		void exseq_main_region();
-		void react_main_region_A();
-		void react_main_region__entry_Default();
-		void clearInEvents();
-		void clearOutEvents();
-		
-};
-#endif /* LOGICALOR_H_ */

+ 0 - 42
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/StatemachineInterface.h

@@ -1,42 +0,0 @@
-
-#ifndef STATEMACHINEINTERFACE_H_
-#define STATEMACHINEINTERFACE_H_
-
-/*! \file Basic interface for state machines.
- */
-class StatemachineInterface
-{
-	public:
-	
-		virtual ~StatemachineInterface() = 0;
-		
-		/*! Initializes the state machine. Used to initialize internal variables etc.
-		*/
-		virtual void init() = 0;
-	
-		/*! Enters the state machine. Sets the state machine into a defined state.
-		*/
-		virtual void enter() = 0;
-	
-		/*! Exits the state machine. Leaves the state machine with a defined state.
-		*/
-		virtual void exit() = 0;
-	
-		/*! Start a run-to-completion cycle.
-		*/
-		virtual void runCycle() = 0;
-		
-		/*! Checks whether the state machine is active. 
-	 	    A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-	 	*/	
-		virtual	sc_boolean isActive() const = 0;
-		
-		/*! Checks if all active states are final. 
-	 		If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-	 	*/
-		virtual sc_boolean isFinal() const = 0;
-};
-
-inline StatemachineInterface::~StatemachineInterface() {}
-
-#endif /* STATEMACHINEINTERFACE_H_ */

+ 0 - 24
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LogicalOrTestsTest/sc_types.h

@@ -1,24 +0,0 @@
-
-#ifndef SC_TYPES_H_
-#define SC_TYPES_H_
-
-/* As <cstdint> is not available on all platforms we choose to include <stdint.h>. You can switch to <cstdint> by commenting and uncommenting the lines below.*/
-// #include <cstdint>
-#include <stdint.h>
-
-
-#define sc_string      char*
-
-typedef int_fast16_t   sc_short;
-typedef uint_fast16_t  sc_ushort;
-typedef int32_t        sc_integer;
-typedef double         sc_real;
-typedef bool           sc_boolean;
-
-typedef intptr_t       sc_eventid;
-
-#ifndef null
-	#define null 0
-#endif
-
-#endif /* SC_TYPES_H_ */

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "NamedInterfaceAccess.h"
 #include "sc_types.h"
-NamedInterfaceAccess* statechart;
+static NamedInterfaceAccess* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,19 +31,19 @@ TEST_F(StatemachineTest, SafeOpenSuccess) {
 	
 	statechart->enter();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	statechart->getSCI_User()->raise_numberPressed(3l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	statechart->getSCI_User()->raise_numberPressed(7l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	statechart->getSCI_User()->raise_numberPressed(5l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getSCI_Safe()->isRaised_open());
 	

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NullCheckTest/NullCheckTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "NullCheck.h"
 #include "sc_types.h"
-NullCheck* statechart;
+static NullCheck* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,7 +33,7 @@ TEST_F(StatemachineTest, SimpleNullCheckTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(NullCheck::main_region_A));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(NullCheck::main_region_B));
 	

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/Operations.sgen

@@ -1,8 +1,8 @@
 GeneratorModel for yakindu::cpp {
 	statechart Operations {
 		feature Outlet {
-			targetProject = "org.yakindu.sct.generator.cpp.test"
-			targetFolder = "gtests/OperationsTest"
+			targetProject = "gtests"
+			targetFolder = "OperationsTest"
 		}
 		feature FunctionInlining {
 			inlineReactions = false

+ 22 - 27
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/OperationsTest.cc

@@ -17,8 +17,6 @@
 using ::testing::AtLeast;
 using ::testing::Return;
 using ::testing::_;
-using ::testing::WithArg;
-using ::testing::Invoke;
 
 class MockInternal : public Operations::InternalSCI_OCB {
 	public:
@@ -54,17 +52,21 @@ class MockDefault : public Operations::DefaultSCI_OCB {
 	MOCK_METHOD1(unnamedOperation5a, sc_string(sc_string param1));
 	MOCK_METHOD0(alwaysTrue, sc_boolean());
 };
-class ReturnInternalOperation3a
-{
-	public:
-		sc_real static internalOperation3a_1(sc_real param1){
-			return param1 +1.0;
-		}
+static Operations* statechart;
+
+class StatemachineTest : public ::testing::Test{
+	protected:
+	virtual void SetUp() {
+		statechart = new Operations();
+		statechart->init();
+	}
+	virtual void TearDown() {
+		delete statechart;
+	}
 };
 
-TEST(StatemachineTest, operationsCalled) {
-	Operations* statechart = new Operations();
-	
+
+TEST_F(StatemachineTest, operationsCalled) {
 	MockDefault defaultMock;
 	
 	MockInternal internalMock;
@@ -74,16 +76,13 @@ TEST(StatemachineTest, operationsCalled) {
 	
 	EXPECT_CALL(defaultMock, alwaysTrue()).WillRepeatedly(Return(true));
 	
-	EXPECT_CALL(internalMock, internalOperation3a(_)).WillRepeatedly(WithArg<0>(Invoke(&(ReturnInternalOperation3a
-	::internalOperation3a_1))));
-	
 	EXPECT_CALL(internalMock, internalOperation1()).Times(AtLeast(1));
 	
 	EXPECT_CALL(internalMock, InternalOperation2(4l)).Times(AtLeast(1));
 	
 	EXPECT_CALL(internalMock, internalOperation3()).Times(AtLeast(1));
 	
-	EXPECT_CALL(internalMock, internalOperation3a(_)).Times(AtLeast(1));
+	EXPECT_CALL(internalMock, internalOperation3a(1.0)).Times(AtLeast(1));
 	
 	EXPECT_CALL(internalMock, internalOperation4()).Times(AtLeast(1));
 	
@@ -91,9 +90,7 @@ TEST(StatemachineTest, operationsCalled) {
 	
 	EXPECT_CALL(internalMock, internalOperation5()).Times(AtLeast(1));
 	
-	EXPECT_CALL(internalMock, internalOperation5a("")).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, InternalOperation2(4l)).Times(AtLeast(1));
+	EXPECT_CALL(internalMock, internalOperation5a(_)).Times(AtLeast(1));
 	
 	EXPECT_CALL(interface1Mock, interfaceOperation1()).Times(AtLeast(1));
 	
@@ -109,7 +106,7 @@ TEST(StatemachineTest, operationsCalled) {
 	
 	EXPECT_CALL(interface1Mock, interfaceOperation5()).Times(AtLeast(1));
 	
-	EXPECT_CALL(interface1Mock, interfaceOperation5a("")).Times(AtLeast(1));
+	EXPECT_CALL(interface1Mock, interfaceOperation5a(_)).Times(AtLeast(1));
 	
 	EXPECT_CALL(defaultMock, unnamedInterfaceOperation1()).Times(AtLeast(1));
 	
@@ -125,32 +122,30 @@ TEST(StatemachineTest, operationsCalled) {
 	
 	EXPECT_CALL(defaultMock, unnamedOperation5()).Times(AtLeast(1));
 	
-	EXPECT_CALL(defaultMock, unnamedOperation5a("")).Times(AtLeast(1));
+	EXPECT_CALL(defaultMock, unnamedOperation5a(_)).Times(AtLeast(1));
 	
 	statechart->setDefaultSCI_OCB(&defaultMock);
 	statechart->setInternalSCI_OCB(&internalMock);
 	statechart->setSCI_Interface1_OCB(&interface1Mock);
 	
-	statechart->init();
 	statechart->enter();
 	
 	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_A));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_B));
 	
-	statechart->raise_ev();
+	statechart->getDefaultSCI()->raise_ev();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_C));
 	
-	statechart->raise_ev();
+	statechart->getDefaultSCI()->raise_ev();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_D));
 	
-	delete statechart;
 }

+ 0 - 193
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/OperationsTestCustom.cc

@@ -1,193 +0,0 @@
-/**
-* Copyright (c) 2014 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 "Operations.h"
-#include "Operations_OCB.h"
-
-bool internalOperation1Called;
-bool internalOperation2Called;
-sc_integer internalOp2Param;
-
-bool interfaceOperation1Called;
-bool interfaceOperation2Called;
-sc_integer interfaceOp2Param;
-
-bool unnamedInterfaceOperation1Called;
-bool unnamedInterfaceOperation2Called;
-sc_integer unnamedInterfaceOp2Param;
-
-char myChar;
-
-TEST(StatemachineTest, OperationCallback) {
-	internalOperation1Called = false;
-	internalOperation2Called = false;
-	internalOp2Param = 0;
-
-	interfaceOperation1Called = false;
-	interfaceOperation2Called = false;
-	interfaceOp2Param = 0;
-
-	unnamedInterfaceOperation1Called = false;
-	unnamedInterfaceOperation2Called = false;
-	unnamedInterfaceOp2Param = 0;
-
-	Operations* statechart = new Operations();
-	statechart->setDefaultSCI_OCB(new DefaultCallBack());
-	statechart->setInternalSCI_OCB(new InternalCallBack());
-	statechart->setSCI_Interface1_OCB(new Interface1CallBack());
-
-	statechart->init();
-	statechart->enter();
-
-	statechart->runCycle();
-	EXPECT_TRUE(internalOperation1Called);
-	EXPECT_TRUE(internalOperation2Called);
-	EXPECT_TRUE(internalOp2Param == 4);
-
-	statechart->raise_ev();
-	statechart->runCycle();
-	EXPECT_TRUE(interfaceOperation1Called);
-	EXPECT_TRUE(interfaceOperation2Called);
-	EXPECT_TRUE(interfaceOp2Param == 4);
-
-	statechart->raise_ev();
-	statechart->runCycle();
-	EXPECT_TRUE(unnamedInterfaceOperation1Called);
-	EXPECT_TRUE(unnamedInterfaceOperation2Called);
-	EXPECT_TRUE(unnamedInterfaceOp2Param == 4);
-
-	delete statechart;
-}
-
-void InternalCallBack::internalOperation1() {
-	internalOperation1Called = true;
-}
-
-sc_boolean InternalCallBack::InternalOperation2(sc_integer param1) {
-	internalOperation2Called = true;
-	internalOp2Param = param1;
-	return true;
-}
-
-sc_real InternalCallBack::internalOperation3() {
-	return 0.0d;
-}
-
-sc_real InternalCallBack::internalOperation3a(sc_real param1) {
-	return 0.0d;
-}
-
-sc_integer InternalCallBack::internalOperation4() {
-	return 0;
-}
-
-sc_integer InternalCallBack::internalOperation4a(sc_integer param1) {
-	return 0;
-}
-
-sc_string InternalCallBack::internalOperation5() {
-	return &myChar;
-}
-
-sc_string InternalCallBack::internalOperation5a(sc_string param1) {
-	return &myChar;
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-void Interface1CallBack::interfaceOperation1() {
-	interfaceOperation1Called = true;
-}
-
-sc_boolean Interface1CallBack::InterfaceOperation2(sc_integer param1) {
-	interfaceOperation2Called = true;
-	interfaceOp2Param = param1;
-	return true;
-}
-
-sc_real Interface1CallBack::interfaceOperation3() {
-	return 0.0d;
-}
-
-sc_real Interface1CallBack::interfaceOperation3a(sc_real param1) {
-	return 0.0d;
-}
-
-sc_integer Interface1CallBack::interfaceOperation4() {
-	return 0;
-}
-
-sc_integer Interface1CallBack::interfaceOperation4a(sc_integer param1) {
-	return 0;
-}
-
-sc_string Interface1CallBack::interfaceOperation5() {
-	return &myChar;
-}
-
-sc_string Interface1CallBack::interfaceOperation5a(sc_string param1) {
-	return &myChar;
-}
-
-
-
-
-
-void DefaultCallBack::unnamedInterfaceOperation1() {
-	unnamedInterfaceOperation1Called = true;
-}
-
-sc_boolean DefaultCallBack::UnnamedInterfaceOperation2(sc_integer param1) {
-	unnamedInterfaceOperation2Called = true;
-	unnamedInterfaceOp2Param = param1;
-	return true;
-}
-
-sc_real DefaultCallBack::unnamedOperation3() {
-	return 0.0d;
-}
-
-sc_real DefaultCallBack::unnamedOperation3a(sc_real param1) {
-	return 0.0d;
-}
-
-sc_integer DefaultCallBack::unnamedOperation4() {
-	return 0;
-}
-
-sc_integer DefaultCallBack::unnamedOperation4a(sc_integer param1) {
-	return 0;
-}
-
-sc_string DefaultCallBack::unnamedOperation5() {
-	return &myChar;
-}
-
-sc_string DefaultCallBack::unnamedOperation5a(sc_string param1) {
-	return &myChar;
-}
-
-sc_boolean DefaultCallBack::alwaysTrue() {
-	return true;
-}
-

+ 0 - 70
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTest/Operations_OCB.h

@@ -1,70 +0,0 @@
-#include "Operations.h"
-
-class InternalCallBack : public Operations::InternalSCI_OCB {
-
-	public:
-
-		void internalOperation1();
-
-		sc_boolean InternalOperation2(sc_integer param1);
-
-		sc_real internalOperation3();
-
-		sc_real internalOperation3a(sc_real param1);
-
-		sc_integer internalOperation4();
-
-		sc_integer internalOperation4a(sc_integer param1);
-
-		sc_string internalOperation5();
-
-		sc_string internalOperation5a(sc_string param1);
-
-};
-
-class Interface1CallBack : public Operations::SCI_Interface1_OCB {
-	public:
-
-		void interfaceOperation1();
-
-		sc_boolean InterfaceOperation2(sc_integer param1);
-
-		sc_real interfaceOperation3();
-
-		sc_real interfaceOperation3a(sc_real param1);
-
-		sc_integer interfaceOperation4();
-
-		sc_integer interfaceOperation4a(sc_integer param1);
-
-		sc_string interfaceOperation5();
-
-		sc_string interfaceOperation5a(sc_string param1);
-
-};
-
-class DefaultCallBack : public Operations::DefaultSCI_OCB {
-
-	public:
-
-		void unnamedInterfaceOperation1();
-
-		sc_boolean UnnamedInterfaceOperation2(sc_integer param1);
-		
-		sc_boolean unnamedOperation2(sc_integer param1);
-
-		sc_real unnamedOperation3();
-
-		sc_real unnamedOperation3a(sc_real param1);
-
-		sc_integer unnamedOperation4();
-
-		sc_integer unnamedOperation4a(sc_integer param1);
-
-		sc_string unnamedOperation5();
-
-		sc_string unnamedOperation5a(sc_string param1);
-
-		sc_boolean alwaysTrue();
-};
-

+ 0 - 400
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/Operations.cpp

@@ -1,400 +0,0 @@
-
-#include "Operations.h"
-#include <string.h>
-
-/*! \file Implementation of the state machine 'Operations'
-*/
-
-Operations::Operations()
-{
-	
-	ifaceInternalSCI_OCB = null;
-	ifaceInterface1_OCB = null;
-	iface_OCB = null;
-	
-	stateConfVectorPosition = 0;
-	
-}
-
-Operations::~Operations()
-{
-}
-
-
-void Operations::init()
-{
-	for (int i = 0; i < maxOrthogonalStates; ++i)
-		stateConfVector[i] = Operations_last_state;
-	
-	stateConfVectorPosition = 0;
-
-	clearInEvents();
-	clearOutEvents();
-	
-	/* Default init sequence for statechart Operations */
-	ifaceInternalSCI.myBool = false;
-}
-
-void Operations::enter()
-{
-	/* Default enter sequence for statechart Operations */
-	enseq_main_region_default();
-}
-
-void Operations::exit()
-{
-	/* Default exit sequence for statechart Operations */
-	exseq_main_region();
-}
-
-sc_boolean Operations::isActive() const
-{
-	return stateConfVector[0] != Operations_last_state;
-}
-
-/* 
- * Always returns 'false' since this state machine can never become final.
- */
-sc_boolean Operations::isFinal() const
-{
-   return false;}
-
-void Operations::runCycle()
-{
-	
-	clearOutEvents();
-	
-	for (stateConfVectorPosition = 0;
-		stateConfVectorPosition < maxOrthogonalStates;
-		stateConfVectorPosition++)
-		{
-			
-		switch (stateConfVector[stateConfVectorPosition])
-		{
-		case main_region_B :
-		{
-			react_main_region_B();
-			break;
-		}
-		case main_region_C :
-		{
-			react_main_region_C();
-			break;
-		}
-		case main_region_D :
-		{
-			react_main_region_D();
-			break;
-		}
-		case main_region_A :
-		{
-			react_main_region_A();
-			break;
-		}
-		default:
-			break;
-		}
-	}
-	
-	clearInEvents();
-}
-
-void Operations::clearInEvents()
-{
-	iface.ev_raised = false;
-}
-
-void Operations::clearOutEvents()
-{
-}
-
-
-sc_boolean Operations::isStateActive(OperationsStates state) const
-{
-	switch (state)
-	{
-		case main_region_B : 
-			return (sc_boolean) (stateConfVector[0] == main_region_B
-			);
-		case main_region_C : 
-			return (sc_boolean) (stateConfVector[0] == main_region_C
-			);
-		case main_region_D : 
-			return (sc_boolean) (stateConfVector[0] == main_region_D
-			);
-		case main_region_A : 
-			return (sc_boolean) (stateConfVector[0] == main_region_A
-			);
-		default: return false;
-	}
-}
-
-
-sc_boolean Operations::InternalSCI::get_myBool() const
-{
-	return myBool;
-}
-
-void Operations::InternalSCI::set_myBool(sc_boolean value)
-{
-	myBool = value;
-}
-
-void Operations::setInternalSCI_OCB(InternalSCI_OCB* operationCallback)
-{
-	ifaceInternalSCI_OCB = operationCallback;
-}
-Operations::SCI_Interface1* Operations::getSCI_Interface1()
-{
-	return &ifaceInterface1;
-}
-
-
-void Operations::setSCI_Interface1_OCB(SCI_Interface1_OCB* operationCallback)
-{
-	ifaceInterface1_OCB = operationCallback;
-}
-Operations::DefaultSCI* Operations::getDefaultSCI()
-{
-	return &iface;
-}
-
-void Operations::DefaultSCI::raise_ev()
-{
-	ev_raised = true;
-}
-
-void Operations::raise_ev()
-{
-	iface.raise_ev();
-}
-
-
-void Operations::setDefaultSCI_OCB(DefaultSCI_OCB* operationCallback)
-{
-	iface_OCB = operationCallback;
-}
-
-// implementations of all internal functions
-
-sc_boolean Operations::check_main_region_B_tr0_tr0()
-{
-	return (iface.ev_raised) && (iface_OCB->alwaysTrue());
-}
-
-sc_boolean Operations::check_main_region_C_tr0_tr0()
-{
-	return iface.ev_raised;
-}
-
-sc_boolean Operations::check_main_region_A_tr0_tr0()
-{
-	return true;
-}
-
-void Operations::effect_main_region_B_tr0()
-{
-	exseq_main_region_B();
-	enseq_main_region_C_default();
-}
-
-void Operations::effect_main_region_C_tr0()
-{
-	exseq_main_region_C();
-	enseq_main_region_D_default();
-}
-
-void Operations::effect_main_region_A_tr0()
-{
-	exseq_main_region_A();
-	enseq_main_region_B_default();
-}
-
-/* Entry action for state 'B'. */
-void Operations::enact_main_region_B()
-{
-	/* Entry action for state 'B'. */
-	ifaceInternalSCI_OCB->internalOperation1();
-	ifaceInternalSCI.myBool = ifaceInternalSCI_OCB->InternalOperation2(4);
-	ifaceInternalSCI_OCB->internalOperation3();
-	ifaceInternalSCI_OCB->internalOperation3a(1.0);
-	ifaceInternalSCI_OCB->internalOperation4();
-	ifaceInternalSCI_OCB->internalOperation4a(5);
-	ifaceInternalSCI_OCB->internalOperation5();
-	ifaceInternalSCI_OCB->internalOperation5a("");
-}
-
-/* Entry action for state 'C'. */
-void Operations::enact_main_region_C()
-{
-	/* Entry action for state 'C'. */
-	ifaceInterface1_OCB->interfaceOperation1();
-	ifaceInterface1_OCB->InterfaceOperation2(4);
-	ifaceInterface1_OCB->interfaceOperation3();
-	ifaceInterface1_OCB->interfaceOperation3a(1.0);
-	ifaceInterface1_OCB->interfaceOperation4();
-	ifaceInterface1_OCB->interfaceOperation4a(5);
-	ifaceInterface1_OCB->interfaceOperation5();
-	ifaceInterface1_OCB->interfaceOperation5a("");
-}
-
-/* Entry action for state 'D'. */
-void Operations::enact_main_region_D()
-{
-	/* Entry action for state 'D'. */
-	iface_OCB->unnamedInterfaceOperation1();
-	iface_OCB->UnnamedInterfaceOperation2(4);
-	iface_OCB->unnamedOperation3();
-	iface_OCB->unnamedOperation3a(1.0);
-	iface_OCB->unnamedOperation4();
-	iface_OCB->unnamedOperation4a(5);
-	iface_OCB->unnamedOperation5();
-	iface_OCB->unnamedOperation5a("");
-}
-
-/* 'default' enter sequence for state B */
-void Operations::enseq_main_region_B_default()
-{
-	/* 'default' enter sequence for state B */
-	enact_main_region_B();
-	stateConfVector[0] = main_region_B;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state C */
-void Operations::enseq_main_region_C_default()
-{
-	/* 'default' enter sequence for state C */
-	enact_main_region_C();
-	stateConfVector[0] = main_region_C;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state D */
-void Operations::enseq_main_region_D_default()
-{
-	/* 'default' enter sequence for state D */
-	enact_main_region_D();
-	stateConfVector[0] = main_region_D;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for state A */
-void Operations::enseq_main_region_A_default()
-{
-	/* 'default' enter sequence for state A */
-	stateConfVector[0] = main_region_A;
-	stateConfVectorPosition = 0;
-}
-
-/* 'default' enter sequence for region main region */
-void Operations::enseq_main_region_default()
-{
-	/* 'default' enter sequence for region main region */
-	react_main_region__entry_Default();
-}
-
-/* Default exit sequence for state B */
-void Operations::exseq_main_region_B()
-{
-	/* Default exit sequence for state B */
-	stateConfVector[0] = Operations_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state C */
-void Operations::exseq_main_region_C()
-{
-	/* Default exit sequence for state C */
-	stateConfVector[0] = Operations_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state D */
-void Operations::exseq_main_region_D()
-{
-	/* Default exit sequence for state D */
-	stateConfVector[0] = Operations_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for state A */
-void Operations::exseq_main_region_A()
-{
-	/* Default exit sequence for state A */
-	stateConfVector[0] = Operations_last_state;
-	stateConfVectorPosition = 0;
-}
-
-/* Default exit sequence for region main region */
-void Operations::exseq_main_region()
-{
-	/* Default exit sequence for region main region */
-	/* Handle exit of all possible states (of Operations.main_region) at position 0... */
-	switch(stateConfVector[ 0 ])
-	{
-		case main_region_B :
-		{
-			exseq_main_region_B();
-			break;
-		}
-		case main_region_C :
-		{
-			exseq_main_region_C();
-			break;
-		}
-		case main_region_D :
-		{
-			exseq_main_region_D();
-			break;
-		}
-		case main_region_A :
-		{
-			exseq_main_region_A();
-			break;
-		}
-		default: break;
-	}
-}
-
-/* The reactions of state B. */
-void Operations::react_main_region_B()
-{
-	/* The reactions of state B. */
-	if (check_main_region_B_tr0_tr0())
-	{ 
-		effect_main_region_B_tr0();
-	} 
-}
-
-/* The reactions of state C. */
-void Operations::react_main_region_C()
-{
-	/* The reactions of state C. */
-	if (check_main_region_C_tr0_tr0())
-	{ 
-		effect_main_region_C_tr0();
-	} 
-}
-
-/* The reactions of state D. */
-void Operations::react_main_region_D()
-{
-	/* The reactions of state D. */
-}
-
-/* The reactions of state A. */
-void Operations::react_main_region_A()
-{
-	/* The reactions of state A. */
-	effect_main_region_A_tr0();
-}
-
-/* Default react sequence for initial entry  */
-void Operations::react_main_region__entry_Default()
-{
-	/* Default react sequence for initial entry  */
-	enseq_main_region_A_default();
-}
-
-

+ 0 - 239
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/Operations.h

@@ -1,239 +0,0 @@
-
-#ifndef OPERATIONS_H_
-#define OPERATIONS_H_
-
-#include "sc_types.h"
-#include "StatemachineInterface.h"
-
-/*! \file Header of the state machine 'Operations'.
-*/
-
-class Operations : public StatemachineInterface
-{
-	
-	public:
-		
-		Operations();
-		
-		~Operations();
-		
-		/*! Enumeration of all states */ 
-		typedef enum
-		{
-			main_region_B,
-			main_region_C,
-			main_region_D,
-			main_region_A,
-			Operations_last_state
-		} OperationsStates;
-		
-		
-		//! Inner class for internal interface scope operation callbacks.
-		class InternalSCI_OCB
-		{
-			public:
-				virtual ~InternalSCI_OCB() = 0;
-				
-				virtual void internalOperation1() = 0;
-				
-				virtual sc_boolean InternalOperation2(sc_integer param1) = 0;
-				
-				virtual sc_real internalOperation3() = 0;
-				
-				virtual sc_real internalOperation3a(sc_real param1) = 0;
-				
-				virtual sc_integer internalOperation4() = 0;
-				
-				virtual sc_integer internalOperation4a(sc_integer param1) = 0;
-				
-				virtual sc_string internalOperation5() = 0;
-				
-				virtual sc_string internalOperation5a(sc_string param1) = 0;
-		};
-		
-		/*! Set the working instance of the operation callback interface 'InternalSCI_OCB'. */
-		void setInternalSCI_OCB(InternalSCI_OCB* operationCallback);
-		//! Inner class for Interface1 interface scope.
-		class SCI_Interface1
-		{
-			
-			public:
-				
-			private:
-				friend class Operations;
-		};
-				
-				//! Inner class for Interface1 interface scope operation callbacks.
-				class SCI_Interface1_OCB
-				{
-					public:
-						virtual ~SCI_Interface1_OCB() = 0;
-						
-						virtual void interfaceOperation1() = 0;
-						
-						virtual sc_boolean InterfaceOperation2(sc_integer param1) = 0;
-						
-						virtual sc_real interfaceOperation3() = 0;
-						
-						virtual sc_real interfaceOperation3a(sc_real param1) = 0;
-						
-						virtual sc_integer interfaceOperation4() = 0;
-						
-						virtual sc_integer interfaceOperation4a(sc_integer param1) = 0;
-						
-						virtual sc_string interfaceOperation5() = 0;
-						
-						virtual sc_string interfaceOperation5a(sc_string param1) = 0;
-				};
-				
-				/*! Set the working instance of the operation callback interface 'SCI_Interface1_OCB'. */
-				void setSCI_Interface1_OCB(SCI_Interface1_OCB* operationCallback);
-		
-		/*! Returns an instance of the interface class 'SCI_Interface1'. */
-		SCI_Interface1* getSCI_Interface1();
-		
-		//! Inner class for default interface scope.
-		class DefaultSCI
-		{
-			
-			public:
-				/*! Raises the in event 'ev' that is defined in the default interface scope. */
-				void raise_ev();
-				
-				
-			private:
-				friend class Operations;
-				sc_boolean ev_raised;
-		};
-				
-				//! Inner class for default interface scope operation callbacks.
-				class DefaultSCI_OCB
-				{
-					public:
-						virtual ~DefaultSCI_OCB() = 0;
-						
-						virtual void unnamedInterfaceOperation1() = 0;
-						
-						virtual sc_boolean UnnamedInterfaceOperation2(sc_integer param1) = 0;
-						
-						virtual sc_real unnamedOperation3() = 0;
-						
-						virtual sc_real unnamedOperation3a(sc_real param1) = 0;
-						
-						virtual sc_integer unnamedOperation4() = 0;
-						
-						virtual sc_integer unnamedOperation4a(sc_integer param1) = 0;
-						
-						virtual sc_string unnamedOperation5() = 0;
-						
-						virtual sc_string unnamedOperation5a(sc_string param1) = 0;
-						
-						virtual sc_boolean alwaysTrue() = 0;
-				};
-				
-				/*! Set the working instance of the operation callback interface 'DefaultSCI_OCB'. */
-				void setDefaultSCI_OCB(DefaultSCI_OCB* operationCallback);
-		
-		/*! Returns an instance of the interface class 'DefaultSCI'. */
-		DefaultSCI* getDefaultSCI();
-		
-		/*! Raises the in event 'ev' that is defined in the default interface scope. */
-		void raise_ev();
-		
-		
-		/*
-		 * Functions inherited from StatemachineInterface
-		 */
-		virtual void init();
-		
-		virtual void enter();
-		
-		virtual void exit();
-		
-		virtual void runCycle();
-		
-		/*!
-		* Checks if the state machine is active (until 2.4.1 this method was used for states).
-		* A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-		*/
-		virtual sc_boolean isActive() const;
-		
-		
-		/*!
-		* Checks if all active states are final. 
-		* If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-		*/
-		virtual sc_boolean isFinal() const;
-		
-		
-		/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
-		sc_boolean isStateActive(OperationsStates state) const;
-	
-	private:
-	
-		//! Inner class for internal interface scope.
-		class InternalSCI
-		{
-			
-			public:
-				/*! Gets the value of the variable 'myBool' that is defined in the internal scope. */
-				sc_boolean get_myBool() const;
-				
-				/*! Sets the value of the variable 'myBool' that is defined in the internal scope. */
-				void set_myBool(sc_boolean value);
-				
-				
-			private:
-				friend class Operations;
-				sc_boolean myBool;
-		};
-	
-		//! the maximum number of orthogonal states defines the dimension of the state configuration vector.
-		static const sc_integer maxOrthogonalStates = 1;
-		
-		
-		OperationsStates stateConfVector[maxOrthogonalStates];
-		
-		sc_ushort stateConfVectorPosition;
-		
-		InternalSCI ifaceInternalSCI;
-		InternalSCI_OCB* ifaceInternalSCI_OCB;
-		SCI_Interface1 ifaceInterface1;
-		SCI_Interface1_OCB* ifaceInterface1_OCB;
-		DefaultSCI iface;
-		DefaultSCI_OCB* iface_OCB;
-		
-		// prototypes of all internal functions
-		
-		sc_boolean check_main_region_B_tr0_tr0();
-		sc_boolean check_main_region_C_tr0_tr0();
-		sc_boolean check_main_region_A_tr0_tr0();
-		void effect_main_region_B_tr0();
-		void effect_main_region_C_tr0();
-		void effect_main_region_A_tr0();
-		void enact_main_region_B();
-		void enact_main_region_C();
-		void enact_main_region_D();
-		void enseq_main_region_B_default();
-		void enseq_main_region_C_default();
-		void enseq_main_region_D_default();
-		void enseq_main_region_A_default();
-		void enseq_main_region_default();
-		void exseq_main_region_B();
-		void exseq_main_region_C();
-		void exseq_main_region_D();
-		void exseq_main_region_A();
-		void exseq_main_region();
-		void react_main_region_B();
-		void react_main_region_C();
-		void react_main_region_D();
-		void react_main_region_A();
-		void react_main_region__entry_Default();
-		void clearInEvents();
-		void clearOutEvents();
-		
-};
-inline Operations::InternalSCI_OCB::~InternalSCI_OCB() {}
-inline Operations::SCI_Interface1_OCB::~SCI_Interface1_OCB() {}
-inline Operations::DefaultSCI_OCB::~DefaultSCI_OCB() {}
-#endif /* OPERATIONS_H_ */

+ 0 - 19
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/Operations.sgen

@@ -1,19 +0,0 @@
-GeneratorModel for yakindu::cpp {
-	statechart Operations {
-		feature Outlet {
-			targetProject = "gtests"
-			targetFolder = "OperationsTestTest"
-		}
-		feature FunctionInlining {
-			inlineReactions = false
-			inlineEntryActions = false
-			inlineEnterSequences = false 
-			inlineExitActions = false
-			inlineExitSequences = false
-			inlineChoices = false
-			inlineEntries = false
-			inlineEnterRegion = false
-			inlineExitRegion = false
-		}
-	}
-}

+ 0 - 151
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/OperationsTestTest.cc

@@ -1,151 +0,0 @@
-/**
-* Copyright (c) 2017 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 "Operations.h"
-#include "sc_types.h"
-#include "gmock/gmock.h"
-
-using ::testing::AtLeast;
-using ::testing::Return;
-using ::testing::_;
-
-class MockInternal : public Operations::InternalSCI_OCB {
-	public:
-	MOCK_METHOD0(internalOperation1, void());
-	MOCK_METHOD1(InternalOperation2, sc_boolean(sc_integer param1));
-	MOCK_METHOD0(internalOperation3, sc_real());
-	MOCK_METHOD1(internalOperation3a, sc_real(sc_real param1));
-	MOCK_METHOD0(internalOperation4, sc_integer());
-	MOCK_METHOD1(internalOperation4a, sc_integer(sc_integer param1));
-	MOCK_METHOD0(internalOperation5, sc_string());
-	MOCK_METHOD1(internalOperation5a, sc_string(sc_string param1));
-};
-class MockInterface1 : public Operations::SCI_Interface1_OCB {
-	public:
-	MOCK_METHOD0(interfaceOperation1, void());
-	MOCK_METHOD1(InterfaceOperation2, sc_boolean(sc_integer param1));
-	MOCK_METHOD0(interfaceOperation3, sc_real());
-	MOCK_METHOD1(interfaceOperation3a, sc_real(sc_real param1));
-	MOCK_METHOD0(interfaceOperation4, sc_integer());
-	MOCK_METHOD1(interfaceOperation4a, sc_integer(sc_integer param1));
-	MOCK_METHOD0(interfaceOperation5, sc_string());
-	MOCK_METHOD1(interfaceOperation5a, sc_string(sc_string param1));
-};
-class MockDefault : public Operations::DefaultSCI_OCB {
-	public:
-	MOCK_METHOD0(unnamedInterfaceOperation1, void());
-	MOCK_METHOD1(UnnamedInterfaceOperation2, sc_boolean(sc_integer param1));
-	MOCK_METHOD0(unnamedOperation3, sc_real());
-	MOCK_METHOD1(unnamedOperation3a, sc_real(sc_real param1));
-	MOCK_METHOD0(unnamedOperation4, sc_integer());
-	MOCK_METHOD1(unnamedOperation4a, sc_integer(sc_integer param1));
-	MOCK_METHOD0(unnamedOperation5, sc_string());
-	MOCK_METHOD1(unnamedOperation5a, sc_string(sc_string param1));
-	MOCK_METHOD0(alwaysTrue, sc_boolean());
-};
-Operations* statechart;
-
-class StatemachineTest : public ::testing::Test{
-	protected:
-	virtual void SetUp() {
-		statechart = new Operations();
-		statechart->init();
-	}
-	virtual void TearDown() {
-		delete statechart;
-	}
-};
-
-
-TEST_F(StatemachineTest, operationsCalled) {
-	MockDefault defaultMock;
-	
-	MockInternal internalMock;
-	
-	MockInterface1 interface1Mock;
-	
-	
-	EXPECT_CALL(defaultMock, alwaysTrue()).WillRepeatedly(Return(true));
-	
-	EXPECT_CALL(internalMock, internalOperation1()).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, InternalOperation2(4l)).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, internalOperation3()).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, internalOperation3a(1.0)).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, internalOperation4()).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, internalOperation4a(5l)).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, internalOperation5()).Times(AtLeast(1));
-	
-	EXPECT_CALL(internalMock, internalOperation5a(_)).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, interfaceOperation1()).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, InterfaceOperation2(4l)).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, interfaceOperation3()).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, interfaceOperation3a(1.0)).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, interfaceOperation4()).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, interfaceOperation4a(5l)).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, interfaceOperation5()).Times(AtLeast(1));
-	
-	EXPECT_CALL(interface1Mock, interfaceOperation5a(_)).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, unnamedInterfaceOperation1()).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, UnnamedInterfaceOperation2(4l)).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, unnamedOperation3()).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, unnamedOperation3a(1.0)).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, unnamedOperation4()).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, unnamedOperation4a(5l)).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, unnamedOperation5()).Times(AtLeast(1));
-	
-	EXPECT_CALL(defaultMock, unnamedOperation5a(_)).Times(AtLeast(1));
-	
-	statechart->setDefaultSCI_OCB(&defaultMock);
-	statechart->setInternalSCI_OCB(&internalMock);
-	statechart->setSCI_Interface1_OCB(&interface1Mock);
-	
-	statechart->enter();
-	
-	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_A));
-	
-	statechart->runCycle();
-	
-	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_B));
-	
-	statechart->raise_ev();
-	
-	statechart->runCycle();
-	
-	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_C));
-	
-	statechart->raise_ev();
-	
-	statechart->runCycle();
-	
-	EXPECT_TRUE(statechart->isStateActive(Operations::main_region_D));
-	
-}

+ 0 - 42
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/StatemachineInterface.h

@@ -1,42 +0,0 @@
-
-#ifndef STATEMACHINEINTERFACE_H_
-#define STATEMACHINEINTERFACE_H_
-
-/*! \file Basic interface for state machines.
- */
-class StatemachineInterface
-{
-	public:
-	
-		virtual ~StatemachineInterface() = 0;
-		
-		/*! Initializes the state machine. Used to initialize internal variables etc.
-		*/
-		virtual void init() = 0;
-	
-		/*! Enters the state machine. Sets the state machine into a defined state.
-		*/
-		virtual void enter() = 0;
-	
-		/*! Exits the state machine. Leaves the state machine with a defined state.
-		*/
-		virtual void exit() = 0;
-	
-		/*! Start a run-to-completion cycle.
-		*/
-		virtual void runCycle() = 0;
-		
-		/*! Checks whether the state machine is active. 
-	 	    A state machine is active if it has been entered. It is inactive if it has not been entered at all or if it has been exited.
-	 	*/	
-		virtual	sc_boolean isActive() const = 0;
-		
-		/*! Checks if all active states are final. 
-	 		If there are no active states then the state machine is considered being inactive. In this case this method returns false.
-	 	*/
-		virtual sc_boolean isFinal() const = 0;
-};
-
-inline StatemachineInterface::~StatemachineInterface() {}
-
-#endif /* STATEMACHINEINTERFACE_H_ */

+ 0 - 24
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/OperationsTestTest/sc_types.h

@@ -1,24 +0,0 @@
-
-#ifndef SC_TYPES_H_
-#define SC_TYPES_H_
-
-/* As <cstdint> is not available on all platforms we choose to include <stdint.h>. You can switch to <cstdint> by commenting and uncommenting the lines below.*/
-// #include <cstdint>
-#include <stdint.h>
-
-
-#define sc_string      char*
-
-typedef int_fast16_t   sc_short;
-typedef uint_fast16_t  sc_ushort;
-typedef int32_t        sc_integer;
-typedef double         sc_real;
-typedef bool           sc_boolean;
-
-typedef intptr_t       sc_eventid;
-
-#ifndef null
-	#define null 0
-#endif
-
-#endif /* SC_TYPES_H_ */

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "OutEventLifeCycle.h"
 #include "sc_types.h"
-OutEventLifeCycle* statechart;
+static OutEventLifeCycle* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -27,10 +27,10 @@ class StatemachineTest : public ::testing::Test{
 
 void init(bool sndCycle){
 	statechart->enter();
-	statechart->raise_e();
-	statechart->runCycle();
+	statechart->getDefaultSCI()->raise_e();
+	statechart->runCycle();;
 	if (sndCycle) {
-		statechart->runCycle();
+		statechart->runCycle();;
 	}
 }
 
@@ -39,9 +39,9 @@ TEST_F(StatemachineTest, availableAfterCycle) {
 	
 	statechart->enter();
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->isRaised_f());
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "Parenthesis.h"
 #include "sc_types.h"
-Parenthesis* statechart;
+static Parenthesis* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "PriorityValues.h"
 #include "sc_types.h"
-PriorityValues* statechart;
+static PriorityValues* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,9 +33,9 @@ TEST_F(StatemachineTest, transitionPriority) {
 	
 	EXPECT_TRUE(statechart->isStateActive(PriorityValues::main_region_A));
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(PriorityValues::main_region_C));
 	
@@ -47,9 +47,9 @@ TEST_F(StatemachineTest, regionPriority) {
 	
 	EXPECT_TRUE(statechart->isStateActive(PriorityValues::someRegion_A));
 	
-	statechart->raise_event2();
+	statechart->getDefaultSCI()->raise_event2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(PriorityValues::someRegion_B));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "RaiseEvent.h"
 #include "sc_types.h"
-RaiseEvent* statechart;
+static RaiseEvent* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,11 +35,11 @@ TEST_F(StatemachineTest, raiseEvent) {
 	
 	EXPECT_TRUE(statechart->isStateActive(RaiseEvent::main_region_StateA));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(RaiseEvent::second_region_StateB));
 	

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ReadOnlyVariableTest/ReadOnlyVariableTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ReadOnlyVariable.h"
 #include "sc_types.h"
-ReadOnlyVariable* statechart;
+static ReadOnlyVariable* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -49,7 +49,7 @@ TEST_F(StatemachineTest, ReadOnlyVariableTest) {
 	
 	EXPECT_TRUE(statechart->getSCI_A()->get_myReal()== 1.1);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ReadOnlyVariable::main_region_StateB));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "STextKeywordsInStatesAndRegions.h"
 #include "sc_types.h"
-STextKeywordsInStatesAndRegions* statechart;
+static STextKeywordsInStatesAndRegions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -71,9 +71,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -115,9 +115,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -159,9 +159,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -203,9 +203,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -247,9 +247,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -291,9 +291,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -335,9 +335,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -379,9 +379,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -423,9 +423,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -467,9 +467,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -511,9 +511,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -555,9 +555,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -599,9 +599,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -643,9 +643,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -687,9 +687,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -731,9 +731,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -775,9 +775,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -819,9 +819,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -863,9 +863,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_raise));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	
@@ -907,9 +907,9 @@ TEST_F(StatemachineTest, activeCheckWithSTextNamedStates) {
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::active_valueof));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(STextKeywordsInStatesAndRegions::default_namespace));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "SameNameDifferentRegion.h"
 #include "sc_types.h"
-SameNameDifferentRegion* statechart;
+static SameNameDifferentRegion* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,17 +33,17 @@ TEST_F(StatemachineTest, sameNameDifferenRegionTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(SameNameDifferentRegion::main_region_StateA));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SameNameDifferentRegion::main_region_StateB));
 	
 	EXPECT_TRUE(statechart->isStateActive(SameNameDifferentRegion::main_region_StateB_r1_StateA));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SameNameDifferentRegion::main_region_StateB));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ShallowHistory.h"
 #include "sc_types.h"
-ShallowHistory* statechart;
+static ShallowHistory* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,61 +31,61 @@ TEST_F(StatemachineTest, shallowHistoryTest) {
 	
 	statechart->enter();
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->raise_event3();
+	statechart->getDefaultSCI()->raise_event3();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->raise_event5();
+	statechart->getDefaultSCI()->raise_event5();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->raise_event7();
+	statechart->getDefaultSCI()->raise_event7();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(ShallowHistory::mainRegion_State1));
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State7__region0_State9));
 	
-	statechart->raise_event6();
+	statechart->getDefaultSCI()->raise_event6();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State7__region0_State9));
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State6));
 	
-	statechart->raise_event5();
+	statechart->getDefaultSCI()->raise_event5();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State7__region0_State8));
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State7__region0_State9));
 	
-	statechart->raise_event2();
+	statechart->getDefaultSCI()->raise_event2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State7__region0_State9));
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistory::mainRegion_State1));
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State6));
 	
 	EXPECT_TRUE(!statechart->isStateActive(ShallowHistory::mainRegion_State1));
 	
-	statechart->raise_event5();
+	statechart->getDefaultSCI()->raise_event5();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(ShallowHistory::mainRegion_State2__region0_State4__region0_State6));
 	

+ 21 - 21
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/ShallowHistoryWithDeepEntryTest/ShallowHistoryWithDeepEntryTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ShallowHistoryWithDeepEntry.h"
 #include "sc_types.h"
-ShallowHistoryWithDeepEntry* statechart;
+static ShallowHistoryWithDeepEntry* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,21 +33,21 @@ TEST_F(StatemachineTest, noDeepEntryWithinHistory) {
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Y));
 	
-	statechart->raise_toZ();
+	statechart->getDefaultSCI()->raise_toZ();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_A));
 	
-	statechart->raise_toY();
+	statechart->getDefaultSCI()->raise_toY();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Y));
 	
-	statechart->raise_toZ();
+	statechart->getDefaultSCI()->raise_toZ();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_A));
 	
@@ -59,29 +59,29 @@ TEST_F(StatemachineTest, deepEntryWithinHistory) {
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Y));
 	
-	statechart->raise_toZ();
+	statechart->getDefaultSCI()->raise_toZ();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_A));
 	
-	statechart->raise_toC();
+	statechart->getDefaultSCI()->raise_toC();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_B__region0_C));
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_B));
 	
-	statechart->raise_toY();
+	statechart->getDefaultSCI()->raise_toY();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Y));
 	
-	statechart->raise_toZ();
+	statechart->getDefaultSCI()->raise_toZ();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_B__region0_C));
 	
@@ -95,23 +95,23 @@ TEST_F(StatemachineTest, directDeepEntryIntoHistory) {
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Y));
 	
-	statechart->raise_toC();
+	statechart->getDefaultSCI()->raise_toC();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_B__region0_C));
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_B));
 	
-	statechart->raise_toY();
+	statechart->getDefaultSCI()->raise_toY();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Y));
 	
-	statechart->raise_toZ();
+	statechart->getDefaultSCI()->raise_toZ();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ShallowHistoryWithDeepEntry::main_region_Z__region0_B__region0_C));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "SimpleEvent.h"
 #include "sc_types.h"
-SimpleEvent* statechart;
+static SimpleEvent* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,13 +35,13 @@ TEST_F(StatemachineTest, simpleEventTest) {
 	
 	EXPECT_TRUE(5l== 5l);
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SimpleEvent::main_region_B)) << "Expected B to be active" ;
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->isStateActive(SimpleEvent::main_region_B));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "SimpleHierachy.h"
 #include "sc_types.h"
-SimpleHierachy* statechart;
+static SimpleHierachy* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,13 +33,13 @@ TEST_F(StatemachineTest, simpleHierachyTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(SimpleHierachy::main_region_A));
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SimpleHierachy::main_region_B));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "StateIsActive.h"
 #include "sc_types.h"
-StateIsActive* statechart;
+static StateIsActive* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,11 +35,11 @@ TEST_F(StatemachineTest, stateIsActive) {
 	
 	EXPECT_TRUE(statechart->isStateActive(StateIsActive::R2_R2A));
 	
-	statechart->raise_event1();
+	statechart->getDefaultSCI()->raise_event1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(StateIsActive::R1_R1B));
 	

+ 1 - 1
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StatechartActiveTest/StatechartActiveTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "StatechartActive.h"
 #include "sc_types.h"
-StatechartActive* statechart;
+static StatechartActive* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "StatechartLocalReactions.h"
 #include "sc_types.h"
-StatechartLocalReactions* statechart;
+static StatechartLocalReactions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -43,7 +43,7 @@ TEST_F(StatemachineTest, statechartLocalReactionsTest) {
 		else {
 			EXPECT_TRUE(statechart->isStateActive(StatechartLocalReactions::main_region_S2));
 		}
-		statechart->runCycle();
+		statechart->runCycle();;
 	}
 	
 }

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

@@ -0,0 +1,36 @@
+/**
+* Copyright (c) 2017 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 "StatechartKeywords.h"
+#include "sc_types.h"
+static StatechartKeywords* statechart;
+
+class StatemachineTest : public ::testing::Test{
+	protected:
+	virtual void SetUp() {
+		statechart = new StatechartKeywords();
+		statechart->init();
+	}
+	virtual void TearDown() {
+		delete statechart;
+	}
+};
+
+
+TEST_F(StatemachineTest, statemachineKeywords) {
+	
+	
+	statechart->enter();
+	
+	EXPECT_TRUE(statechart->isStateActive(StatechartKeywords::main_region_Timer));
+	
+}

+ 2 - 2
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/StaticChoiceTest/StaticChoiceTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "StaticChoice.h"
 #include "sc_types.h"
-StaticChoice* statechart;
+static StaticChoice* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,6 +33,6 @@ TEST_F(StatemachineTest, StaticChoiceTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(StaticChoice::main_region_Start));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 }

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "StringExpressions.h"
 #include "sc_types.h"
-StringExpressions* statechart;
+static StringExpressions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -37,9 +37,9 @@ TEST_F(StatemachineTest, StringExpressionsTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(StringExpressions::main_region_AssignmentChecked));
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(StringExpressions::main_region_VarToVarCompareSucceeded));
 	
@@ -51,9 +51,9 @@ TEST_F(StatemachineTest, StringExpressionsTest) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_stringVarNotEqual());
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(StringExpressions::main_region_VarToConstCompareSucceeded));
 	
@@ -65,9 +65,9 @@ TEST_F(StatemachineTest, StringExpressionsTest) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_stringVarNotEqual());
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(StringExpressions::main_region_ConstToVarCompareSucceeded));
 	
@@ -79,9 +79,9 @@ TEST_F(StatemachineTest, StringExpressionsTest) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_stringVarNotEqual());
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(StringExpressions::main_region_ConstToConstCompareSucceeded));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "SyncFork.h"
 #include "sc_types.h"
-SyncFork* statechart;
+static SyncFork* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,9 +33,9 @@ TEST_F(StatemachineTest, syncForkTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncFork::main_region_A));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncFork::main_region_B));
 	
@@ -43,9 +43,9 @@ TEST_F(StatemachineTest, syncForkTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncFork::main_region_B_r2_D1));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncFork::main_region_B));
 	
@@ -53,15 +53,15 @@ TEST_F(StatemachineTest, syncForkTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncFork::main_region_B_r2_D2));
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncFork::main_region_A));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncFork::main_region_B));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "SyncJoin.h"
 #include "sc_types.h"
-SyncJoin* statechart;
+static SyncJoin* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -37,69 +37,69 @@ TEST_F(StatemachineTest, syncJoin_C2_Waits) {
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D1));
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D1));
 	
-	statechart->raise_jc();
+	statechart->getDefaultSCI()->raise_jc();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D1));
 	
-	statechart->raise_jd();
+	statechart->getDefaultSCI()->raise_jd();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D1));
 	
-	statechart->raise_jc();
+	statechart->getDefaultSCI()->raise_jc();
 	
-	statechart->raise_jd();
+	statechart->getDefaultSCI()->raise_jd();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D1));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D2));
 	
-	statechart->raise_jc();
+	statechart->getDefaultSCI()->raise_jc();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D2));
 	
-	statechart->raise_jd();
+	statechart->getDefaultSCI()->raise_jd();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D2));
 	
-	statechart->raise_jc();
+	statechart->getDefaultSCI()->raise_jc();
 	
-	statechart->raise_jd();
+	statechart->getDefaultSCI()->raise_jd();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_A));
 	
@@ -115,43 +115,43 @@ TEST_F(StatemachineTest, syncJoin_D2_Waits) {
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D1));
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C1));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D2));
 	
-	statechart->raise_jc();
+	statechart->getDefaultSCI()->raise_jc();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C1));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D2));
 	
-	statechart->raise_jd();
+	statechart->getDefaultSCI()->raise_jd();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C1));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D2));
 	
-	statechart->raise_jc();
+	statechart->getDefaultSCI()->raise_jc();
 	
-	statechart->raise_jd();
+	statechart->getDefaultSCI()->raise_jd();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C1));
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r2_D2));
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_B_r1_C2));
 	
@@ -163,17 +163,17 @@ TEST_F(StatemachineTest, doubleEntryActionBug) {
 	
 	statechart->enter();
 	
-	statechart->raise_e();
+	statechart->getDefaultSCI()->raise_e();
 	
-	statechart->raise_f();
+	statechart->getDefaultSCI()->raise_f();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
-	statechart->raise_jc();
+	statechart->getDefaultSCI()->raise_jc();
 	
-	statechart->raise_jd();
+	statechart->getDefaultSCI()->raise_jd();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(SyncJoin::main_region_A));
 	

+ 1 - 4
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TimedTransitionsTest/TimedTransitionsTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "TimedTransitions.h"
 #include "sc_types.h"
-TimedTransitions* statechart;
+static TimedTransitions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,9 +33,6 @@ TEST_F(StatemachineTest, Timer01) {
 	
 	EXPECT_TRUE(statechart->isStateActive(TimedTransitions::main_region_Start));
 	
-	/*not implemented: WaitStatement*/
-	
-	statechart->runCycle();
 	
 	EXPECT_TRUE(statechart->isStateActive(TimedTransitions::main_region_End));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "TransitionWithoutCondition.h"
 #include "sc_types.h"
-TransitionWithoutCondition* statechart;
+static TransitionWithoutCondition* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,7 +33,7 @@ TEST_F(StatemachineTest, TransitionWithoutConditionTest) {
 	
 	EXPECT_TRUE(statechart->isStateActive(TransitionWithoutCondition::main_region_A));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TransitionWithoutCondition::main_region_B));
 	

+ 5 - 5
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TriggerExpressionPrecedenceTest/TriggerExpressionPrecedenceTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "TriggerExpressionPrecedence.h"
 #include "sc_types.h"
-TriggerExpressionPrecedence* statechart;
+static TriggerExpressionPrecedence* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,7 +35,7 @@ TEST_F(StatemachineTest, unsatisfiedTriggerAndFGuardFalseOrFalse) {
 	
 	statechart->getDefaultSCI()->set_c2(false);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->getDefaultSCI()->get_e1_transition());
 	
@@ -49,7 +49,7 @@ TEST_F(StatemachineTest, unsatisfiedTriggerAndFGuardTrueOrFalse) {
 	
 	statechart->getDefaultSCI()->set_c2(false);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->getDefaultSCI()->get_e1_transition());
 	
@@ -63,7 +63,7 @@ TEST_F(StatemachineTest, unsatisfiedTriggerAndFGuardFalseOrTrue) {
 	
 	statechart->getDefaultSCI()->set_c2(true);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->getDefaultSCI()->get_e1_transition());
 	
@@ -77,7 +77,7 @@ TEST_F(StatemachineTest, unsatisfiedTriggerAndFGuardTrueOrTrue) {
 	
 	statechart->getDefaultSCI()->set_c2(true);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(!statechart->getDefaultSCI()->get_e1_transition());
 	

+ 17 - 17
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TriggerGuardExpressionsTest/TriggerGuardExpressionsTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "TriggerGuardExpressions.h"
 #include "sc_types.h"
-TriggerGuardExpressions* statechart;
+static TriggerGuardExpressions* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -33,33 +33,33 @@ TEST_F(StatemachineTest, trueGuard) {
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_A));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
 	statechart->getDefaultSCI()->set_b(true);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_B));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_A));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_B));
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_A));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_B));
 	
@@ -73,23 +73,23 @@ TEST_F(StatemachineTest, falseGuard) {
 	
 	statechart->getDefaultSCI()->set_b(false);
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_A));
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_A));
 	
-	statechart->raise_e1();
+	statechart->getDefaultSCI()->raise_e1();
 	
-	statechart->raise_e2();
+	statechart->getDefaultSCI()->raise_e2();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TriggerGuardExpressions::main_region_A));
 	

+ 5 - 5
test-plugins/org.yakindu.sct.generator.cpp.test/gtests/TypeAliasTest/TypeAliasTest.cc

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "TypeAlias.h"
 #include "sc_types.h"
-TypeAlias* statechart;
+static TypeAlias* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -35,19 +35,19 @@ TEST_F(StatemachineTest, TypeAliasTest) {
 	
 	EXPECT_TRUE(statechart->getDefaultSCI()->get_myVar()== 1l);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TypeAlias::main_region_Mid));
 	
 	EXPECT_TRUE(strcmp(statechart->getDefaultSCI()->get_myString(), "TypeSystem") == 0);
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TypeAlias::main_region_Mid2));
 	
-	statechart->raise_myEvent();
+	statechart->getDefaultSCI()->raise_myEvent();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(TypeAlias::main_region_End));
 	

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

@@ -12,7 +12,7 @@
 #include "gtest/gtest.h"
 #include "ValuedEvents.h"
 #include "sc_types.h"
-ValuedEvents* statechart;
+static ValuedEvents* statechart;
 
 class StatemachineTest : public ::testing::Test{
 	protected:
@@ -31,19 +31,19 @@ TEST_F(StatemachineTest, valuedEventsTest) {
 	
 	statechart->enter();
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(strcmp(statechart->getDefaultSCI()->get_myString(), "sct") == 0);
 	
-	statechart->raise_integerEvent( 23l);
+	statechart->getDefaultSCI()->raise_integerEvent( 23l);
 	
-	statechart->raise_booleanEvent( false);
+	statechart->getDefaultSCI()->raise_booleanEvent( false);
 	
-	statechart->raise_realEvent( 20l);
+	statechart->getDefaultSCI()->raise_realEvent( 20l);
 	
-	statechart->raise_stringEvent( "tool");
+	statechart->getDefaultSCI()->raise_stringEvent( "tool");
 	
-	statechart->runCycle();
+	statechart->runCycle();;
 	
 	EXPECT_TRUE(statechart->isStateActive(ValuedEvents::integer_region_D));
 	

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

@@ -1,76 +0,0 @@
-GeneratorModel for sctunit::cpp {
-
-	test ConstOnlyInternalScope{
-		
-		feature Outlet{ 
-			targetProject = "org.yakindu.sct.generator.cpp.test" 
-			targetFolder = "test-gen"			
-		}		
-		
-		feature JUnitWrapper {
-			WrapToJUnit =  "true"
-		}		
-		
-		feature FunctionInlining {
-			inlineReactions = false
-			inlineEntryActions = false
-			inlineExitActions = false
-			inlineEnterSequences = false
-			inlineExitSequences = false
-			inlineChoices = false
-			inlineEnterRegion = false
-			inlineExitRegion = false
-			inlineEntries = false
-		}	
-	}	
-	
-	
-	test ConstOnlyDefaultScope{
-		
-		feature Outlet{ 
-			targetProject = "org.yakindu.sct.generator.cpp.test" 
-			targetFolder = "test-gen"			
-		}		
-		
-		feature JUnitWrapper {
-			WrapToJUnit =  "true"
-		}		
-		
-		feature FunctionInlining {
-			inlineReactions = false
-			inlineEntryActions = false
-			inlineExitActions = false
-			inlineEnterSequences = false
-			inlineExitSequences = false
-			inlineChoices = false
-			inlineEnterRegion = false
-			inlineExitRegion = false
-			inlineEntries = false
-		}	
-	}		
-		
-	test ConstOnlyNamedScope{
-		
-		feature Outlet{ 
-			targetProject = "org.yakindu.sct.generator.cpp.test" 
-			targetFolder = "test-gen"			
-		}		
-		
-		feature JUnitWrapper {
-			WrapToJUnit =  "true"
-		}		
-		
-		feature FunctionInlining {
-			inlineReactions = false
-			inlineEntryActions = false
-			inlineExitActions = false
-			inlineEnterSequences = false
-			inlineExitSequences = false
-			inlineChoices = false
-			inlineEnterRegion = false
-			inlineExitRegion = false
-			inlineEntries = false
-		}	
-	}		
-		
-}

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

@@ -1,27 +0,0 @@
-GeneratorModel for sctunit::cpp {
-
-	test EntryReactionAction {
-		
-		feature Outlet{ 
-			targetProject = "org.yakindu.sct.generator.cpp.test" 
-			targetFolder = "test-gen"			
-		}	
-		
-		feature JUnitWrapper {
-			WrapToJUnit =  "true"
-		}	
-				
-		feature FunctionInlining {
-			inlineReactions = false
-			inlineEntryActions = false
-			inlineExitActions = false
-			inlineEnterSequences = false
-			inlineExitSequences = false
-			inlineChoices = false
-			inlineEnterRegion = false
-			inlineExitRegion = false
-			inlineEntries = false
-		}			
-	}
-		
-}

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

@@ -1,28 +0,0 @@
-GeneratorModel for sctunit::cpp {
-
-	test TriggerExpressionPrecedence {
-		
-		feature Outlet{ 
-			targetProject = "org.yakindu.sct.generator.cpp.test" 
-			targetFolder = "test-gen"			
-		}	
-		
-		feature JUnitWrapper {
-			WrapToJUnit =  "true"
-		}				
-				
-		feature FunctionInlining {
-			inlineReactions = false
-			inlineEntryActions = false
-			inlineExitActions = false
-			inlineEnterSequences = false
-			inlineExitSequences = false
-			inlineChoices = false
-			inlineEnterRegion = false
-			inlineExitRegion = false
-			inlineEntries = false
-		}		
-	}	
-
-		
-}

File diff suppressed because it is too large
+ 522 - 118
test-plugins/org.yakindu.sct.generator.cpp.test/model/test.sgen


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

@@ -20,7 +20,7 @@
 				<version>${tycho-version}</version>
 				<configuration>
 					<includes>
-						<include>**/AllTestsTest.class</include>
+						<include>**/AllTests.class</include>
 						<include>**/AllTestsTestCustom.class</include>
 					</includes> 
 					<useUIHarness>false</useUIHarness>

+ 6 - 6
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AllTestsTest.java

@@ -22,8 +22,8 @@ import org.junit.runners.Suite.SuiteClasses;
 	CastExpressionsTest.class,
 	ChoiceTest.class,
 	CKeywordsTest.class,
-	ConditionalExpressionTest.class,
-	ConstantsTestsTest.class,
+	ConditionalExpression.class,
+	ConstantsTests.class,
 	ConstOnlyDefaultScopeTest.class,
 	ConstOnlyInternalScopeTest.class,
 	ConstOnlyNamedScopeTest.class,
@@ -49,10 +49,10 @@ import org.junit.runners.Suite.SuiteClasses;
 	IntegerExpressionsTest.class,
 	InternalEventLifeCycleTest.class,
 	LocalReactionsTest.class,
-	LogicalAndTestsTest.class,
-	LogicalOrTestsTest.class,
+	LogicalAndTests.class,
+	LogicalOrTests.class,
 	NamedInterfaceAccessTest.class,
-	OperationsTestTest.class,
+	OperationsTest.class,
 	OutEventLifeCycleTest.class,
 	ParenthesisTest.class,
 	PriorityValuesTest.class,
@@ -77,5 +77,5 @@ import org.junit.runners.Suite.SuiteClasses;
 	ValuedEventsTest.class,
 	TypeAliasTest.class
 })
-public class AllTestsTest {
+public class AllTests {
 }

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


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