Browse Source

Added test cases for const only scope declarations

Axel Terfloth 9 years ago
parent
commit
003448fa4f

+ 26 - 0
test-plugins/org.yakindu.sct.test.models/tests/declarations/ConstOnlyDefaultScope.sctunit

@@ -0,0 +1,26 @@
+
+testgroup ConstOnlyDefaultScope for statechart declarations.ConstOnlyDefaultScope {
+
+	/*
+	 * Test is the statechart is entered correctly.
+	 */	
+	test statechartEntry { 		
+		enter		 
+		assert active(declarations.ConstOnlyDefaultScope.main_region.A)
+	
+	} 
+	
+
+	/*
+	 * Test is the statechart is entered correctly.
+	 */	
+	test stateTransition {
+		
+		enter
+		raise A.e : 1
+		cycle
+		assert active(declarations.ConstOnlyDefaultScope.main_region.B)
+		
+	}
+}
+	

+ 26 - 0
test-plugins/org.yakindu.sct.test.models/tests/declarations/ConstOnlyInternalScope.sctunit

@@ -0,0 +1,26 @@
+
+testgroup ConstOnlyInternalScope for statechart declarations.ConstOnlyInternalScope {
+
+	/*
+	 * Test is the statechart is entered correctly.
+	 */	
+	test statechartEntry { 		
+		enter		 
+		assert active(declarations.ConstOnlyInternalScope.main_region.A)
+	
+	} 
+	
+
+	/*
+	 * Test is the statechart is entered correctly.
+	 */	
+	test stateTransition {
+		
+		enter
+		raise e : 1
+		cycle
+		assert active(declarations.ConstOnlyInternalScope.main_region.B)
+		
+	}
+}
+	

+ 26 - 0
test-plugins/org.yakindu.sct.test.models/tests/declarations/ConstOnlyNamedScope.sctunit

@@ -0,0 +1,26 @@
+
+testgroup ConstOnlyNamedScope for statechart declarations.ConstOnlyNamedScope {
+
+	/*
+	 * Test is the statechart is entered correctly.
+	 */	
+	test statechartEntry { 		
+		enter		 
+		assert active(declarations.ConstOnlyNamedScope.main_region.A)
+	
+	} 
+	
+
+	/*
+	 * Test is the statechart is entered correctly.
+	 */	
+	test stateTransition {
+		
+		enter
+		raise e : 1
+		cycle
+		assert active(declarations.ConstOnlyNamedScope.main_region.B)
+		
+	}
+}
+