Kaynağa Gözat

Issue 2019 (#2031)

* Remove code unused without local events

* Add LocalEventsTest to C++

* Add NoLocalEventsTest
Rene Beckmann 7 yıl önce
ebeveyn
işleme
9437da6dcf
13 değiştirilmiş dosya ile 425 ekleme ve 166 silme
  1. 51 39
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/StatemachineHeader.xtend
  2. 6 2
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/EventDrivenCppIncludeProviderModule.xtend
  3. 10 13
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/EventDrivenStatemachineHeader.xtend
  4. 43 41
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/EventDrivenStatemachineImplementation.xtend
  5. 1 0
      plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/StatechartEvents.xtend
  6. 19 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LocalEvents/LocalEvents.sgen
  7. 64 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/LocalEvents/LocalEventsTest.cc
  8. 19 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NoLocalEvents/NoLocalEvents.sgen
  9. 64 0
      test-plugins/org.yakindu.sct.generator.cpp.test/gtests/NoLocalEvents/NoLocalEventsTest.cc
  10. 57 1
      test-plugins/org.yakindu.sct.generator.cpp.test/model/test.eventdriven.sgen
  11. 21 70
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AllTests.java
  12. 35 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/LocalEventsTest.java
  13. 35 0
      test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/NoLocalEventsTest.java

+ 51 - 39
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/StatemachineHeader.xtend

@@ -78,64 +78,72 @@ class StatemachineHeader extends org.yakindu.sct.generator.c.StatemachineHeader
 		'''
 			class «module» : «interfaceExtensions»
 			{
-				«generatePublicClassmembers»
-				«generateInnerClasses»
-				«generatePrivateClassmembers»
+				public:
+					«generatePublicClassmembers»
+				protected:
+					«generateProtectedClassmembers»
+				private:
+					«generatePrivateClassmembers»
 			};
 		'''
 	}
 
 	def protected generatePublicClassmembers(ExecutionFlow it) {
 		'''
-			public:
-				
-				«module»();
-				
-				~«module»();
-				
-				«statesEnumDecl»
-				
-				«FOR s : it.scopes»«s.createPublicScope»«ENDFOR»
-				
-				«publicFunctionPrototypes»
-				
-				/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
-				sc_boolean «stateActiveFctID»(«statesEnumType» state) const;
-				
-				«IF timed»
-					//! number of time events used by the state machine.
-					static const sc_integer «timeEventsCountConst» = «timeEvents.size»;
-					
-					//! number of time events that can be active at once.
-					static const sc_integer «timeEventsCountparallelConst» = «(it.sourceElement as Statechart).maxNumberOfParallelTimeEvents»;
-				«ENDIF»
+			«module»();
+			
+			~«module»();
+			
+			«statesEnumDecl»
+			
+			«FOR s : it.scopes»«s.createPublicScope»«ENDFOR»
+			
+			«publicFunctionPrototypes»
+			
+			/*! Checks if the specified state is active (until 2.4.1 the used method for states was calles isActive()). */
+			sc_boolean «stateActiveFctID»(«statesEnumType» state) const;
+			
+			«IF timed»
+				//! number of time events used by the state machine.
+				static const sc_integer «timeEventsCountConst» = «timeEvents.size»;
 				
+				//! number of time events that can be active at once.
+				static const sc_integer «timeEventsCountparallelConst» = «(it.sourceElement as Statechart).maxNumberOfParallelTimeEvents»;
+			«ENDIF»
+			«IF entry.innerClassVisibility == "public"»
+			
+			«generateInnerClasses»
+			«ENDIF»
+		'''
+	}
+	
+	def protected generateProtectedClassmembers(ExecutionFlow it) {
+		'''
+			«IF entry.innerClassVisibility == "protected"»
+			«generateInnerClasses»
+			«ENDIF»
 		'''
 	}
 
 	def protected generateInnerClasses(ExecutionFlow it) {
 		'''
-			«entry.innerClassVisibility»:
+			«IF (timed || hasOperationCallbacks)»
+			«copyConstructorDecl»
+			«assignmentOperatorDecl»
+			«ENDIF»
 			
-				«IF (timed || hasOperationCallbacks)»
-				«copyConstructorDecl»
-				
-				«assignmentOperatorDecl»
-				«ENDIF»
+			«FOR s : scopes.filter(typeof(InternalScope))»«s.createInterface»«ENDFOR»
 			
-				«FOR s : scopes.filter(typeof(InternalScope))»«s.createInterface»«ENDFOR»
+			«statemachineTypeDecl»
 			
-				«statemachineTypeDecl»
-				
-				«prototypes»
-				
+			«prototypes»
 		'''
 	}
 	
 	
 	def protected copyConstructorDecl(ExecutionFlow it) {
 		'''
-		«module»(const «module» &rhs);
+			«module»(const «module» &rhs);
 		'''
 	}
 	
@@ -145,8 +153,12 @@ class StatemachineHeader extends org.yakindu.sct.generator.c.StatemachineHeader
 		'''
 	}
 	
-		def protected generatePrivateClassmembers(ExecutionFlow it) {
-		''''''
+	def protected generatePrivateClassmembers(ExecutionFlow it) {
+		'''
+			«IF entry.innerClassVisibility == "private"»
+			«generateInnerClasses»
+			«ENDIF»
+		'''
 	}
 
 	def protected getInterfaceExtensions(ExecutionFlow flow) {

+ 6 - 2
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/EventDrivenCppIncludeProviderModule.xtend

@@ -1,14 +1,18 @@
 package org.yakindu.sct.generator.cpp.eventdriven
 
+import com.google.inject.Inject
 import java.util.List
 import org.yakindu.sct.generator.c.IGenArtifactConfigurations
 import org.yakindu.sct.generator.c.IncludeProvider
+import org.yakindu.sct.generator.cpp.Navigation
 import org.yakindu.sct.model.sexec.ExecutionFlow
 
 final class EventDrivenCppIncludeProviderModule implements IncludeProvider {
-
+	@Inject protected extension Navigation
 	override getIncludes(ExecutionFlow it, List<CharSequence> includes, extension IGenArtifactConfigurations artifactConfigs) {
-		includes += "#include <deque>"
+		if(hasLocalEvents) {
+			includes += "#include <deque>"
+		}
 		includes
 	}
 	

+ 10 - 13
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/EventDrivenStatemachineHeader.xtend

@@ -34,20 +34,16 @@ class EventDrivenStatemachineHeader extends StatemachineHeader {
 		'''
 	}
 	
-	override protected generatePublicClassmembers(ExecutionFlow it) {
-		'''
-		«super.generatePublicClassmembers(it)»
-		'''
-	}
-	
 	override protected generatePrivateClassmembers(ExecutionFlow it) {
 		'''
-		private:
+			«super.generatePrivateClassmembers(it)»
+			«IF hasLocalEvents»
 			std::deque<«eventNamespaceName»::SctEvent*> internalEventQueue;
 			
 			«eventNamespaceName»::SctEvent* getNextEvent();
 			
 			void dispatch_event(«eventNamespaceName»::SctEvent * event);
+			«ENDIF»
 		'''
 	}
 	
@@ -55,8 +51,9 @@ class EventDrivenStatemachineHeader extends StatemachineHeader {
 		'''
 		«super.protectedInnerClassMembers(scope)»
 		«scope.execution_flow.module()» * parent;
+		«IF scope.flow.hasLocalEvents»
 		void dispatch_event(«scope.flow.eventNamespaceName»::SctEvent * event);
-		
+		«ENDIF»
 		'''
 	}
 	
@@ -73,13 +70,13 @@ class EventDrivenStatemachineHeader extends StatemachineHeader {
 			//! Inner class for «simpleName» interface scope.
 			class «interfaceName»
 			{
-				
 				public:
-					«interfaceName»(«execution_flow.module()» * parent): 
-					«FOR init : toInit SEPARATOR ","»
-						«init»
-					«ENDFOR»
+					«interfaceName»(«execution_flow.module()» * parent):
+						«FOR init : toInit SEPARATOR ","»
+							«init»
+						«ENDFOR»
 					{}
+					
 					«FOR d : declarations»
 						«d.functionPrototypes»
 					«ENDFOR»

+ 43 - 41
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/EventDrivenStatemachineImplementation.xtend

@@ -30,6 +30,7 @@ class EventDrivenStatemachineImplementation extends StatemachineImplementation {
 	@Inject extension EventNaming eventNaming
 	
 	override additionalFunctions(ExecutionFlow it) {
+		if(!hasLocalEvents) return ''''''
 		'''
 		«nextEventFunction»
 		
@@ -40,6 +41,7 @@ class EventDrivenStatemachineImplementation extends StatemachineImplementation {
 	}
 	
 	override protected usingNamespaces(ExecutionFlow it) {
+		if(!hasLocalEvents) return ''''''
 		'''using namespace «eventNamespaceName»;'''
 	}
 	
@@ -51,31 +53,34 @@ class EventDrivenStatemachineImplementation extends StatemachineImplementation {
 			{
 				*(sc_boolean*)evid = true;
 				runCycle();
-			}				
+			}
 		}
 	'''
 	
-	override runCycleFunction(ExecutionFlow it) { 
-	'''
-		void «module»::runCycle()
-		{
-			clearOutEvents();
-			
-			SctEvent * currentEvent = getNextEvent();
-			
-			do
+	override runCycleFunction(ExecutionFlow it) {
+		if(!hasLocalEvents) {
+			return super.runCycleFunction(it)
+		}
+		'''
+			void «module»::runCycle()
 			{
-				/* Set event flags as usual */
-				dispatch_event(currentEvent);
+				clearOutEvents();
 				
-				«runCycleFunctionForLoop»
+				SctEvent * currentEvent = getNextEvent();
 				
-				/* Delete event from memory */
-				delete currentEvent;
-				clearInEvents();
-			} while((currentEvent = getNextEvent()));
-		}
-	'''
+				do
+				{
+					/* Set event flags as usual */
+					dispatch_event(currentEvent);
+					
+					«runCycleFunctionForLoop»
+					
+					/* Delete event from memory */
+					delete currentEvent;
+					clearInEvents();
+				} while((currentEvent = getNextEvent()));
+			}
+		'''
 	}
 	
 	def getNextEventFunction(ExecutionFlow it) {
@@ -127,31 +132,28 @@ class EventDrivenStatemachineImplementation extends StatemachineImplementation {
 
 	def dispatch generateInterfaceDispatchFunction(ExecutionFlow it, Scope s) {
 		'''
-			«val localEvents = s.declarations.filter(EventDefinition).filter[direction == Direction::LOCAL]»
-			«IF localEvents.size > 0»
-				void «module»::«s.interfaceName»::dispatch_event(SctEvent * event)
+			void «module»::«s.interfaceName»::dispatch_event(SctEvent * event)
+			{
+				switch(event->name)
 				{
-					switch(event->name)
-					{
-						«FOR e : localEvents»
-							case «e.eventEnumMemberName»:
-							{
-								«IF e.hasValue»
-									«e.eventClassName» * e = static_cast<«e.eventClassName»*>(event);
-									if(e != 0) {
-										internal_«e.asRaiser»(e->value);
-									}
-								«ELSE»
-									internal_«e.asRaiser»();
-								«ENDIF»
-								break;
-							}
-						«ENDFOR»
-						default:
+					«FOR e : s.localEvents»
+						case «e.eventEnumMemberName»:
+						{
+							«IF e.hasValue»
+								«e.eventClassName» * e = static_cast<«e.eventClassName»*>(event);
+								if(e != 0) {
+									internal_«e.asRaiser»(e->value);
+								}
+							«ELSE»
+								internal_«e.asRaiser»();
+							«ENDIF»
 							break;
 						}
-					}
-				«ENDIF»
+					«ENDFOR»
+					default:
+						break;
+				}
+			}
 			'''
 	}
 

+ 1 - 0
plugins/org.yakindu.sct.generator.cpp/src/org/yakindu/sct/generator/cpp/eventdriven/StatechartEvents.xtend

@@ -37,6 +37,7 @@ class StatechartEvents {
 	protected ExecutionFlow flow
 	
 	def content(ExecutionFlow it) {
+		if(!hasLocalEvents) return ''''''
 		'''
 		#ifndef «generateHeaderDefineGuard»
 		#define «generateHeaderDefineGuard»

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

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

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

@@ -0,0 +1,64 @@
+/* Generated by YAKINDU Statechart Tools code generator. */
+#include <string>
+#include "gtest/gtest.h"
+#include "LocalEvents.h"
+#include "sc_runner.h"
+#include "sc_types.h"
+
+namespace  {
+
+
+
+
+//! The timers are managed by a timer service. */
+static SctUnitRunner * runner;
+
+LocalEvents* statechart;
+
+class LocalEventsTest : public ::testing::Test{
+	protected:
+	virtual void SetUp() {
+		statechart = new LocalEvents();
+		statechart->init();
+		runner = new SctUnitRunner(
+			statechart,
+			true,
+			200
+		);
+	}
+	virtual void TearDown() {
+		delete statechart;
+		delete runner;
+	}
+};
+
+
+TEST_F(LocalEventsTest, test) {
+	
+	statechart->enter();
+	
+	EXPECT_TRUE(statechart->isStateActive(LocalEvents::localEvents_r1_Comp1_r_A1));
+	
+	EXPECT_TRUE(statechart->isStateActive(LocalEvents::localEvents_r2_Comp2_r_A2));
+	
+	statechart->getDefaultSCI()->raise_e();
+	
+	EXPECT_TRUE(statechart->isStateActive(LocalEvents::localEvents_r1_Comp1_r_D1));
+	
+	EXPECT_TRUE(statechart->isStateActive(LocalEvents::localEvents_r2_Comp2_r_D2));
+	
+	EXPECT_TRUE(statechart->getDefaultSCI()->get_cycleCountSm()== 5l);
+	
+	EXPECT_TRUE(statechart->getDefaultSCI()->get_cycleCount1()== 5l);
+	
+	EXPECT_TRUE(statechart->getDefaultSCI()->get_cycleCount2()== 5l);
+	
+	EXPECT_TRUE(statechart->getDefaultSCI()->get_checksum()== 3l);
+	
+	statechart->exit();
+	
+	
+}
+
+
+}

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

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

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

@@ -0,0 +1,64 @@
+/* Generated by YAKINDU Statechart Tools code generator. */
+#include <string>
+#include "gtest/gtest.h"
+#include "NoLocalEvents.h"
+#include "sc_runner.h"
+#include "sc_types.h"
+
+namespace  {
+
+
+
+
+//! The timers are managed by a timer service. */
+static SctUnitRunner * runner;
+
+NoLocalEvents* statechart;
+
+class NoLocalEventsTest : public ::testing::Test{
+	protected:
+	virtual void SetUp() {
+		statechart = new NoLocalEvents();
+		statechart->init();
+		runner = new SctUnitRunner(
+			statechart,
+			true,
+			200
+		);
+	}
+	virtual void TearDown() {
+		delete statechart;
+		delete runner;
+	}
+};
+
+
+TEST_F(NoLocalEventsTest, test) {
+	
+	statechart->enter();
+	
+	EXPECT_TRUE(statechart->isStateActive(NoLocalEvents::main_region_StateA));
+	
+	statechart->getDefaultSCI()->raise_e();
+	
+	EXPECT_TRUE(statechart->isStateActive(NoLocalEvents::main_region_StateB));
+	
+	statechart->getDefaultSCI()->raise_e();
+	
+	EXPECT_TRUE(statechart->isStateActive(NoLocalEvents::main_region_StateA));
+	
+	EXPECT_TRUE((statechart->getDefaultSCI()->get_x()== 0l));
+	
+	statechart->getDefaultSCI()->raise_i( 42l);
+	
+	EXPECT_TRUE(statechart->isStateActive(NoLocalEvents::main_region_StateB));
+	
+	EXPECT_TRUE((statechart->getDefaultSCI()->get_x()== 42l));
+	
+	statechart->exit();
+	
+	
+}
+
+
+}

+ 57 - 1
test-plugins/org.yakindu.sct.generator.cpp.test/model/test.eventdriven.sgen

@@ -90,6 +90,62 @@ GeneratorModel for sctunit::cpp {
 		}
 	}
 		
-
+	test LocalEvents {
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "gtests/LocalEvents"
+			libraryTargetFolder = "libraryTarget"			
+		}		
+		
+		feature JUnitWrapper {
+			WrapToJUnit =  true
+		}		
+		
+		feature FunctionInlining {
+			inlineReactions = false
+			inlineEntryActions = false
+			inlineExitActions = false
+			inlineEnterSequences = false
+			inlineExitSequences = false
+			inlineChoices = false
+			inlineEnterRegion = false
+			inlineExitRegion = false
+			inlineEntries = false
+		}
+		
+		feature SGenModel {
+			GenerateSGen = true
+		}
+	}
+	
+	test NoLocalEvents {
+		
+		feature Outlet{ 
+			targetProject = "org.yakindu.sct.generator.cpp.test" 
+			targetFolder = "gtests/NoLocalEvents"
+			libraryTargetFolder = "libraryTarget"			
+		}		
+		
+		feature JUnitWrapper {
+			WrapToJUnit =  true
+		}		
+		
+		feature FunctionInlining {
+			inlineReactions = false
+			inlineEntryActions = false
+			inlineExitActions = false
+			inlineEnterSequences = false
+			inlineExitSequences = false
+			inlineChoices = false
+			inlineEnterRegion = false
+			inlineExitRegion = false
+			inlineEntries = false
+		}
+		
+		feature SGenModel {
+			GenerateSGen = true
+		}
+	}
 
 }

+ 21 - 70
test-plugins/org.yakindu.sct.generator.cpp.test/test-gen/org/yakindu/sct/generator/cpp/test/AllTests.java

@@ -5,75 +5,26 @@ import org.junit.runners.Suite;
 import org.junit.runners.Suite.SuiteClasses;
 
 @RunWith(Suite.class)
-@SuiteClasses({
-	AlwaysOncycleTest.class,
-	AssignmentAsExpressionTest.class,
-	BitExpressionsTest.class,
-	BooleanExpressionsTest.class,
-	CastExpressionsTest.class,
-	ChoiceTest.class,
-	CKeywordsTest.class,
-	ConditionalExpression.class,
-	ConstantsTests.class,
-	ConstOnlyDefaultScopeTest.class,
-	ConstOnlyInternalScopeTest.class,
-	ConstOnlyNamedScopeTest.class,
-	ChildFirstExecutionHierarchyTest.class,
-	ChildFirstLocalReactionsTest.class,
-	DeclarationsTest.class,
-	DeepEntryTest.class,
-	DeepHistoryTest.class,
-	DynamicChoiceTest.class,
-	EmptyTransitionTest.class,
-	EnterStateTest.class,
-	EntryChoiceTest.class,
-	EntryExitSelfTransitionTest.class,
-	EntryReactionActionTest.class,
-	EventDrivenTriggeredByEventTest.class,
-	EventDrivenTriggeredByTimeEventTest.class,
-	ExitOnSelfTransitionTest.class,
-	ExitStateTest.class,
-	FeatureCallsTest.class,
-	FinalStateTest.class,
-	FloatModuloTest.class,
-	GuardTest.class,
-	GuardedEntryTest.class,
-	GuardedExitTest.class,
-	HistoryWithExitPointTest.class,
-	HistoryWithoutInitialStepTest.class,
-	InEventLifeCycleTest.class,
-	IntegerExpressionsTest.class,
-	InternalEventLifeCycleTest.class,
-	LocalReactionsTest.class,
-	LogicalAndTests.class,
-	LogicalOrTests.class,
-	NamedInterfaceAccessTest.class,
-	OperationsTest.class,
-	OutEventLifeCycleTest.class,
-	ParenthesisTest.class,
-	ParentFirstExecutionHierarchyTest.class,
-	ParentFirstLocalReactionsTest.class,
-	PriorityValuesTest.class,
-	RaiseEventTest.class,
-	ReadOnlyVariableTest.class,
-	SameNameDifferentRegionTest.class,
-	ShallowHistoryTest.class,
-	ShallowHistoryWithDeepEntryTest.class,
-	SimpleEventTest.class,
-	SimpleHierachyTest.class,
-	StatechartActiveTest.class,
-	StatechartLocalReactionsTest.class,
-	StateIsActiveTest.class,
-	StaticChoiceTest.class,
-	STextKeywordsInStatesAndRegionsTest.class,
-	StringExpressionsTest.class,
-	SyncForkTest.class,
-	SyncJoinTest.class,
-	TransitionWithoutConditionTest.class,
-	TriggerGuardExpressionsTest.class,
-	TriggerExpressionPrecedenceTest.class,
-	ValuedEventsTest.class,
-	TypeAliasTest.class
-})
+@SuiteClasses({AlwaysOncycleTest.class, AssignmentAsExpressionTest.class, BitExpressionsTest.class,
+		BooleanExpressionsTest.class, CastExpressionsTest.class, ChoiceTest.class, CKeywordsTest.class,
+		ConditionalExpression.class, ConstantsTests.class, ConstOnlyDefaultScopeTest.class,
+		ConstOnlyInternalScopeTest.class, ConstOnlyNamedScopeTest.class, ChildFirstExecutionHierarchyTest.class,
+		ChildFirstLocalReactionsTest.class, DeclarationsTest.class, DeepEntryTest.class, DeepHistoryTest.class,
+		DynamicChoiceTest.class, EmptyTransitionTest.class, EnterStateTest.class, EntryChoiceTest.class,
+		EntryExitSelfTransitionTest.class, EntryReactionActionTest.class, EventDrivenInternalEventTest.class,
+		EventDrivenTriggeredByEventTest.class, EventDrivenTriggeredByTimeEventTest.class,
+		ExitOnSelfTransitionTest.class, ExitStateTest.class, FeatureCallsTest.class, FinalStateTest.class,
+		FloatModuloTest.class, GuardTest.class, GuardedEntryTest.class, GuardedExitTest.class,
+		HistoryWithExitPointTest.class, HistoryWithoutInitialStepTest.class, InEventLifeCycleTest.class,
+		IntegerExpressionsTest.class, InternalEventLifeCycleTest.class, LocalReactionsTest.class, LogicalAndTests.class,
+		LogicalOrTests.class, LocalEventsTest.class, NamedInterfaceAccessTest.class, NoLocalEventsTest.class, OperationsTest.class,
+		OutEventLifeCycleTest.class, ParenthesisTest.class, ParentFirstExecutionHierarchyTest.class,
+		ParentFirstLocalReactionsTest.class, PriorityValuesTest.class, RaiseEventTest.class, ReadOnlyVariableTest.class,
+		SameNameDifferentRegionTest.class, ShallowHistoryTest.class, ShallowHistoryWithDeepEntryTest.class,
+		SimpleEventTest.class, SimpleHierachyTest.class, StatechartActiveTest.class, StatechartLocalReactionsTest.class,
+		StateIsActiveTest.class, StaticChoiceTest.class, STextKeywordsInStatesAndRegionsTest.class,
+		StringExpressionsTest.class, SyncForkTest.class, SyncJoinTest.class, TransitionWithoutConditionTest.class,
+		TriggerGuardExpressionsTest.class, TriggerExpressionPrecedenceTest.class, ValuedEventsTest.class,
+		TypeAliasTest.class})
 public class AllTests {
 }

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

@@ -0,0 +1,35 @@
+/* Generated by YAKINDU Statechart Tools code generator. */
+package org.yakindu.sct.generator.cpp.test;
+
+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;
+import org.yakindu.sct.generator.c.gtest.GTestHelper.Compiler;
+
+@GTest(
+	statechartBundle = "org.yakindu.sct.test.models",
+	sourceFile = "gtests/LocalEvents/LocalEventsTest.cc",
+	program = "gtests/LocalEvents/LocalEvents",
+	model = "testmodels/SCTUnit/eventdriven/LocalEvents.sct",
+	additionalFilesToCopy = {
+		"libraryTarget/sc_runner.h",
+		"libraryTarget/sc_runner.cpp"
+	},
+	additionalFilesToCompile = {
+		"LocalEvents.cpp",
+		"sc_runner.cpp"
+	}
+)
+@RunWith(GTestRunner.class)
+public class LocalEventsTest {
+protected final GTestHelper helper = new GTestHelper(this, Compiler.GPLUSPLUS);
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+
+}

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

@@ -0,0 +1,35 @@
+/* Generated by YAKINDU Statechart Tools code generator. */
+package org.yakindu.sct.generator.cpp.test;
+
+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;
+import org.yakindu.sct.generator.c.gtest.GTestHelper.Compiler;
+
+@GTest(
+	statechartBundle = "org.yakindu.sct.test.models",
+	sourceFile = "gtests/NoLocalEvents/NoLocalEventsTest.cc",
+	program = "gtests/NoLocalEvents/NoLocalEvents",
+	model = "testmodels/SCTUnit/eventdriven/NoLocalEvents.sct",
+	additionalFilesToCopy = {
+		"libraryTarget/sc_runner.h",
+		"libraryTarget/sc_runner.cpp"
+	},
+	additionalFilesToCompile = {
+		"NoLocalEvents.cpp",
+		"sc_runner.cpp"
+	}
+)
+@RunWith(GTestRunner.class)
+public class NoLocalEventsTest {
+protected final GTestHelper helper = new GTestHelper(this, Compiler.GPLUSPLUS);
+
+	@Before
+	public void setUp() {
+		helper.generate();
+		helper.compile();
+	}
+
+}