ExitState.sctunit 830 B

1234567891011121314151617181920212223242526272829303132333435
  1. testgroup ExitState for statechart ExitState{
  2. /* An exit through an unnamed exit point must be taken by the transition without exit point spec (it must also be unguarded). */
  3. test defaultExit {
  4. enter
  5. assert active(ExitState.r.A)
  6. raise e
  7. cycle
  8. assert active(ExitState.r.E)
  9. }
  10. /* An exit through an named exit point must be taken by the transition with the matching exit point spec if it exists. */
  11. test namedExitThroughNamedTransition {
  12. enter
  13. assert active(ExitState.r.A)
  14. raise f
  15. cycle
  16. assert active(ExitState.r.F)
  17. }
  18. /* An exit through an named exit point must be taken by the default transition if no transition for this exit point exists. */
  19. test namedExitThroughDefaultTransition {
  20. enter
  21. assert active(ExitState.r.A)
  22. raise g
  23. cycle
  24. assert active(ExitState.r.E)
  25. }
  26. }