123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- testclass ParentFirstLocalReactions for statechart executionorder.ParentFirstLocalReactions {
-
- var counter : integer = 0
-
-
- @Test operation expectBottomUpLocalReactionOrder() {
- enter
- assert active(executionorder.ParentFirstLocalReactions.r.A.r.AA.r.AAA)
-
- proceed 1 cycle
- assert active(executionorder.ParentFirstLocalReactions.r.A.r.AA.r.AAA)
-
- assert sm_local == 1
- assert a_local == 2
- assert aa_local == 3
- assert aaa_local == 4
-
- }
-
-
- @Test operation expectParentLocalReactionOnChildLocalTransition() {
-
- enter
- assert active(executionorder.ParentFirstLocalReactions.r.A.r.AA.r.AAA)
-
- raise e
- disable_a = true
- disable_aa = true
- proceed 1 cycle
-
- assert active(executionorder.ParentFirstLocalReactions.r.A.r.AA.r.AAB)
- assert sm_local == 1
- assert a_local == 2
- assert aa_local == 3
- assert aaa_local == 0
-
- }
-
-
- @Test operation expectGrandparentLocalReactionOnParentLocalTransition() {
-
- enter
- assert active(executionorder.ParentFirstLocalReactions.r.A.r.AA.r.AAA)
-
- disable_a = true
- raise e
- proceed 1 cycle
-
- assert active(executionorder.ParentFirstLocalReactions.r.A.r.AB)
- assert sm_local == 1
- assert a_local == 2
- assert aa_local == 0
- assert aaa_local == 0
- }
-
-
- @Test operation expectNoLocalReactionOnGrandparentTransition() {
-
- enter
- assert active(executionorder.ParentFirstLocalReactions.r.A.r.AA.r.AAA)
-
- disable_aaa = true
- disable_aa = true
- raise e
- proceed 1 cycle
-
- assert active(executionorder.ParentFirstLocalReactions.r.B)
- assert sm_local == 1
- assert a_local == 0
- assert aa_local == 0
- assert aaa_local == 0
-
- }
-
- }
|