Selaa lähdekoodia

Additional test cases for named entries and entry points

terfloth@itemis.de 12 vuotta sitten
vanhempi
commit
da9a8e86bb
20 muutettua tiedostoa jossa 188 lisäystä ja 90 poistoa
  1. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AlwaysOncycle/AlwaysOncycle.cc
  2. 11 11
      test-plugins/org.yakindu.sct.generator.c.test/gtests/AssignmentAsExpression/AssignmentAsExpression.cc
  3. 8 8
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BitExpressions/BitExpressions.cc
  4. 7 7
      test-plugins/org.yakindu.sct.generator.c.test/gtests/BooleanExpressions/BooleanExpressions.cc
  5. 6 6
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Choice/Choice.cc
  6. 41 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterState/EnterState.cc
  7. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/EnterState/EnterState.sgen
  8. 6 6
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransition/ExitOnSelfTransition.cc
  9. 41 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitState/ExitState.cc
  10. 8 0
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitState/ExitState.sgen
  11. 5 5
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntry/GuardedEntry.cc
  12. 3 3
      test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExit/GuardedExit.cc
  13. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycle/InEventLifeCycle.cc
  14. 19 19
      test-plugins/org.yakindu.sct.generator.c.test/gtests/IntegerExpressions/IntegerExpressions.cc
  15. 4 4
      test-plugins/org.yakindu.sct.generator.c.test/gtests/OutEventLifeCycle/OutEventLifeCycle.cc
  16. 1 1
      test-plugins/org.yakindu.sct.generator.c.test/gtests/Parenthesis/Parenthesis.cc
  17. 9 9
      test-plugins/org.yakindu.sct.generator.c.test/gtests/PerformanceTests/PerformanceTests.cc
  18. 2 2
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StatechartLocalReactions/StatechartLocalReactions.cc
  19. 4 4
      test-plugins/org.yakindu.sct.generator.c.test/gtests/StringExpressions/StringExpressions.cc
  20. 1 1
      test-plugins/org.yakindu.sct.generator.c.test/gtests/ValuedEvent/ValuedEvent.cc

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

@@ -17,13 +17,13 @@ TEST(StatemachineTest, alwaysOncycleTest) {
 	alwaysOncycle_init(&handle);
 	alwaysOncycle_enter(&handle);
 	EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateA));
-	while (alwaysOncycleIface_get_value(&handle) < 5) {
+	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) {
+	while (alwaysOncycleIface_get_value(&handle)< 5) {
 		alwaysOncycle_runCycle(&handle);
 		EXPECT_TRUE(alwaysOncycle_isActive(&handle, AlwaysOncycle_main_region_StateB));
 	}

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

@@ -17,32 +17,32 @@ TEST(StatemachineTest, simpleAssignment) {
 	assignmentAsExpression_init(&handle);
 	assignmentAsExpression_enter(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Add));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_b(&handle) == 5);
-	EXPECT_TRUE(assignmentAsExpressionIface_get_a(&handle) == 9);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_b(&handle)== 5);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_a(&handle)== 9);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Subtract));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_d(&handle) == 6);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_d(&handle)== 6);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Multiply));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_e(&handle) == 15);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_e(&handle)== 15);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Divide));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_g(&handle) == 1);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_g(&handle)== 1);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Modulo));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_i(&handle) == 1);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_i(&handle)== 1);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_Shift));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_j(&handle) == 16);
-	EXPECT_TRUE(assignmentAsExpressionIface_get_k(&handle) == 4);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_j(&handle)== 16);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_k(&handle)== 4);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_And));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_l(&handle) == 1);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_l(&handle)== 1);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_Or));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_p(&handle) == 15);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_p(&handle)== 15);
 	assignmentAsExpression_runCycle(&handle);
 	EXPECT_TRUE(assignmentAsExpression_isActive(&handle, AssignmentAsExpression_main_region_boolean_Xor));
-	EXPECT_TRUE(assignmentAsExpressionIface_get_u(&handle) == 12);
+	EXPECT_TRUE(assignmentAsExpressionIface_get_u(&handle)== 12);
 	assignmentAsExpression_exit(&handle);
 }

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

@@ -17,15 +17,15 @@ TEST(StatemachineTest, BitExpressions) {
 	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);
+	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);
+	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);
 }

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

@@ -17,14 +17,14 @@ TEST(StatemachineTest, booleanExpressions) {
 	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);
+	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);
+	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);
 }

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

@@ -17,30 +17,30 @@ TEST(StatemachineTest, choiceTest) {
 	choice_init(&handle);
 	choice_enter(&handle);
 	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));
-	EXPECT_TRUE(choiceIface_get_value(&handle) == 4);
+	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);
+	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);
+	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);
+	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);
+	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);
+	EXPECT_TRUE(choiceIface_get_value(&handle)== 0);
 	choiceIface_raise_pressKey(&handle);
 	choice_runCycle(&handle);
 	EXPECT_TRUE(choice_isActive(&handle, Choice_main_region_A));

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

@@ -0,0 +1,41 @@
+/**
+* Copyright (c) 2013 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "EnterState.h"
+
+TEST(StatemachineTest, defaultEntry) {
+	EnterState handle;
+	enterState_init(&handle);
+	enterState_enter(&handle);
+	EXPECT_TRUE(enterState_isActive(&handle, EnterState_r_A));
+	enterStateIface_raise_e(&handle);
+	enterState_runCycle(&handle);
+	EXPECT_TRUE(enterState_isActive(&handle, EnterState_r_B_r_E));
+}
+TEST(StatemachineTest, namedEntryThroughNamedTransition) {
+	EnterState handle;
+	enterState_init(&handle);
+	enterState_enter(&handle);
+	EXPECT_TRUE(enterState_isActive(&handle, EnterState_r_A));
+	enterStateIface_raise_f(&handle);
+	enterState_runCycle(&handle);
+	EXPECT_TRUE(enterState_isActive(&handle, EnterState_r_B_r_F));
+}
+TEST(StatemachineTest, namedEntryThroughDefaultTransition) {
+	EnterState handle;
+	enterState_init(&handle);
+	enterState_enter(&handle);
+	EXPECT_TRUE(enterState_isActive(&handle, EnterState_r_A));
+	enterStateIface_raise_g(&handle);
+	enterState_runCycle(&handle);
+	EXPECT_TRUE(enterState_isActive(&handle, EnterState_r_B_r_E));
+}

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

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

+ 6 - 6
test-plugins/org.yakindu.sct.generator.c.test/gtests/ExitOnSelfTransition/ExitOnSelfTransition.cc

@@ -17,14 +17,14 @@ TEST(StatemachineTest, ExitOnSelfTransitionTest) {
 	exitOnSelfTransition_init(&handle);
 	exitOnSelfTransition_enter(&handle);
 	EXPECT_TRUE(exitOnSelfTransition_isActive(&handle, ExitOnSelfTransition_main_region_A));
-	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle) == 1);
-	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle) == 0);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle)== 1);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle)== 0);
 	exitOnSelfTransitionIface_raise_e(&handle);
 	exitOnSelfTransition_runCycle(&handle);
-	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle) == 2);
-	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle) == 1);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle)== 2);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle)== 1);
 	exitOnSelfTransitionIface_raise_f(&handle);
 	exitOnSelfTransition_runCycle(&handle);
-	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle) == 2);
-	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle) == 2);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_entryCount(&handle)== 2);
+	EXPECT_TRUE(exitOnSelfTransitionIface_get_exitCount(&handle)== 2);
 }

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

@@ -0,0 +1,41 @@
+/**
+* Copyright (c) 2013 committers of YAKINDU and others.
+* All rights reserved. This program and the accompanying materials
+* are made available under the terms of the Eclipse Public License v1.0
+* which accompanies this distribution, and is available at
+* http://www.eclipse.org/legal/epl-v10.html
+*
+* Contributors:
+*     committers of YAKINDU - initial API and implementation
+*/
+#include <string>
+#include "gtest/gtest.h"
+#include "ExitState.h"
+
+TEST(StatemachineTest, defaultExit) {
+	ExitState handle;
+	exitState_init(&handle);
+	exitState_enter(&handle);
+	EXPECT_TRUE(exitState_isActive(&handle, ExitState_r_A));
+	exitStateIface_raise_e(&handle);
+	exitState_runCycle(&handle);
+	EXPECT_TRUE(exitState_isActive(&handle, ExitState_r_E));
+}
+TEST(StatemachineTest, namedExitThroughNamedTransition) {
+	ExitState handle;
+	exitState_init(&handle);
+	exitState_enter(&handle);
+	EXPECT_TRUE(exitState_isActive(&handle, ExitState_r_A));
+	exitStateIface_raise_f(&handle);
+	exitState_runCycle(&handle);
+	EXPECT_TRUE(exitState_isActive(&handle, ExitState_r_F));
+}
+TEST(StatemachineTest, namedExitThroughDefaultTransition) {
+	ExitState handle;
+	exitState_init(&handle);
+	exitState_enter(&handle);
+	EXPECT_TRUE(exitState_isActive(&handle, ExitState_r_A));
+	exitStateIface_raise_g(&handle);
+	exitState_runCycle(&handle);
+	EXPECT_TRUE(exitState_isActive(&handle, ExitState_r_E));
+}

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

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

+ 5 - 5
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedEntry/GuardedEntry.cc

@@ -15,10 +15,10 @@
 TEST(StatemachineTest, EntryNotTakenOnStatechartEnter) {
 	GuardedEntry handle;
 	guardedEntry_init(&handle);
-	EXPECT_TRUE(guardedEntryIface_get_guard(&handle) == false);
+	EXPECT_TRUE(guardedEntryIface_get_guard(&handle)== false);
 	guardedEntry_enter(&handle);
 	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
-	EXPECT_TRUE(guardedEntryIface_get_done(&handle) == false);
+	EXPECT_TRUE(guardedEntryIface_get_done(&handle)== false);
 }
 TEST(StatemachineTest, EntryTakenOnStatechartEnter) {
 	GuardedEntry handle;
@@ -26,7 +26,7 @@ TEST(StatemachineTest, EntryTakenOnStatechartEnter) {
 	guardedEntryIface_set_guard(&handle, true);
 	guardedEntry_enter(&handle);
 	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
-	EXPECT_TRUE(guardedEntryIface_get_done(&handle) == true);
+	EXPECT_TRUE(guardedEntryIface_get_done(&handle)== true);
 }
 TEST(StatemachineTest, EntryTakenInTransition) {
 	GuardedEntry handle;
@@ -41,7 +41,7 @@ TEST(StatemachineTest, EntryTakenInTransition) {
 	guardedEntryIface_raise_e(&handle);
 	guardedEntry_runCycle(&handle);
 	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
-	EXPECT_TRUE(guardedEntryIface_get_done(&handle) );
+	EXPECT_TRUE(guardedEntryIface_get_done(&handle));
 }
 TEST(StatemachineTest, EntryNotTakenInTransition) {
 	GuardedEntry handle;
@@ -56,5 +56,5 @@ TEST(StatemachineTest, EntryNotTakenInTransition) {
 	guardedEntryIface_raise_e(&handle);
 	guardedEntry_runCycle(&handle);
 	EXPECT_TRUE(guardedEntry_isActive(&handle, GuardedEntry_main_region_A));
-	EXPECT_TRUE(!guardedEntryIface_get_done(&handle) );
+	EXPECT_TRUE(!guardedEntryIface_get_done(&handle));
 }

+ 3 - 3
test-plugins/org.yakindu.sct.generator.c.test/gtests/GuardedExit/GuardedExit.cc

@@ -17,11 +17,11 @@ TEST(StatemachineTest, ExitTaken) {
 	guardedExit_init(&handle);
 	guardedExit_enter(&handle);
 	EXPECT_TRUE(guardedExit_isActive(&handle, GuardedExit_main_region_A));
-	EXPECT_TRUE(!guardedExitIface_get_guard(&handle) );
+	EXPECT_TRUE(!guardedExitIface_get_guard(&handle));
 	guardedExitIface_raise_e(&handle);
 	guardedExit_runCycle(&handle);
 	EXPECT_TRUE(guardedExit_isActive(&handle, GuardedExit_main_region_B));
-	EXPECT_TRUE(!guardedExitIface_get_done(&handle) );
+	EXPECT_TRUE(!guardedExitIface_get_done(&handle));
 }
 TEST(StatemachineTest, ExitNotTaken) {
 	GuardedExit handle;
@@ -32,5 +32,5 @@ TEST(StatemachineTest, ExitNotTaken) {
 	guardedExitIface_raise_e(&handle);
 	guardedExit_runCycle(&handle);
 	EXPECT_TRUE(guardedExit_isActive(&handle, GuardedExit_main_region_B));
-	EXPECT_TRUE(guardedExitIface_get_done(&handle) );
+	EXPECT_TRUE(guardedExitIface_get_done(&handle));
 }

+ 2 - 2
test-plugins/org.yakindu.sct.generator.c.test/gtests/InEventLifeCycle/InEventLifeCycle.cc

@@ -17,7 +17,7 @@ TEST(StatemachineTest, eventLifeCycle) {
 	inEventLifeCycle_init(&handle);
 	inEventLifeCycle_enter(&handle);
 	inEventLifeCycleIface_raise_e(&handle);
-	EXPECT_TRUE(inEventLifeCycleIface_get_i(&handle) == 0);
+	EXPECT_TRUE(inEventLifeCycleIface_get_i(&handle)== 0);
 	inEventLifeCycle_runCycle(&handle);
-	EXPECT_TRUE(inEventLifeCycleIface_get_i(&handle) == 1);
+	EXPECT_TRUE(inEventLifeCycleIface_get_i(&handle)== 1);
 }

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

@@ -17,25 +17,25 @@ TEST(StatemachineTest, integerExpressions) {
 	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);
+	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);
+	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);
 }

+ 4 - 4
test-plugins/org.yakindu.sct.generator.c.test/gtests/OutEventLifeCycle/OutEventLifeCycle.cc

@@ -18,7 +18,7 @@ TEST(StatemachineTest, availableAfterCycle) {
 	outEventLifeCycle_enter(&handle);
 	outEventLifeCycleIface_raise_e(&handle);
 	outEventLifeCycle_runCycle(&handle);
-	EXPECT_TRUE(outEventLifeCycleIface_israised_f(&handle) );
+	EXPECT_TRUE(outEventLifeCycleIface_israised_f(&handle));
 }
 TEST(StatemachineTest, availableWithinCycle) {
 	OutEventLifeCycle handle;
@@ -26,7 +26,7 @@ TEST(StatemachineTest, availableWithinCycle) {
 	outEventLifeCycle_enter(&handle);
 	outEventLifeCycleIface_raise_e(&handle);
 	outEventLifeCycle_runCycle(&handle);
-	EXPECT_TRUE(outEventLifeCycleIface_get_f_available_in_cycle(&handle) );
+	EXPECT_TRUE(outEventLifeCycleIface_get_f_available_in_cycle(&handle));
 }
 TEST(StatemachineTest, unvailableWithin2ndCycle) {
 	OutEventLifeCycle handle;
@@ -35,7 +35,7 @@ TEST(StatemachineTest, unvailableWithin2ndCycle) {
 	outEventLifeCycleIface_raise_e(&handle);
 	outEventLifeCycle_runCycle(&handle);
 	outEventLifeCycle_runCycle(&handle);
-	EXPECT_TRUE(!outEventLifeCycleIface_get_f_available_in_next_cycle(&handle) );
+	EXPECT_TRUE(!outEventLifeCycleIface_get_f_available_in_next_cycle(&handle));
 }
 TEST(StatemachineTest, unvailableAfter2ndCycle) {
 	OutEventLifeCycle handle;
@@ -44,5 +44,5 @@ TEST(StatemachineTest, unvailableAfter2ndCycle) {
 	outEventLifeCycleIface_raise_e(&handle);
 	outEventLifeCycle_runCycle(&handle);
 	outEventLifeCycle_runCycle(&handle);
-	EXPECT_TRUE(!outEventLifeCycleIface_israised_f(&handle) );
+	EXPECT_TRUE(!outEventLifeCycleIface_israised_f(&handle));
 }

+ 1 - 1
test-plugins/org.yakindu.sct.generator.c.test/gtests/Parenthesis/Parenthesis.cc

@@ -17,5 +17,5 @@ TEST(StatemachineTest, simple) {
 	parenthesis_init(&handle);
 	parenthesis_enter(&handle);
 	EXPECT_TRUE(parenthesis_isActive(&handle, Parenthesis_mainRegion_A));
-	EXPECT_TRUE(parenthesisIface_get_erg(&handle) == 8);
+	EXPECT_TRUE(parenthesisIface_get_erg(&handle)== 8);
 }

+ 9 - 9
test-plugins/org.yakindu.sct.generator.c.test/gtests/PerformanceTests/PerformanceTests.cc

@@ -17,12 +17,12 @@ TEST(StatemachineTest, test_100_000) {
 	performanceTest_init(&handle);
 	performanceTest_enter(&handle);
 	EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
-	while (performanceTestIface_get_c(&handle) < 100000) {
+	while (performanceTestIface_get_c(&handle)< 100000) {
 		if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
 					performanceTestIface_raise_e1(&handle);;
 				  }
 				else {
-					if (performanceTestIface_get_c(&handle) %2== 0) {
+					if (performanceTestIface_get_c(&handle)%2== 0) {
 								performanceTestIface_raise_e2(&handle);;
 							  }
 							else {
@@ -32,19 +32,19 @@ TEST(StatemachineTest, test_100_000) {
 				}
 		performanceTest_runCycle(&handle);
 	}
-	EXPECT_TRUE(performanceTestIface_get_a(&handle) > 2);
+	EXPECT_TRUE(performanceTestIface_get_a(&handle)> 2);
 }
 TEST(StatemachineTest, test_1_000_000) {
 	PerformanceTest handle;
 	performanceTest_init(&handle);
 	performanceTest_enter(&handle);
 	EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
-	while (performanceTestIface_get_c(&handle) < 1000000) {
+	while (performanceTestIface_get_c(&handle)< 1000000) {
 		if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
 					performanceTestIface_raise_e1(&handle);;
 				  }
 				else {
-					if (performanceTestIface_get_c(&handle) %2== 0) {
+					if (performanceTestIface_get_c(&handle)%2== 0) {
 								performanceTestIface_raise_e2(&handle);;
 							  }
 							else {
@@ -54,19 +54,19 @@ TEST(StatemachineTest, test_1_000_000) {
 				}
 		performanceTest_runCycle(&handle);
 	}
-	EXPECT_TRUE(performanceTestIface_get_a(&handle) > 2);
+	EXPECT_TRUE(performanceTestIface_get_a(&handle)> 2);
 }
 TEST(StatemachineTest, test_10_000_000) {
 	PerformanceTest handle;
 	performanceTest_init(&handle);
 	performanceTest_enter(&handle);
 	EXPECT_TRUE(performanceTest_isActive(&handle, PerformanceTest_mr_A));
-	while (performanceTestIface_get_c(&handle) < 10000000) {
+	while (performanceTestIface_get_c(&handle)< 10000000) {
 		if (performanceTest_isActive(&handle, PerformanceTest_mr_A)) {
 					performanceTestIface_raise_e1(&handle);;
 				  }
 				else {
-					if (performanceTestIface_get_c(&handle) %2== 0) {
+					if (performanceTestIface_get_c(&handle)%2== 0) {
 								performanceTestIface_raise_e2(&handle);;
 							  }
 							else {
@@ -76,5 +76,5 @@ TEST(StatemachineTest, test_10_000_000) {
 				}
 		performanceTest_runCycle(&handle);
 	}
-	EXPECT_TRUE(performanceTestIface_get_a(&handle) > 2);
+	EXPECT_TRUE(performanceTestIface_get_a(&handle)> 2);
 }

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

@@ -18,9 +18,9 @@ TEST(StatemachineTest, statechartLocalReactionsTest) {
 	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) {
+	while (statechartLocalReactionsIface_get_myInt(&handle)< 10) {
 		EXPECT_TRUE(statechartLocalReactions_isActive(&handle, StatechartLocalReactions_region2_a));
-		if (statechartLocalReactionsIface_get_myInt(&handle) %2== 0) {
+		if (statechartLocalReactionsIface_get_myInt(&handle)%2== 0) {
 					EXPECT_TRUE(statechartLocalReactions_isActive(&handle, StatechartLocalReactions_main_region_S1));;
 				  }
 				else {

+ 4 - 4
test-plugins/org.yakindu.sct.generator.c.test/gtests/StringExpressions/StringExpressions.cc

@@ -17,11 +17,11 @@ TEST(StatemachineTest, StringExpressionsTest) {
 	stringExpressions_init(&handle);
 	stringExpressions_enter(&handle);
 	EXPECT_TRUE(stringExpressions_isActive(&handle, StringExpressions_main_region_StateA));
-	EXPECT_TRUE(strcmp(stringExpressionsIface_get_myString(&handle) , "hello") == 0);
-	EXPECT_TRUE(strcmp(stringExpressionsIface_get_myString2(&handle) , "world") == 0);
+	EXPECT_TRUE(strcmp(stringExpressionsIface_get_myString(&handle), "hello") == 0);
+	EXPECT_TRUE(strcmp(stringExpressionsIface_get_myString2(&handle), "world") == 0);
 	stringExpressionsIface_raise_e1(&handle);
 	stringExpressions_runCycle(&handle);
 	EXPECT_TRUE(stringExpressions_isActive(&handle, StringExpressions_main_region_StateB));
-	EXPECT_TRUE(stringExpressionsIface_get_equals(&handle) == false);
-	EXPECT_TRUE(stringExpressionsIface_get_notEqual(&handle) == true);
+	EXPECT_TRUE(stringExpressionsIface_get_equals(&handle)== false);
+	EXPECT_TRUE(stringExpressionsIface_get_notEqual(&handle)== true);
 }

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

@@ -19,5 +19,5 @@ TEST(StatemachineTest, valuedEventTest) {
 	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);
+	EXPECT_TRUE(valuedEventsIface_get_myVar(&handle)== 42);
 }