|
@@ -1,92 +1,94 @@
|
|
|
-package tests
|
|
|
-testclass Choice for statechart Choice {
|
|
|
-
|
|
|
- operation elseChoiceUsingNonDefaultTransition(){
|
|
|
- enter
|
|
|
-
|
|
|
- assert active (Choice.main_region.A)
|
|
|
- c = true
|
|
|
- raise e
|
|
|
-
|
|
|
- cycle
|
|
|
- assert active (Choice.main_region.C)
|
|
|
- }
|
|
|
-
|
|
|
- operation elseChoiceUsingDefaultTransition(){
|
|
|
- enter
|
|
|
-
|
|
|
- assert active (Choice.main_region.A)
|
|
|
- c = false
|
|
|
- raise e
|
|
|
-
|
|
|
- cycle
|
|
|
- assert active (Choice.main_region.B)
|
|
|
- }
|
|
|
-
|
|
|
- operation defaultChoiceUsingNonDefaultTransition(){
|
|
|
- enter
|
|
|
-
|
|
|
- assert active (Choice.main_region.A)
|
|
|
- c = true
|
|
|
- raise g
|
|
|
-
|
|
|
- cycle
|
|
|
- assert active (Choice.main_region.C)
|
|
|
- }
|
|
|
-
|
|
|
- operation defaultChoiceUsingDefaultTransition(){
|
|
|
- enter
|
|
|
-
|
|
|
- assert active (Choice.main_region.A)
|
|
|
- c = false
|
|
|
- raise g
|
|
|
-
|
|
|
- cycle
|
|
|
- assert active (Choice.main_region.B)
|
|
|
- }
|
|
|
-
|
|
|
- operation uncheckedChoiceUsingNonDefaultTransition(){
|
|
|
- enter
|
|
|
-
|
|
|
- assert active (Choice.main_region.A)
|
|
|
- c = true
|
|
|
- raise f
|
|
|
-
|
|
|
- cycle
|
|
|
- assert active (Choice.main_region.C)
|
|
|
- }
|
|
|
-
|
|
|
- /*
|
|
|
- * An outgiong transition with an empty trigger
|
|
|
- * will be handled like a default transition.
|
|
|
- */
|
|
|
- operation uncheckedChoiceUsingDefaultTransition(){
|
|
|
- enter
|
|
|
-
|
|
|
- assert active (Choice.main_region.A)
|
|
|
- c = false
|
|
|
- raise f
|
|
|
-
|
|
|
- cycle
|
|
|
- assert active (Choice.main_region.B)
|
|
|
- }
|
|
|
-
|
|
|
- /* A transition with a 'true' guard is always true and must
|
|
|
- * be used according to its predefined priority.
|
|
|
- *
|
|
|
- * This test case makes sure that default transition reordering
|
|
|
- * does not impact these transitions.
|
|
|
- */
|
|
|
- operation alwaysTrueTransitionInChoice(){
|
|
|
- enter
|
|
|
-
|
|
|
- assert active (Choice.main_region.A)
|
|
|
- c = true
|
|
|
- raise h
|
|
|
-
|
|
|
- cycle
|
|
|
- assert active (Choice.main_region.C)
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+package tests
|
|
|
+testclass Choice for statechart Choice {
|
|
|
+ @Test
|
|
|
+ operation elseChoiceUsingNonDefaultTransition(){
|
|
|
+ enter
|
|
|
+
|
|
|
+ assert active (Choice.main_region.A)
|
|
|
+ c = true
|
|
|
+ raise e
|
|
|
+
|
|
|
+ cycle
|
|
|
+ assert active (Choice.main_region.C)
|
|
|
+ }
|
|
|
+ @Test
|
|
|
+ operation elseChoiceUsingDefaultTransition(){
|
|
|
+ enter
|
|
|
+
|
|
|
+ assert active (Choice.main_region.A)
|
|
|
+ c = false
|
|
|
+ raise e
|
|
|
+
|
|
|
+ cycle
|
|
|
+ assert active (Choice.main_region.B)
|
|
|
+ }
|
|
|
+ @Test
|
|
|
+ operation defaultChoiceUsingNonDefaultTransition(){
|
|
|
+ enter
|
|
|
+
|
|
|
+ assert active (Choice.main_region.A)
|
|
|
+ c = true
|
|
|
+ raise g
|
|
|
+
|
|
|
+ cycle
|
|
|
+ assert active (Choice.main_region.C)
|
|
|
+ }
|
|
|
+ @Test
|
|
|
+ operation defaultChoiceUsingDefaultTransition(){
|
|
|
+ enter
|
|
|
+
|
|
|
+ assert active (Choice.main_region.A)
|
|
|
+ c = false
|
|
|
+ raise g
|
|
|
+
|
|
|
+ cycle
|
|
|
+ assert active (Choice.main_region.B)
|
|
|
+ }
|
|
|
+ @Test
|
|
|
+ operation uncheckedChoiceUsingNonDefaultTransition(){
|
|
|
+ enter
|
|
|
+
|
|
|
+ assert active (Choice.main_region.A)
|
|
|
+ c = true
|
|
|
+ raise f
|
|
|
+
|
|
|
+ cycle
|
|
|
+ assert active (Choice.main_region.C)
|
|
|
+ }
|
|
|
+
|
|
|
+ /*
|
|
|
+ * An outgiong transition with an empty trigger
|
|
|
+ * will be handled like a default transition.
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ operation uncheckedChoiceUsingDefaultTransition(){
|
|
|
+ enter
|
|
|
+
|
|
|
+ assert active (Choice.main_region.A)
|
|
|
+ c = false
|
|
|
+ raise f
|
|
|
+
|
|
|
+ cycle
|
|
|
+ assert active (Choice.main_region.B)
|
|
|
+ }
|
|
|
+
|
|
|
+ /* A transition with a 'true' guard is always true and must
|
|
|
+ * be used according to its predefined priority.
|
|
|
+ *
|
|
|
+ * This test case makes sure that default transition reordering
|
|
|
+ * does not impact these transitions.
|
|
|
+ */
|
|
|
+ @Test
|
|
|
+ operation alwaysTrueTransitionInChoice(){
|
|
|
+ enter
|
|
|
+
|
|
|
+ assert active (Choice.main_region.A)
|
|
|
+ c = true
|
|
|
+ raise h
|
|
|
+
|
|
|
+ cycle
|
|
|
+ assert active (Choice.main_region.C)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|