1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?xml version="1.0" ?>
- <diagram author="Glenn De Jonghe" name="TestHistory">
- <description>
- Testing the History state.
- </description>
- <inport name="test_input" />
- <outport name="test_output" />
- <class name="Class1" default="true">
- <scxml initial="composite_1">
- <state id="composite_1" initial="state_1">
- <state id="state_1">
- <onentry>
- <raise port="test_output" event="in_state_1" />
- </onentry>
- <transition port="test_input" event="to_state_2" target="../state_2"/>
- </state>
- <state id="state_2">
- <onentry>
- <raise port="test_output" event="in_state_2" />
- </onentry>
- </state>
- <history id="composite_history">
- <transition target="../state_1"/>
- </history>
- <transition port="test_input" event="to_state_3" target="../state_3"/>
- </state>
- <state id="state_3">
- <onentry>
- <raise port="test_output" event="in_state_3" />
- </onentry>
- <transition target="/composite_1/composite_history"/>
- </state>
- </scxml>
- </class>
- <test>
- <input>
- <event name="to_state_2" port="test_input" time="0.0"/>
- <event name="to_state_3" port="test_input" time="0.0"/>
- </input>
- <expected>
- <slot>
- <event name="in_state_1" port="test_output"/>
- </slot>
- <slot>
- <event name="in_state_2" port="test_output"/>
- </slot>
- <slot>
- <event name="in_state_3" port="test_output"/>
- </slot>
- <slot>
- <event name="in_state_2" port="test_output"/>
- </slot>
- </expected>
- </test>
- </diagram>
|