12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- testgroup Choice for statechart Choice {
- test elseChoiceUsingNonDefaultTransition {
- enter
-
- assert active (Choice.main_region.A)
- c = true
- raise e
-
- cycle
- assert active (Choice.main_region.C)
- }
-
- test elseChoiceUsingDefaultTransition {
- enter
-
- assert active (Choice.main_region.A)
- c = false
- raise e
-
- cycle
- assert active (Choice.main_region.B)
- }
-
- test defaultChoiceUsingNonDefaultTransition {
- enter
-
- assert active (Choice.main_region.A)
- c = true
- raise g
-
- cycle
- assert active (Choice.main_region.C)
- }
-
- test defaultChoiceUsingDefaultTransition {
- enter
-
- assert active (Choice.main_region.A)
- c = false
- raise g
-
- cycle
- assert active (Choice.main_region.B)
- }
-
- test 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 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 alwaysTrueTransitionInChoice {
- enter
-
- assert active (Choice.main_region.A)
- c = true
- raise h
-
- cycle
- assert active (Choice.main_region.C)
- }
-
-
- }
|