Browse Source

add generated org.yakindu.sct.generator.c.tests

Andreas Mülder 13 years ago
parent
commit
a79dab4703
65 changed files with 1706 additions and 278 deletions
  1. 31 31
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycle/AlwaysOncycle.cc
  2. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycle/AlwaysOncycle.sgen
  3. 30 30
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressions/BitExpressions.cc
  4. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressions/BitExpressions.sgen
  5. 29 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressions/BooleanExpressions.cc
  6. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressions/BooleanExpressions.sgen
  7. 46 46
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Choice/Choice.cc
  8. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Choice/Choice.sgen
  9. 36 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistory/DeepHistory.cc
  10. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistory/DeepHistory.sgen
  11. 34 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Guard/Guard.cc
  12. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Guard/Guard.sgen
  13. 40 40
      test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressions/IntegerExpressions.cc
  14. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressions/IntegerExpressions.sgen
  15. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Name/AlwaysOncycle.sgen
  16. 31 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Name/Name.cc
  17. 32 32
      test-plugins/org.yakindu.sct.generator.c.test/gtests/PriorityValues/PriorityValues.cc
  18. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/PriorityValues/PriorityValues.sgen
  19. 25 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/RaiseEvent/RaiseEvent.cc
  20. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/RaiseEvent/RaiseEvent.sgen
  21. 41 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/RealExpressions/RealExpressions.cc
  22. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/RealExpressions/RealExpressions.sgen
  23. 27 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SameNameDifferentRegion/SameNameDifferentRegion.cc
  24. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SameNameDifferentRegion/SameNameDifferentRegion.sgen
  25. 48 48
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ShallowHistory/ShallowHistory.cc
  26. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ShallowHistory/ShallowHistory.sgen
  27. 23 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleEvent/SimpleEvent.cc
  28. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleEvent/SimpleEvent.sgen
  29. 25 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleHierachy/SimpleHierachy.cc
  30. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleHierachy/SimpleHierachy.sgen
  31. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleHietachy/SimpleHierachy.sgen
  32. 25 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleHietachy/SimpleHietachy.cc
  33. 25 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StateIsActive/StateIsActive.cc
  34. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StateIsActive/StateIsActive.sgen
  35. 30 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StatechartLocalReactions/StatechartLocalReactions.cc
  36. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StatechartLocalReactions/StatechartLocalReactions.sgen
  37. 37 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SyncFork/SyncFork.cc
  38. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SyncFork/SyncFork.sgen
  39. 83 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SyncJoin/SyncJoin.cc
  40. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/SyncJoin/SyncJoin.sgen
  41. 22 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvent/ValuedEvent.cc
  42. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvent/ValuedEvents.sgen
  43. 22 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvents/ValuedEvents.cc
  44. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvents/ValuedEvents.sgen
  45. 25 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AllTests.java
  46. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AlwaysOncycle.java
  47. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/BitExpressions.java
  48. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/BooleanExpressions.java
  49. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/Choice.java
  50. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/DeepHistory.java
  51. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/Guard.java
  52. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/IntegerExpressions.java
  53. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/PriorityValues.java
  54. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/RaiseEvent.java
  55. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/RealExpressions.java
  56. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/SameNameDifferentRegion.java
  57. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/ShallowHistory.java
  58. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/SimpleEvent.java
  59. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/SimpleHietachy.java
  60. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/StateIsActive.java
  61. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/StatechartLocalReactions.java
  62. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/SyncFork.java
  63. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/SyncJoin.java
  64. 39 0
      test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/ValuedEvent.java
  65. 22 3
      test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/test/AllGUnitTests.java

+ 31 - 31
test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycle/AlwaysOncycle.cc

@@ -1,31 +1,31 @@
-/**
-* Copyright (c) 2012 committers of YAKINDU and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*     committers of YAKINDU - initial API and implementation
-*/
-#include "gtest/gtest.h"
-#include "AlwaysOncycle.h"
-
-TEST(StatemachineTest, alwaysOncycleTest) {
-	AlwaysOncycle handle;
-	alwaysOncycle_init(&handle);
-	alwaysOncycle_enter(&handle);
-	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
-	while (alwaysOncycleIface_get_value(&handle) < 5) {
-		alwaysOncycle_runCycle(&handle);
-		EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
-	}
-	alwaysOncycle_runCycle(&handle);
-	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
-	while (alwaysOncycleIface_get_value(&handle) < 5) {
-		alwaysOncycle_runCycle(&handle);
-		EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
-	}
-	alwaysOncycle_runCycle(&handle);
-	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
-}
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "AlwaysOncycle.h"
+
+TEST(StatemachineTest, alwaysOncycleTest) {
+	AlwaysOncycle handle;
+	alwaysOncycle_init(&handle);
+	alwaysOncycle_enter(&handle);
+	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+	while (alwaysOncycleIface_get_value(&handle) < 5) {
+		alwaysOncycle_runCycle(&handle);
+		EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+	}
+	alwaysOncycle_runCycle(&handle);
+	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
+	while (alwaysOncycleIface_get_value(&handle) < 5) {
+		alwaysOncycle_runCycle(&handle);
+		EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
+	}
+	alwaysOncycle_runCycle(&handle);
+	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+}

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

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

+ 30 - 30
test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressions/BitExpressions.cc

@@ -1,30 +1,30 @@
-/**
-* Copyright (c) 2012 committers of YAKINDU and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*     committers of YAKINDU - initial API and implementation
-*/
-#include "gtest/gtest.h"
-#include "BitExpressions.h"
-
-TEST(StatemachineTest, BitExpressions) {
-	BitExpressions handle;
-	bitExpressions_init(&handle);
-	bitExpressions_enter(&handle);
-	EXPECT_TRUE(bitExpressions_isActive(&handle, BitExpressions_main_region_StateA));
-	EXPECT_TRUE(bitExpressionsIface_get_myBit1(&handle) == 5);
-	EXPECT_TRUE(bitExpressionsIface_get_myBit2(&handle) == 7);
-	bitExpressionsIface_raise_e1(&handle);
-	bitExpressions_runCycle(&handle);
-	EXPECT_TRUE(bitExpressions_isActive(&handle, BitExpressions_main_region_StateB));
-	EXPECT_TRUE(bitExpressionsIface_get_leftBitshift(&handle) == 10);
-	EXPECT_TRUE(bitExpressionsIface_get_rightBitshift(&handle) == 2);
-	EXPECT_TRUE(bitExpressionsIface_get_complementBitshift(&handle) == - 6 );
-	EXPECT_TRUE(bitExpressionsIface_get_bitwiseAnd(&handle) == 5);
-	EXPECT_TRUE(bitExpressionsIface_get_bitwiseOr(&handle) == 7);
-	EXPECT_TRUE(bitExpressionsIface_get_bitwiseXor(&handle) == 2);
-}
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "BitExpressions.h"
+
+TEST(StatemachineTest, BitExpressions) {
+	BitExpressions handle;
+	bitExpressions_init(&handle);
+	bitExpressions_enter(&handle);
+	EXPECT_TRUE(bitExpressions_isActive(&handle, BitExpressions_main_region_StateA));
+	EXPECT_TRUE(bitExpressionsIface_get_myBit1(&handle) == 5);
+	EXPECT_TRUE(bitExpressionsIface_get_myBit2(&handle) == 7);
+	bitExpressionsIface_raise_e1(&handle);
+	bitExpressions_runCycle(&handle);
+	EXPECT_TRUE(bitExpressions_isActive(&handle, BitExpressions_main_region_StateB));
+	EXPECT_TRUE(bitExpressionsIface_get_leftBitshift(&handle) == 10);
+	EXPECT_TRUE(bitExpressionsIface_get_rightBitshift(&handle) == 2);
+	EXPECT_TRUE(bitExpressionsIface_get_complementBitshift(&handle) == - 6 );
+	EXPECT_TRUE(bitExpressionsIface_get_bitwiseAnd(&handle) == 5);
+	EXPECT_TRUE(bitExpressionsIface_get_bitwiseOr(&handle) == 7);
+	EXPECT_TRUE(bitExpressionsIface_get_bitwiseXor(&handle) == 2);
+}

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

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

+ 29 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressions/BooleanExpressions.cc

@@ -0,0 +1,29 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "BooleanExpressions.h"
+
+TEST(StatemachineTest, booleanExpressions) {
+	BooleanExpressions handle;
+	booleanExpressions_init(&handle);
+	booleanExpressions_enter(&handle);
+	EXPECT_TRUE(booleanExpressions_isActive(&handle, BooleanExpressions_main_region_StateA));
+	EXPECT_TRUE(booleanExpressionsIface_get_myBool1(&handle) == true);
+	EXPECT_TRUE(booleanExpressionsIface_get_myBool2(&handle) == false);
+	booleanExpressionsIface_raise_e1(&handle);
+	booleanExpressions_runCycle(&handle);
+	EXPECT_TRUE(booleanExpressions_isActive(&handle, BooleanExpressions_main_region_StateB));
+	EXPECT_TRUE(booleanExpressionsIface_get_and(&handle) == false);
+	EXPECT_TRUE(booleanExpressionsIface_get_or(&handle) == true);
+	EXPECT_TRUE(booleanExpressionsIface_get_not(&handle) == false);
+	EXPECT_TRUE(booleanExpressionsIface_get_equal(&handle) == false);
+	EXPECT_TRUE(booleanExpressionsIface_get_notequal(&handle) == true);
+}

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

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

+ 46 - 46
test-plugins/org.yakindu.sct.generator.c.test/gtests/Choice/Choice.cc

@@ -1,46 +1,46 @@
-/**
-* Copyright (c) 2012 committers of YAKINDU and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*     committers of YAKINDU - initial API and implementation
-*/
-#include "gtest/gtest.h"
-#include "Choice.h"
-
-TEST(StatemachineTest, choiceTest) {
-	Choice handle;
-	choice_init(&handle);
-	choice_enter(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
-	EXPECT_TRUE(choiceIface_get_value(&handle) == 4);
-	choiceIface_raise_pressKey(&handle);
-	choice_runCycle(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_B));
-	EXPECT_TRUE(choiceIface_get_value(&handle) == 3);
-	choiceIface_raise_pressKey(&handle);
-	choice_runCycle(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
-	choiceIface_raise_pressKey(&handle);
-	choice_runCycle(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_C));
-	EXPECT_TRUE(choiceIface_get_value(&handle) == 2);
-	choiceIface_raise_pressKey(&handle);
-	choice_runCycle(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_B));
-	EXPECT_TRUE(choiceIface_get_value(&handle) == 1);
-	choiceIface_raise_pressKey(&handle);
-	choice_runCycle(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
-	EXPECT_TRUE(choiceIface_get_value(&handle) == 1);
-	choiceIface_raise_pressKey(&handle);
-	choice_runCycle(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_C));
-	EXPECT_TRUE(choiceIface_get_value(&handle) == 0);
-	choiceIface_raise_pressKey(&handle);
-	choice_runCycle(&handle);
-	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
-}
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "Choice.h"
+
+TEST(StatemachineTest, choiceTest) {
+	Choice handle;
+	choice_init(&handle);
+	choice_enter(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
+	EXPECT_TRUE(choiceIface_get_value(&handle) == 4);
+	choiceIface_raise_pressKey(&handle);
+	choice_runCycle(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_B));
+	EXPECT_TRUE(choiceIface_get_value(&handle) == 3);
+	choiceIface_raise_pressKey(&handle);
+	choice_runCycle(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
+	choiceIface_raise_pressKey(&handle);
+	choice_runCycle(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_C));
+	EXPECT_TRUE(choiceIface_get_value(&handle) == 2);
+	choiceIface_raise_pressKey(&handle);
+	choice_runCycle(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_B));
+	EXPECT_TRUE(choiceIface_get_value(&handle) == 1);
+	choiceIface_raise_pressKey(&handle);
+	choice_runCycle(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
+	EXPECT_TRUE(choiceIface_get_value(&handle) == 1);
+	choiceIface_raise_pressKey(&handle);
+	choice_runCycle(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_C));
+	EXPECT_TRUE(choiceIface_get_value(&handle) == 0);
+	choiceIface_raise_pressKey(&handle);
+	choice_runCycle(&handle);
+	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
+}

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

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

+ 36 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/DeepHistory/DeepHistory.cc

@@ -0,0 +1,36 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "DeepHistory.h"
+
+TEST(StatemachineTest, deepHistoryTest) {
+	DeepHistory handle;
+	deepHistory_init(&handle);
+	deepHistory_enter(&handle);
+	deepHistoryIface_raise_event1(&handle);
+	deepHistory_runCycle(&handle);
+	deepHistoryIface_raise_event3(&handle);
+	deepHistory_runCycle(&handle);
+	deepHistoryIface_raise_event5(&handle);
+	deepHistory_runCycle(&handle);
+	deepHistoryIface_raise_event7(&handle);
+	deepHistory_runCycle(&handle);
+	EXPECT_TRUE(!deepHistory_isActive(&handle, DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(deepHistory_isActive(&handle, DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	deepHistoryIface_raise_event2(&handle);
+	deepHistory_runCycle(&handle);
+	EXPECT_TRUE(deepHistory_isActive(&handle, DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(!deepHistory_isActive(&handle, DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	deepHistoryIface_raise_event1(&handle);
+	deepHistory_runCycle(&handle);
+	EXPECT_TRUE(!deepHistory_isActive(&handle, DeepHistory_mainRegion_State1));
+	EXPECT_TRUE(deepHistory_isActive(&handle, DeepHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+}

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

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

+ 34 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/Guard/Guard.cc

@@ -0,0 +1,34 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "Guard.h"
+
+TEST(StatemachineTest, guardTest) {
+	Guard handle;
+	guard_init(&handle);
+	guard_enter(&handle);
+	EXPECT_TRUE(guard_isActive(&handle, Guard_main_region_A));
+	guardIface_raise_event1(&handle);
+	guard_runCycle(&handle);
+	EXPECT_TRUE(guard_isActive(&handle, Guard_main_region_A));
+	guardIface_raise_event2(&handle);
+	guard_runCycle(&handle);
+	EXPECT_TRUE(guard_isActive(&handle, Guard_main_region_B));
+	guardIface_raise_return(&handle);
+	guard_runCycle(&handle);
+	EXPECT_TRUE(guard_isActive(&handle, Guard_main_region_A));
+	guardIface_raise_event1(&handle);
+	guard_runCycle(&handle);
+	EXPECT_TRUE(guard_isActive(&handle, Guard_main_region_B));
+	guardIface_raise_return(&handle);
+	guard_runCycle(&handle);
+	EXPECT_TRUE(guard_isActive(&handle, Guard_main_region_A));
+}

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

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

+ 40 - 40
test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressions/IntegerExpressions.cc

@@ -1,40 +1,40 @@
-/**
-* Copyright (c) 2012 committers of YAKINDU and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*     committers of YAKINDU - initial API and implementation
-*/
-#include "gtest/gtest.h"
-#include "IntegerExpressions.h"
-
-TEST(StatemachineTest, integerExpressions) {
-	IntegerExpressions handle;
-	integerExpressions_init(&handle);
-	integerExpressions_enter(&handle);
-	EXPECT_TRUE(integerExpressions_isActive(&handle, IntegerExpressions_main_region_StateA));
-	EXPECT_TRUE(integerExpressionsIface_get_myInt1(&handle) == 10);
-	EXPECT_TRUE(integerExpressionsIface_get_myInt2(&handle) == 5);
-	integerExpressionsIface_raise_e1(&handle);
-	integerExpressions_runCycle(&handle);
-	EXPECT_TRUE(integerExpressionsIface_get_less(&handle) == false);
-	EXPECT_TRUE(integerExpressionsIface_get_greater(&handle) == true);
-	EXPECT_TRUE(integerExpressionsIface_get_equalOrLess(&handle) == false);
-	EXPECT_TRUE(integerExpressionsIface_get_equalOrGreater(&handle) == true);
-	EXPECT_TRUE(integerExpressionsIface_get_equal(&handle) == false);
-	EXPECT_TRUE(integerExpressionsIface_get_notEqual(&handle) == true);
-	EXPECT_TRUE(integerExpressionsIface_get_plus(&handle) == 15);
-	EXPECT_TRUE(integerExpressionsIface_get_minus(&handle) == 5);
-	EXPECT_TRUE(integerExpressionsIface_get_multiply(&handle) == 50);
-	EXPECT_TRUE(integerExpressionsIface_get_division(&handle) == 2);
-	EXPECT_TRUE(integerExpressionsIface_get_modulo(&handle) == 0);
-	EXPECT_TRUE(integerExpressionsIface_get_negat(&handle) == - 10 );
-	EXPECT_TRUE(integerExpressionsIface_get_multiAssign(&handle) == 20);
-	EXPECT_TRUE(integerExpressionsIface_get_divAssign(&handle) == 2);
-	EXPECT_TRUE(integerExpressionsIface_get_plusAssign(&handle) == 12);
-	EXPECT_TRUE(integerExpressionsIface_get_minusAssign(&handle) == - 8 );
-	EXPECT_TRUE(integerExpressionsIface_get_moduloAssign(&handle) == 0);
-}
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "IntegerExpressions.h"
+
+TEST(StatemachineTest, integerExpressions) {
+	IntegerExpressions handle;
+	integerExpressions_init(&handle);
+	integerExpressions_enter(&handle);
+	EXPECT_TRUE(integerExpressions_isActive(&handle, IntegerExpressions_main_region_StateA));
+	EXPECT_TRUE(integerExpressionsIface_get_myInt1(&handle) == 10);
+	EXPECT_TRUE(integerExpressionsIface_get_myInt2(&handle) == 5);
+	integerExpressionsIface_raise_e1(&handle);
+	integerExpressions_runCycle(&handle);
+	EXPECT_TRUE(integerExpressionsIface_get_less(&handle) == false);
+	EXPECT_TRUE(integerExpressionsIface_get_greater(&handle) == true);
+	EXPECT_TRUE(integerExpressionsIface_get_equalOrLess(&handle) == false);
+	EXPECT_TRUE(integerExpressionsIface_get_equalOrGreater(&handle) == true);
+	EXPECT_TRUE(integerExpressionsIface_get_equal(&handle) == false);
+	EXPECT_TRUE(integerExpressionsIface_get_notEqual(&handle) == true);
+	EXPECT_TRUE(integerExpressionsIface_get_plus(&handle) == 15);
+	EXPECT_TRUE(integerExpressionsIface_get_minus(&handle) == 5);
+	EXPECT_TRUE(integerExpressionsIface_get_multiply(&handle) == 50);
+	EXPECT_TRUE(integerExpressionsIface_get_division(&handle) == 2);
+	EXPECT_TRUE(integerExpressionsIface_get_modulo(&handle) == 0);
+	EXPECT_TRUE(integerExpressionsIface_get_negat(&handle) == - 10 );
+	EXPECT_TRUE(integerExpressionsIface_get_multiAssign(&handle) == 20);
+	EXPECT_TRUE(integerExpressionsIface_get_divAssign(&handle) == 2);
+	EXPECT_TRUE(integerExpressionsIface_get_plusAssign(&handle) == 12);
+	EXPECT_TRUE(integerExpressionsIface_get_minusAssign(&handle) == - 8 );
+	EXPECT_TRUE(integerExpressionsIface_get_moduloAssign(&handle) == 0);
+}

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

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

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/Name/AlwaysOncycle.sgen

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

+ 31 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/Name/Name.cc

@@ -0,0 +1,31 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "AlwaysOncycle.h"
+
+TEST(StatemachineTest, alwaysOncycleTest) {
+	AlwaysOncycle handle;
+	alwaysOncycle_init(&handle);
+	alwaysOncycle_enter(&handle);
+	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+	while (alwaysOncycleIface_get_value(&handle) < 5) {
+		alwaysOncycle_runCycle(&handle);
+		EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+	}
+	alwaysOncycle_runCycle(&handle);
+	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
+	while (alwaysOncycleIface_get_value(&handle) < 5) {
+		alwaysOncycle_runCycle(&handle);
+		EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
+	}
+	alwaysOncycle_runCycle(&handle);
+	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
+}

+ 32 - 32
test-plugins/org.yakindu.sct.generator.c.test/gtests/PriorityValues/PriorityValues.cc

@@ -1,32 +1,32 @@
-/**
-* Copyright (c) 2012 committers of YAKINDU and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*     committers of YAKINDU - initial API and implementation
-*/
-#include "gtest/gtest.h"
-#include "PriorityValues.h"
-
-TEST(StatemachineTest, transitionPriority) {
-	PriorityValues handle;
-	priorityValues_init(&handle);
-	priorityValues_enter(&handle);
-	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_main_region_A));
-	priorityValuesIface_raise_event1(&handle);
-	priorityValues_runCycle(&handle);
-	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_main_region_C));
-}
-TEST(StatemachineTest, regionPriority) {
-	PriorityValues handle;
-	priorityValues_init(&handle);
-	priorityValues_enter(&handle);
-	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_someRegion_A));
-	priorityValuesIface_raise_event2(&handle);
-	priorityValues_runCycle(&handle);
-	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_someRegion_B));
-	EXPECT_TRUE(!priorityValues_isActive(&handle, PriorityValues_main_region_E));
-}
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "PriorityValues.h"
+
+TEST(StatemachineTest, transitionPriority) {
+	PriorityValues handle;
+	priorityValues_init(&handle);
+	priorityValues_enter(&handle);
+	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_main_region_A));
+	priorityValuesIface_raise_event1(&handle);
+	priorityValues_runCycle(&handle);
+	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_main_region_C));
+}
+TEST(StatemachineTest, regionPriority) {
+	PriorityValues handle;
+	priorityValues_init(&handle);
+	priorityValues_enter(&handle);
+	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_someRegion_A));
+	priorityValuesIface_raise_event2(&handle);
+	priorityValues_runCycle(&handle);
+	EXPECT_TRUE(priorityValues_isActive(&handle, PriorityValues_someRegion_B));
+	EXPECT_TRUE(!priorityValues_isActive(&handle, PriorityValues_main_region_E));
+}

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

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

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

@@ -0,0 +1,25 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "RaiseEvent.h"
+
+TEST(StatemachineTest, raiseEvent) {
+	RaiseEvent handle;
+	raiseEvent_init(&handle);
+	raiseEvent_enter(&handle);
+	EXPECT_TRUE(raiseEvent_isActive(&handle, RaiseEvent_second_region_SateA));
+	EXPECT_TRUE(raiseEvent_isActive(&handle, RaiseEvent_main_region_StateA));
+	raiseEventIface_raise_e2(&handle);
+	raiseEvent_runCycle(&handle);
+	raiseEvent_runCycle(&handle);
+	EXPECT_TRUE(raiseEvent_isActive(&handle, RaiseEvent_second_region_StateB));
+	EXPECT_TRUE(raiseEvent_isActive(&handle, RaiseEvent_main_region_StateB));
+}

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

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

+ 41 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/RealExpressions/RealExpressions.cc

@@ -0,0 +1,41 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "RealExpressions.h"
+
+TEST(StatemachineTest, realExpressionsTest) {
+	RealExpressions handle;
+	realExpressions_init(&handle);
+	realExpressions_enter(&handle);
+	EXPECT_TRUE(realExpressions_isActive(&handle, RealExpressions_main_region_StateA));
+	EXPECT_TRUE(realExpressionsIface_get_myReal1(&handle) == 5.3);
+	EXPECT_TRUE(realExpressionsIface_get_myReal2(&handle) == 10.6);
+	realExpressionsIface_raise_e1(&handle);
+	realExpressions_runCycle(&handle);
+	EXPECT_TRUE(realExpressions_isActive(&handle, RealExpressions_main_region_StateB));
+	EXPECT_TRUE(realExpressionsIface_get_less(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_greater(&handle) == false);
+	EXPECT_TRUE(realExpressionsIface_get_equalOrLess(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_equalOrGreater(&handle) == false);
+	EXPECT_TRUE(realExpressionsIface_get_equal(&handle) == false);
+	EXPECT_TRUE(realExpressionsIface_get_notEqual(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_plus(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_minus(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_multiply(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_division(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_modulo(&handle) == true);
+	EXPECT_TRUE(realExpressionsIface_get_negat(&handle) == - 5.3 );
+	EXPECT_TRUE(realExpressionsIface_get_multiAssign(&handle) == 11.66);
+	EXPECT_TRUE(realExpressionsIface_get_divAssign(&handle) == 4.3);
+	EXPECT_TRUE(realExpressionsIface_get_plusAssign(&handle) == 7.5);
+	EXPECT_TRUE(realExpressionsIface_get_minusAssign(&handle) == 3.3);
+	EXPECT_TRUE(realExpressionsIface_get_moduloAssign(&handle) == true);
+}

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

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

+ 27 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/SameNameDifferentRegion/SameNameDifferentRegion.cc

@@ -0,0 +1,27 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "SameNameDifferentRegion.h"
+
+TEST(StatemachineTest, sameNameDifferenRegionTest) {
+	SameNameDifferentRegion handle;
+	sameNameDifferentRegion_init(&handle);
+	sameNameDifferentRegion_enter(&handle);
+	EXPECT_TRUE(sameNameDifferentRegion_isActive(&handle, SameNameDifferentRegion_main_region_StateA));
+	sameNameDifferentRegionIface_raise_e1(&handle);
+	sameNameDifferentRegion_runCycle(&handle);
+	EXPECT_TRUE(sameNameDifferentRegion_isActive(&handle, SameNameDifferentRegion_main_region_StateB));
+	EXPECT_TRUE(sameNameDifferentRegion_isActive(&handle, SameNameDifferentRegion_main_region_StateB_r1_StateA));
+	sameNameDifferentRegionIface_raise_e1(&handle);
+	sameNameDifferentRegion_runCycle(&handle);
+	EXPECT_TRUE(sameNameDifferentRegion_isActive(&handle, SameNameDifferentRegion_main_region_StateB));
+	EXPECT_TRUE(sameNameDifferentRegion_isActive(&handle, SameNameDifferentRegion_main_region_StateB_r1_StateB));
+}

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

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

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

@@ -1,48 +1,48 @@
-/**
-* Copyright (c) 2012 committers of YAKINDU and others.
-* All rights reserved. This program and the accompanying materials
-* are made available under the terms of the Eclipse Public License v1.0
-* which accompanies this distribution, and is available at
-* http://www.eclipse.org/legal/epl-v10.html
-*
-* Contributors:
-*     committers of YAKINDU - initial API and implementation
-*/
-#include "gtest/gtest.h"
-#include "ShallowHistory.h"
-
-TEST(StatemachineTest, shallowHistoryTest) {
-	ShallowHistory handle;
-	shallowHistory_init(&handle);
-	shallowHistory_enter(&handle);
-	shallowHistoryIface_raise_event1(&handle);
-	shallowHistory_runCycle(&handle);
-	shallowHistoryIface_raise_event3(&handle);
-	shallowHistory_runCycle(&handle);
-	shallowHistoryIface_raise_event5(&handle);
-	shallowHistory_runCycle(&handle);
-	shallowHistoryIface_raise_event7(&handle);
-	shallowHistory_runCycle(&handle);
-	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
-	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
-	shallowHistoryIface_raise_event6(&handle);
-	shallowHistory_runCycle(&handle);
-	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
-	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
-	shallowHistoryIface_raise_event5(&handle);
-	shallowHistory_runCycle(&handle);
-	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8));
-	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
-	shallowHistoryIface_raise_event2(&handle);
-	shallowHistory_runCycle(&handle);
-	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
-	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
-	shallowHistoryIface_raise_event1(&handle);
-	shallowHistory_runCycle(&handle);
-	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
-	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
-	shallowHistoryIface_raise_event5(&handle);
-	shallowHistory_runCycle(&handle);
-	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
-	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
-}
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "ShallowHistory.h"
+
+TEST(StatemachineTest, shallowHistoryTest) {
+	ShallowHistory handle;
+	shallowHistory_init(&handle);
+	shallowHistory_enter(&handle);
+	shallowHistoryIface_raise_event1(&handle);
+	shallowHistory_runCycle(&handle);
+	shallowHistoryIface_raise_event3(&handle);
+	shallowHistory_runCycle(&handle);
+	shallowHistoryIface_raise_event5(&handle);
+	shallowHistory_runCycle(&handle);
+	shallowHistoryIface_raise_event7(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
+	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	shallowHistoryIface_raise_event6(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+	shallowHistoryIface_raise_event5(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State8));
+	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	shallowHistoryIface_raise_event2(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
+	shallowHistoryIface_raise_event1(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State1));
+	shallowHistoryIface_raise_event5(&handle);
+	shallowHistory_runCycle(&handle);
+	EXPECT_TRUE(!shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State6));
+	EXPECT_TRUE(shallowHistory_isActive(&handle, ShallowHistory_mainRegion_State2__region0_State4__region0_State7__region0_State9));
+}

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

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

+ 23 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleEvent/SimpleEvent.cc

@@ -0,0 +1,23 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "SimpleEvent.h"
+
+TEST(StatemachineTest, simpleEventTest) {
+	SimpleEvent handle;
+	simpleEvent_init(&handle);
+	simpleEvent_enter(&handle);
+	EXPECT_TRUE(simpleEvent_isActive(&handle, SimpleEvent_main_region_A));
+	EXPECT_TRUE(5 == 5);
+	simpleEventIface_raise_event1(&handle);
+	simpleEvent_runCycle(&handle);
+	EXPECT_TRUE(simpleEvent_isActive(&handle, SimpleEvent_main_region_B));
+}

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

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

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

@@ -0,0 +1,25 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "SimpleHierachy.h"
+
+TEST(StatemachineTest, simpleHierachyTest) {
+	SimpleHierachy handle;
+	simpleHierachy_init(&handle);
+	simpleHierachy_enter(&handle);
+	EXPECT_TRUE(simpleHierachy_isActive(&handle, SimpleHierachy_main_region_A));
+	simpleHierachyIface_raise_event1(&handle);
+	simpleHierachyIface_raise_event1(&handle);
+	simpleHierachyIface_raise_event1(&handle);
+	simpleHierachy_runCycle(&handle);
+	EXPECT_TRUE(simpleHierachy_isActive(&handle, SimpleHierachy_main_region_B));
+	EXPECT_TRUE(simpleHierachy_isActive(&handle, SimpleHierachy_main_region_B_subregion1_B1));
+}

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

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

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/SimpleHietachy/SimpleHierachy.sgen

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

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

@@ -0,0 +1,25 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "SimpleHierachy.h"
+
+TEST(StatemachineTest, simpleHierachyTest) {
+	SimpleHierachy handle;
+	simpleHierachy_init(&handle);
+	simpleHierachy_enter(&handle);
+	EXPECT_TRUE(simpleHierachy_isActive(&handle, SimpleHierachy_main_region_A));
+	simpleHierachyIface_raise_event1(&handle);
+	simpleHierachyIface_raise_event1(&handle);
+	simpleHierachyIface_raise_event1(&handle);
+	simpleHierachy_runCycle(&handle);
+	EXPECT_TRUE(simpleHierachy_isActive(&handle, SimpleHierachy_main_region_B));
+	EXPECT_TRUE(simpleHierachy_isActive(&handle, SimpleHierachy_main_region_B_subregion1_B1));
+}

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

@@ -0,0 +1,25 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "StateIsActive.h"
+
+TEST(StatemachineTest, stateIsActive) {
+	StateIsActive handle;
+	stateIsActive_init(&handle);
+	stateIsActive_enter(&handle);
+	EXPECT_TRUE(stateIsActive_isActive(&handle, StateIsActive_R1_R1A));
+	EXPECT_TRUE(stateIsActive_isActive(&handle, StateIsActive_R2_R2A));
+	stateIsActiveIface_raise_event1(&handle);
+	stateIsActive_runCycle(&handle);
+	stateIsActive_runCycle(&handle);
+	EXPECT_TRUE(stateIsActive_isActive(&handle, StateIsActive_R1_R1B));
+	EXPECT_TRUE(stateIsActive_isActive(&handle, StateIsActive_R2_R2B));
+}

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

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

+ 30 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/StatechartLocalReactions/StatechartLocalReactions.cc

@@ -0,0 +1,30 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "StatechartLocalReactions.h"
+
+TEST(StatemachineTest, statechartLocalReactionsTest) {
+	StatechartLocalReactions handle;
+	statechartLocalReactions_init(&handle);
+	statechartLocalReactions_enter(&handle);
+	EXPECT_TRUE(statechartLocalReactions_isActive(&handle, StatechartLocalReactions_main_region_S1));
+	EXPECT_TRUE(statechartLocalReactions_isActive(&handle, StatechartLocalReactions_region2_a));
+	while (statechartLocalReactionsIface_get_myInt(&handle) < 10) {
+		EXPECT_TRUE(statechartLocalReactions_isActive(&handle, StatechartLocalReactions_region2_a));
+		if (statechartLocalReactionsIface_get_myInt(&handle) % 2 == 0) {
+					EXPECT_TRUE(statechartLocalReactions_isActive(&handle, StatechartLocalReactions_main_region_S1));;
+				  }
+				else {
+					EXPECT_TRUE(statechartLocalReactions_isActive(&handle, StatechartLocalReactions_main_region_S2));;
+				}
+		statechartLocalReactions_runCycle(&handle);
+	}
+}

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

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

+ 37 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/SyncFork/SyncFork.cc

@@ -0,0 +1,37 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "SyncFork.h"
+
+TEST(StatemachineTest, syncForkTest) {
+	SyncFork handle;
+	syncFork_init(&handle);
+	syncFork_enter(&handle);
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_A));
+	syncForkIface_raise_f(&handle);
+	syncFork_runCycle(&handle);
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B));
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B_r1_C1));
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B_r2_D1));
+	syncForkIface_raise_f(&handle);
+	syncFork_runCycle(&handle);
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B));
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B_r1_C2));
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B_r2_D2));
+	syncForkIface_raise_e(&handle);
+	syncFork_runCycle(&handle);
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_A));
+	syncForkIface_raise_f(&handle);
+	syncFork_runCycle(&handle);
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B));
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B_r1_C1));
+	EXPECT_TRUE(syncFork_isActive(&handle, SyncFork_main_region_B_r2_D1));
+}

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

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

+ 83 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/SyncJoin/SyncJoin.cc

@@ -0,0 +1,83 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "SyncJoin.h"
+
+TEST(StatemachineTest, syncJoin_C2_Waits) {
+	SyncJoin handle;
+	syncJoin_init(&handle);
+	syncJoin_enter(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D1));
+	syncJoinIface_raise_e(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D1));
+	syncJoinIface_raise_jc(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D1));
+	syncJoinIface_raise_jd(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D1));
+	syncJoinIface_raise_jc(&handle);
+	syncJoinIface_raise_jd(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D1));
+	syncJoinIface_raise_f(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+	syncJoinIface_raise_jc(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+	syncJoinIface_raise_jd(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+	syncJoinIface_raise_jc(&handle);
+	syncJoinIface_raise_jd(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_A));
+}
+TEST(StatemachineTest, syncJoin_D2_Waits) {
+	SyncJoin handle;
+	syncJoin_init(&handle);
+	syncJoin_enter(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D1));
+	syncJoinIface_raise_f(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+	syncJoinIface_raise_jc(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+	syncJoinIface_raise_jd(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+	syncJoinIface_raise_jc(&handle);
+	syncJoinIface_raise_jd(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C1));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+	syncJoinIface_raise_e(&handle);
+	syncJoin_runCycle(&handle);
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r1_C2));
+	EXPECT_TRUE(syncJoin_isActive(&handle, SyncJoin_main_region_B_r2_D2));
+}

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

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

+ 22 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvent/ValuedEvent.cc

@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "ValuedEvents.h"
+
+TEST(StatemachineTest, valuedEventTest) {
+	ValuedEvents handle;
+	valuedEvents_init(&handle);
+	valuedEvents_enter(&handle);
+	valuedEvents_runCycle(&handle);
+	EXPECT_TRUE(valuedEvents_isActive(&handle, ValuedEvents_main_region_A));
+	EXPECT_TRUE(valuedEvents_isActive(&handle, ValuedEvents__region1_C));
+	EXPECT_TRUE(valuedEventsIface_get_myVar(&handle) == 42);
+}

+ 8 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvent/ValuedEvents.sgen

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

+ 22 - 0
test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvents/ValuedEvents.cc

@@ -0,0 +1,22 @@
+/**
+* Copyright (c) 2012 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include "gtest/gtest.h"
+#include "ValuedEvents.h"
+
+TEST(StatemachineTest, valuedEventTest) {
+	ValuedEvents handle;
+	valuedEvents_init(&handle);
+	valuedEvents_enter(&handle);
+	valuedEvents_runCycle(&handle);
+	EXPECT_TRUE(valuedEvents_isActive(&handle, ValuedEvents_main_region_A));
+	EXPECT_TRUE(valuedEvents_isActive(&handle, ValuedEvents__region1_C));
+	EXPECT_TRUE(valuedEventsIface_get_myVar(&handle) == 42);
+}

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

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

+ 25 - 0
test-plugins/org.yakindu.sct.generator.c.test/src-gen/org/yakindu/sct/generator/c/test/AllTests.java

@@ -0,0 +1,25 @@
+/**
+ * Copyright (c) 2012 committers of YAKINDU and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     committers of YAKINDU - initial API and implementation
+ */
+package org.yakindu.sct.generator.c.test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+@RunWith(Suite.class)
+@SuiteClasses({AlwaysOncycle.class, BitExpressions.class,
+		BooleanExpressions.class, Choice.class, DeepHistory.class, Guard.class,
+		IntegerExpressions.class, PriorityValues.class, RaiseEvent.class,
+		SameNameDifferentRegion.class, ShallowHistory.class,
+		SimpleHietachy.class, StateIsActive.class,
+		StatechartLocalReactions.class, SyncFork.class, SyncJoin.class,
+		ValuedEvent.class, SimpleEvent.class})
+public class AllTests {
+}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

+ 22 - 3
test-plugins/org.yakindu.sct.generator.c.test/src/org/yakindu/sct/generator/c/test/AllGUnitTests.java

@@ -5,9 +5,28 @@ import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 import org.junit.runners.Suite.SuiteClasses;
 //TODO: The testsuite should be generated too
 //TODO: The testsuite should be generated too
 @RunWith(Suite.class)
 @RunWith(Suite.class)
-@SuiteClasses({ AlwaysOncycleTest.class, BitExpressionsTest.class,
-		ChoiceTest.class, IntegerExpressionsTest.class,
-		PriorityValuesTest.class, ShallowHistoryTest.class })
+@SuiteClasses({ 
+	AlwaysOncycle.class, 
+	BitExpressions.class,
+	BooleanExpressions.class,
+	Choice.class, 
+	DeepHistory.class,
+	//FeatureCalls.class,
+	Guard.class,
+	IntegerExpressions.class,
+	PriorityValues.class,
+	RaiseEvent.class,
+	//RealExpressions.class,
+	SameNameDifferentRegion.class,
+	ShallowHistory.class,
+	SimpleEvent.class,
+	SimpleHietachy.class,
+	StatechartLocalReactions.class,
+	StateIsActive.class,
+	SyncFork.class,
+	SyncJoin.class,
+	ValuedEvent.class
+	})
 public class AllGUnitTests {
 public class AllGUnitTests {
 
 
 }
 }