TriggerExpressionPrecedence.sctunit 1.3 KB

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