TriggerExpressionPrecedence.sctunit 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /**
  2. * These test cases check the precedence issues that occured with the construction of the trigger condition
  3. * that consists of the trigger and guard part.
  4. * The condition for a local reaction and transition depends on the trigger and guard part.
  5. */
  6. testgroup TriggerExpressionPrecedence for statechart expressions.TriggerExpressionPrecedence {
  7. /** If a trigger is specified and not active then the trigger condition should not become true. */
  8. test unsatisfiedTriggerAndFGuardFalseOrFalse {
  9. enter
  10. c1 = false
  11. c2 = false
  12. cycle
  13. assert ! e1_transition
  14. }
  15. /** If a trigger is specified and not active then the trigger condition should not become true. */
  16. test unsatisfiedTriggerAndFGuardTrueOrFalse {
  17. enter
  18. c1 = true
  19. c2 = false
  20. cycle
  21. assert ! e1_transition
  22. }
  23. /** If a trigger is specified and not active then the trigger condition should not become true. */
  24. test unsatisfiedTriggerAndFGuardFalseOrTrue {
  25. enter
  26. c1 = false
  27. c2 = true
  28. cycle
  29. assert ! e1_transition
  30. }
  31. /** If a trigger is specified and not active then the trigger condition should not become true. */
  32. test unsatisfiedTriggerAndFGuardTrueOrTrue {
  33. enter
  34. c1 = true
  35. c2 = true
  36. cycle
  37. assert ! e1_transition
  38. }
  39. }