diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-11 14:12:28 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-08-11 14:12:28 (GMT) |
commit | c30b602cdb5ede809b960e35fc7e702b7f1f76e2 (patch) | |
tree | a7935d13b35abde551d7b06836b4bc617fc5274e /test/w3c/ecma/test388.scxml | |
parent | b95a9c2d23c4bfba84dfac8683c47153d598e09f (diff) | |
download | uscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.zip uscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.tar.gz uscxml-c30b602cdb5ede809b960e35fc7e702b7f1f76e2.tar.bz2 |
Reformatted w3c tests with xmllint
Diffstat (limited to 'test/w3c/ecma/test388.scxml')
-rw-r--r-- | test/w3c/ecma/test388.scxml | 124 |
1 files changed, 61 insertions, 63 deletions
diff --git a/test/w3c/ecma/test388.scxml b/test/w3c/ecma/test388.scxml index 6a93fd0..347e7f6 100644 --- a/test/w3c/ecma/test388.scxml +++ b/test/w3c/ecma/test388.scxml @@ -1,76 +1,74 @@ -<?xml version="1.0" encoding="UTF-8"?><!-- test that history states works correctly. The counter Var1 counts how many times +<?xml version="1.0" encoding="UTF-8"?> +<!-- test that history states works correctly. The counter Var1 counts how many times we have entered s0. The initial state is s012. We then transition to s1, which transitions to s0's deep history state. entering.s012 should be raised, otherwise failure. Then we transition to s02, which transitions to s0's shallow history state. That should have value s01, and its initial -state is s011, so we should get entering.s011, otherwise failure.--><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s012" datamodel="ecmascript"> -<datamodel> - <data id="Var1" expr="0"/> +state is s011, so we should get entering.s011, otherwise failure.--> +<scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" version="1.0" initial="s012" datamodel="ecmascript"> + <datamodel> + <data id="Var1" expr="0"/> </datamodel> - -<state id="s0" initial="s01"> - <onentry> - <assign location="Var1" expr="Var1 + 1"/> + <state id="s0" initial="s01"> + <onentry> + <assign location="Var1" expr="Var1 + 1"/> </onentry> - - <!-- the first time through, go to s1, setting a timer just in case something hangs --> - <transition event="entering.s012" cond="Var1==1" target="s1"> - <send event="timeout" delay="2s"/> - </transition> - - <!-- the second time, we should get entering.s012. If so, go to s2, otherwise fail --> - <transition event="entering.s012" cond="Var1==2" target="s2"/> + <!-- the first time through, go to s1, setting a timer just in case something hangs --> + <transition event="entering.s012" cond="Var1==1" target="s1"> + <send event="timeout" delay="2s"/> + </transition> + <!-- the second time, we should get entering.s012. If so, go to s2, otherwise fail --> + <transition event="entering.s012" cond="Var1==2" target="s2"/> <transition event="entering" cond="Var1==2" target="fail"/> - - <!-- the third time we should get entering-s011. If so, pass, otherwise fail --> - <transition event="entering.s011" cond="Var1==3" target="pass"/> - <transition event="entering" cond="Var1==3" target="fail"/> - - <!-- if we timeout, the state machine is hung somewhere, so fail --> - <transition event="timeout" target="fail"/> - - <history type="shallow" id="s0HistShallow"> - <transition target="s02"/> + <!-- the third time we should get entering-s011. If so, pass, otherwise fail --> + <transition event="entering.s011" cond="Var1==3" target="pass"/> + <transition event="entering" cond="Var1==3" target="fail"/> + <!-- if we timeout, the state machine is hung somewhere, so fail --> + <transition event="timeout" target="fail"/> + <history type="shallow" id="s0HistShallow"> + <transition target="s02"/> </history> - <history type="deep" id="s0HistDeep"> - <transition target="s022"/> + <history type="deep" id="s0HistDeep"> + <transition target="s022"/> </history> - <state id="s01" initial="s011"> - <state id="s011"> - <onentry> - <raise event="entering.s011"/> - </onentry> - </state> - <state id="s012"> - <onentry> - <raise event="entering.s012"/> + <state id="s01" initial="s011"> + <state id="s011"> + <onentry> + <raise event="entering.s011"/> </onentry> + </state> + <state id="s012"> + <onentry> + <raise event="entering.s012"/> + </onentry> + </state> </state> - </state> - <state id="s02" initial="s021"> - <state id="s021"> - <onentry> - <raise event="entering.s021"/> - </onentry> - </state> - <state id="s022"> - <onentry> - <raise event="entering.s022"/> + <state id="s02" initial="s021"> + <state id="s021"> + <onentry> + <raise event="entering.s021"/> + </onentry> + </state> + <state id="s022"> + <onentry> + <raise event="entering.s022"/> </onentry> + </state> </state> </state> - -</state> - - -<state id="s1"> - <transition target="s0HistDeep"/> -</state> - -<state id="s2"> - <transition target="s0HistShallow"/> -</state> - -<final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final> -<final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final> - -</scxml>
\ No newline at end of file + <state id="s1"> + <transition target="s0HistDeep"/> + </state> + <state id="s2"> + <transition target="s0HistShallow"/> + </state> + <final id="pass"> + <onentry> + <log label="Outcome" expr="'pass'"/> + </onentry> + </final> + <final id="fail"> + <onentry> + <log label="Outcome" expr="'fail'"/> + </onentry> + </final> +</scxml> |