12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /**
- * @author axel terfloth
- */
- testgroup InternalEventLifeCycle for statechart InternalEventLifeCycle {
- test InternalEventLifeCycleTest {
-
- enter
-
- assert active(InternalEventLifeCycle.r1.A)
- assert active(InternalEventLifeCycle.r2.C)
-
- // the internal event i1 must be raised and consumed in the low priority
- // region within the same cycle
- raise e
- cycle
- assert active(InternalEventLifeCycle.r1.A)
- assert active(InternalEventLifeCycle.r2.D)
- // the internal event must not be visible after the cycle
- // but we can't access internal elements yet : assert ! i1
-
- // make sure nothing happens during an empty cycle
- cycle
- assert active(InternalEventLifeCycle.r1.A)
- assert active(InternalEventLifeCycle.r2.D)
-
- // the internal event i2 should have no impact since it is raised
- // in a low priority region and will be cleared after the cycle
- raise f
- cycle
- assert active(InternalEventLifeCycle.r1.A)
- assert active(InternalEventLifeCycle.r2.C)
-
- // make sure nothing happens during an empty cycle
- cycle
- assert active(InternalEventLifeCycle.r1.A)
- assert active(InternalEventLifeCycle.r2.C)
- }
- }
|