test148.txml 981 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?xml version="1.0"?>
  2. <!-- test that the else clause executes if <if> and <elseif> evaluate to false.
  3. Baz should be the only event generated by the <if>. bat is raised to catch the case where the <else> clause
  4. fails and baz is not generated, i.e. it makes sure that the test doesn't hang. -->
  5. <scxml initial="s0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
  6. <datamodel>
  7. <data conf:id="1" conf:expr="0"/>
  8. </datamodel>
  9. <state id="s0">
  10. <onentry>
  11. <if conf:false="">
  12. <raise event="foo"/>
  13. <conf:incrementID id="1"/>
  14. <elseif conf:false=""/>
  15. <raise event="bar"/>
  16. <conf:incrementID id="1"/>
  17. <else/>
  18. <raise event="baz"/>
  19. <conf:incrementID id="1"/>
  20. </if>
  21. <raise event="bat"/>
  22. </onentry>
  23. <transition event="baz" conf:idVal="1=1" conf:targetpass=""/>
  24. <transition event="*" conf:targetfail=""/>
  25. </state>
  26. <conf:pass/>
  27. <conf:fail/>
  28. </scxml>