summaryrefslogtreecommitdiffstats
path: root/test/w3c/txml
diff options
context:
space:
mode:
Diffstat (limited to 'test/w3c/txml')
-rw-r--r--test/w3c/txml/test159.txml2
-rw-r--r--test/w3c/txml/test193.txml19
-rw-r--r--test/w3c/txml/test233.txml2
-rw-r--r--test/w3c/txml/test286.txml2
-rw-r--r--test/w3c/txml/test294.txml2
-rw-r--r--test/w3c/txml/test298.txml8
-rw-r--r--test/w3c/txml/test311.txml3
-rw-r--r--test/w3c/txml/test330.txml2
-rw-r--r--test/w3c/txml/test331.txml6
-rw-r--r--test/w3c/txml/test350.txml6
-rw-r--r--test/w3c/txml/test354.txml6
-rw-r--r--test/w3c/txml/test401.txml2
-rw-r--r--test/w3c/txml/test402.txml2
-rw-r--r--test/w3c/txml/test446.txml25
-rw-r--r--test/w3c/txml/test459.txml37
-rw-r--r--test/w3c/txml/test496.txml20
-rw-r--r--test/w3c/txml/test527.txml2
-rw-r--r--test/w3c/txml/test528.txml1
-rw-r--r--test/w3c/txml/test545.txml21
-rw-r--r--test/w3c/txml/test561.txml4
-rw-r--r--test/w3c/txml/test577.txml24
-rw-r--r--test/w3c/txml/test578.txml2
-rw-r--r--test/w3c/txml/test579.txml65
-rw-r--r--test/w3c/txml/test580.txml52
24 files changed, 286 insertions, 29 deletions
diff --git a/test/w3c/txml/test159.txml b/test/w3c/txml/test159.txml
index b7245c0..f4340b3 100644
--- a/test/w3c/txml/test159.txml
+++ b/test/w3c/txml/test159.txml
@@ -10,7 +10,7 @@ The send tag will raise an error so var1 should not be incremented. If it is fa
<state id="s0">
<onentry>
- <send event="thisWillFail" conf:illegaltarget=""/>
+ <send event="thisWillFail" conf:illegalTarget=""/>
<conf:incrementID id="1"/>
</onentry>
<transition conf:idVal="1=1" conf:targetfail=""/>
diff --git a/test/w3c/txml/test193.txml b/test/w3c/txml/test193.txml
index ba1598b..24cb2ac 100644
--- a/test/w3c/txml/test193.txml
+++ b/test/w3c/txml/test193.txml
@@ -1,20 +1,27 @@
<?xml version="1.0"?>
<!-- we test that omitting target and targetexpr of <send> when using the
-basichttp event i/o processor puts error.communication on the internal queue. -->
+SCXML event i/o processor puts the event on the external queue. -->
<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">
<state id="s0">
<onentry>
- <!-- this should put an error in the internal queue -->
- <send event="event1" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
- <send event="fail"/>
+ <send event="internal"/>
+ <!-- this should put event1 in the external queue -->
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor"/>
+ <send event="timeout" delay="1s"/>
</onentry>
- <transition event="error.communication" conf:targetpass=""/>
- <transition event="*" conf:targetfail=""/>
+ <transition event="event1" conf:targetfail=""/>
+ <transition event="internal" target="s1"/>
</state>
+
+ <state id="s1">
+ <transition event="event1" conf:targetpass=""/>
+ <transition event="timeout" conf:targetfail=""/>
+
+ </state>
<conf:pass/>
<conf:fail/>
diff --git a/test/w3c/txml/test233.txml b/test/w3c/txml/test233.txml
index 94b219b..8f186fd 100644
--- a/test/w3c/txml/test233.txml
+++ b/test/w3c/txml/test233.txml
@@ -30,7 +30,7 @@ the transtitions. -->
</finalize>
</invoke>
- <transition event="childToParent" conf:idVal="1 2" conf:targetpass=""/>
+ <transition event="childToParent" conf:idVal="1=2" conf:targetpass=""/>
<transition event="*" conf:targetfail=""/>
</state>
diff --git a/test/w3c/txml/test286.txml b/test/w3c/txml/test286.txml
index 89b77a9..a58f643 100644
--- a/test/w3c/txml/test286.txml
+++ b/test/w3c/txml/test286.txml
@@ -9,7 +9,7 @@ where no error is raised -->
<state id="s0">
<onentry>
- <assign conf:location="1" conf:expr="1"/>
+ <assign conf:invalidLocation="" conf:expr="1"/>
<raise event="foo"/>
</onentry>
diff --git a/test/w3c/txml/test294.txml b/test/w3c/txml/test294.txml
index 507ff3b..c257cec 100644
--- a/test/w3c/txml/test294.txml
+++ b/test/w3c/txml/test294.txml
@@ -27,7 +27,7 @@ that content inside donedata sets the full value of the event.data field -->
<state id="s1" initial="s11">
- <transition event="done.state.s1" conf:eventdataVal="foo" conf:targetpass="">
+ <transition event="done.state.s1" conf:eventdataVal="'foo'" conf:targetpass="">
</transition>
<transition event="done.state.s1" conf:targetfail="">
diff --git a/test/w3c/txml/test298.txml b/test/w3c/txml/test298.txml
index e1af350..2935099 100644
--- a/test/w3c/txml/test298.txml
+++ b/test/w3c/txml/test298.txml
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
-<!-- refence a non-existent data model location in param in donedata and see that the right error is raised -->
+<!-- reference a non-existent data model location in param in donedata and see that the right error is raised -->
<scxml version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" conf:datamodel="" initial="s0">
<datamodel>
@@ -7,6 +7,10 @@
</datamodel>
<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1s"/>
+ </onentry>
+
<transition event="error.execution" conf:targetpass=""/>
<transition event="*" conf:targetfail=""/>
@@ -15,7 +19,7 @@
</state>
<final id="s02">
<donedata>
- <param conf:name="3" conf:location="2"/>
+ <param conf:name="3" conf:invalidLocation=""/>
</donedata>
</final>
</state>
diff --git a/test/w3c/txml/test311.txml b/test/w3c/txml/test311.txml
index f6485be..50e506a 100644
--- a/test/w3c/txml/test311.txml
+++ b/test/w3c/txml/test311.txml
@@ -8,7 +8,8 @@ xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0">
<state id="s0">
<onentry>
- <assign conf:location="1" conf:expr="1"/>
+ <send event="timeout" delay="1s"/>
+ <assign conf:invalidLocation="" conf:expr="1"/>
</onentry>
<transition event="error.execution" conf:targetpass=""/>
<transition event=".*" conf:targetfail=""/>
diff --git a/test/w3c/txml/test330.txml b/test/w3c/txml/test330.txml
index 7778fad..ca13451 100644
--- a/test/w3c/txml/test330.txml
+++ b/test/w3c/txml/test330.txml
@@ -2,7 +2,7 @@
<!-- check that the required fields are present in both internal and external events -->
-<scxml initial="s0" conf:datamodel="" name="machineName" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+<scxml initial="s0" conf:datamodel="" name="machineName" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
<state id="s0">
<onentry>
diff --git a/test/w3c/txml/test331.txml b/test/w3c/txml/test331.txml
index a273b14..553d2f2 100644
--- a/test/w3c/txml/test331.txml
+++ b/test/w3c/txml/test331.txml
@@ -26,7 +26,7 @@
<state id="s2">
<onentry>
<!-- this will generate an error, which is a platform event -->
- <assign conf:location="2" conf:expr="1"/>
+ <assign conf:invalidLocation="" conf:expr="1"/>
</onentry>
<transition event="error" target="s3">
<assign conf:location="1" conf:eventType=""/>
@@ -56,7 +56,7 @@
</state>
- <final xmlns="http://www.w3.org/2005/07/scxml" id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
- <final xmlns="http://www.w3.org/2005/07/scxml" id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+ <conf:pass/>
+ <conf:fail/>
</scxml> \ No newline at end of file
diff --git a/test/w3c/txml/test350.txml b/test/w3c/txml/test350.txml
index b57e881..1086db7 100644
--- a/test/w3c/txml/test350.txml
+++ b/test/w3c/txml/test350.txml
@@ -5,12 +5,14 @@ able to send an event to itself using its own session ID as the target -->
<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
<datamodel>
- <data conf:id="1" conf:expr="'#_scxml_' + _sessionid"/>
- </datamodel>
+ <data conf:id="1" conf:quoteExpr="#_scxml_"/>
+ <data conf:id="2" conf:systemVarExpr="_sessionid”/>
+</datamodel>
<state id="s0">
<onentry>
+ <conf:concatVars id1="1" id2="2"/>
<send delay="5s" event="timeout"/>
<send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" conf:targetVar="1" event="s0Event"/>
</onentry>
diff --git a/test/w3c/txml/test354.txml b/test/w3c/txml/test354.txml
index d9e643a..0f1f6c5 100644
--- a/test/w3c/txml/test354.txml
+++ b/test/w3c/txml/test354.txml
@@ -13,12 +13,12 @@ and that correct values are used -->
<state id="s0">
<onentry>
<send delay="5s" event="timeout"/>
- <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" namelist="Var1">
+ <send event="event1" type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" conf:namelist="1">
<param name="param1" conf:expr="2"/>
</send>
</onentry>
<transition event="event1" target="s1">
- <assign conf:location="2" conf:eventDataNamelistValue="Var1"/>
+ <assign conf:location="2" conf:eventDataNamelistValue="1"/>
<assign conf:location="3" conf:eventDataParamValue="param1"/>
</transition>
<transition event="*" conf:targetfail="">
@@ -44,7 +44,7 @@ and that correct values are used -->
<content>foo</content>
</send>
</onentry>
- <transition event="event2" conf:eventdataVal="foo" conf:targetpass=""/>
+ <transition event="event2" conf:eventdataVal="'foo'" conf:targetpass=""/>
<transition event="*" conf:targetfail=""/>
</state>
diff --git a/test/w3c/txml/test401.txml b/test/w3c/txml/test401.txml
index a42b719..9aaa506 100644
--- a/test/w3c/txml/test401.txml
+++ b/test/w3c/txml/test401.txml
@@ -11,7 +11,7 @@ it was raised second -->
<onentry>
<send event="foo"/>
<!-- assigning to a non-existent location should raise an error -->
- <assign conf:location="1" conf:expr="2"/>
+ <assign conf:invalidLocation="" conf:expr="2"/>
</onentry>
diff --git a/test/w3c/txml/test402.txml b/test/w3c/txml/test402.txml
index 24e84e1..4e6d485 100644
--- a/test/w3c/txml/test402.txml
+++ b/test/w3c/txml/test402.txml
@@ -18,7 +18,7 @@ are pulled off the internal queue in order, and that prefix matching works on th
<!-- the first internal event. The error will be the second, and event2 will be the third -->
<raise event="event1"/>
<!-- assigning to a non-existent location should raise an error -->
- <assign conf:location="1" conf:expr="2"/>
+ <assign conf:invalidLocation="" conf:expr="2"/>
</onentry>
<transition event="event1" target="s02">
diff --git a/test/w3c/txml/test446.txml b/test/w3c/txml/test446.txml
new file mode 100644
index 0000000..afdf6a0
--- /dev/null
+++ b/test/w3c/txml/test446.txml
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+ <!-- in the ECMA data model, test that if the child of <data> is JSON, the processor
+ assigns it as the value of the var -->
+
+ <scxml xmlns="http://www.w3.org/2005/07/scxml"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+ <datamodel>
+ <data id="var1">[1, 2, 3]</data>
+ <data id="var2" src="file:test458.txt"/>
+ </datamodel>
+
+<state id="s0">
+ <transition cond="var1 instanceof Array" target="s1"/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<state id="s1">
+ <transition cond="var2 instanceof Array" conf:targetpass=""/>
+ <transition conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/txml/test459.txml b/test/w3c/txml/test459.txml
new file mode 100644
index 0000000..3cdec7b
--- /dev/null
+++ b/test/w3c/txml/test459.txml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- test that foreach goes over the array in the right order. since the array contains 1 2 3, we compare the current
+value with the previous value, which is stored in var1. The current value should always be larger. If
+it ever isn't, set Var4 to 0, indicating failure. Also check that the final value of the index
+is 2 (meaning that the initial value was 0, not 1) -->
+<scxml xmlns="http://www.w3.org/2005/07/scxml"
+xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
+<datamodel>
+ <data id="Var1" expr="0"/> <!-- contains the previous value -->
+ <data id="Var2"/> <!-- the item which will contain the current value -->
+ <data id="Var3"/> <!-- the index -->
+ <data id="Var4" expr="[1,2,3]"/>
+ <data id="Var5" expr="1"/> <!-- 1 if success, 0 if failure -->
+ </datamodel>
+
+ <state id="s0">
+ <onentry>
+ <foreach item="Var2" array="Var4" index="Var3">
+ <if cond="Var1&lt;Var2">
+ <assign location="Var1" expr="Var2"/>
+ <else/>
+ <!-- values are out of order, record failure -->
+ <assign location="Var5" expr="0"/>
+ </if>
+ </foreach>
+ </onentry>
+
+ <!-- check that var1 has its original value -->
+ <transition cond="Var4==0 | Var3 != 2" target="fail"/>
+ <transition target="pass"/>
+ </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
diff --git a/test/w3c/txml/test496.txml b/test/w3c/txml/test496.txml
new file mode 100644
index 0000000..ecd1e15
--- /dev/null
+++ b/test/w3c/txml/test496.txml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+
+<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">
+
+
+<state id="s0">
+ <onentry>
+ <send type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="event" conf:unreachableTarget=""/>
+ <raise event="foo"/>
+ </onentry>
+ <transition event="error.communication" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+
+
+ <conf:pass/>
+ <conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/txml/test527.txml b/test/w3c/txml/test527.txml
index 80894a7..f97015d 100644
--- a/test/w3c/txml/test527.txml
+++ b/test/w3c/txml/test527.txml
@@ -6,7 +6,7 @@
<state id="s0" initial="s01">
- <transition event="done.state.s0" conf:eventdataVal="foo" conf:targetpass="">
+ <transition event="done.state.s0" conf:eventdataVal="'foo'" conf:targetpass="">
</transition>
<transition event="done.state.s0" conf:targetfail="">
diff --git a/test/w3c/txml/test528.txml b/test/w3c/txml/test528.txml
index 271bb1c..ed70c20 100644
--- a/test/w3c/txml/test528.txml
+++ b/test/w3c/txml/test528.txml
@@ -9,7 +9,6 @@
<transition event="error.execution" target="s1"/>
<transition event="done.state.s0" conf:targetfail=""/>
- <transition event="done.state.s0" conf:targetfail=""/>
<state id="s01">
<transition target="s02"/>
diff --git a/test/w3c/txml/test545.txml b/test/w3c/txml/test545.txml
new file mode 100644
index 0000000..d95f8f3
--- /dev/null
+++ b/test/w3c/txml/test545.txml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+ <!-- test that xml content in send is place as XML under event/data -->
+
+ <scxml xmlns="http://www.w3.org/2005/07/scxml" name="scxmltest"
+ xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="xpath">
+
+<state id="s0">
+ <onentry>
+ <send event="someevent">
+ <content><foo xmlns=""><bar>3</bar></foo></content>
+ </send>
+ </onentry>
+
+ <transition event="*" cond="$_event/data/foo/bar = 3" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/txml/test561.txml b/test/w3c/txml/test561.txml
index 4b7ec8e..183cb9d 100644
--- a/test/w3c/txml/test561.txml
+++ b/test/w3c/txml/test561.txml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
- <!-- in the ECMA data model, test that processor creates an ECMAScript object
- _event.data when receiving JSON in an event -->
+ <!-- in the ECMA data model, test that processor creates an ECMAScript DOM object
+ _event.data when receiving XML in an event -->
<scxml xmlns="http://www.w3.org/2005/07/scxml"
xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" version="1.0" datamodel="ecmascript">
diff --git a/test/w3c/txml/test577.txml b/test/w3c/txml/test577.txml
new file mode 100644
index 0000000..adf1531
--- /dev/null
+++ b/test/w3c/txml/test577.txml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<!-- test that that <send> without target in basichttp event i/o processor
+causes error.communication to get added to internal queue . -->
+
+<scxml initial="s0" conf:datamodel="" version="1.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <onentry>
+ <!-- sent by scxml event i/o processor, added to external queue -->
+ <send event="event1"/>
+ <!-- should put error.communication on internal queue -->
+ <send event="test" type="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"/>
+
+ </onentry>
+
+
+ <transition event="error.communication" conf:targetpass=""/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <conf:pass/>
+ <conf:fail/>
+</scxml> \ No newline at end of file
diff --git a/test/w3c/txml/test578.txml b/test/w3c/txml/test578.txml
index a4de932..cae3cdd 100644
--- a/test/w3c/txml/test578.txml
+++ b/test/w3c/txml/test578.txml
@@ -9,7 +9,7 @@
<state id="s0">
<onentry>
<send event="foo">
- <content>{ productName : "bar", size : 27 }</content>
+ <content>{ "productName" : "bar", "size" : 27 }</content>
</send>
</onentry>
<transition event="foo" cond="_event.data.productName == 'bar'"
diff --git a/test/w3c/txml/test579.txml b/test/w3c/txml/test579.txml
new file mode 100644
index 0000000..7c48c37
--- /dev/null
+++ b/test/w3c/txml/test579.txml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!-- test that default history content is executed correctly. The Process MUST execute any executable content in the transition after the parent state's onentry handlers, and, in the case where the history pseudo-state is the target of an <initial> transition,
+the executable content inside the <initial> transition. However the Processor MUST
+execute this content only if there is no stored history. Once the history state's
+parent state has been visited and exited, the default history content must not be executed -->
+
+
+<scxml version="1.0" initial="s0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+
+
+<state id="s0">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+ <initial>
+ <transition target="sh1">
+ <raise event="event2"/>
+ </transition>
+ </initial>
+ <onentry>
+ <send delay="2s" event="timeout"/>
+ <raise event="event1"/>
+ </onentry>
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ <history id="sh1">
+ <transition target="s01">
+ <raise event="event3"/>
+ </transition>
+ </history>
+
+ <state id="s01">
+ <transition event="event1" target="s02"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+
+ <state id="s02">
+ <transition event="event2" target="s03"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+ <state id="s03">
+
+ <transition conf:idVal="1==0" event="event3" target="s0"/>
+ <transition conf:idVal="1==1" event="event1" target="s2"/>
+ <transition event="*" conf:targetfail=""/>
+ </state>
+</state>
+
+<state id="s2">
+ <transition event="event2" target="s3"/>
+ <transition event="*" conf:targetfail=""/>
+
+ </state>
+
+<state id="s3">
+ <transition event="event3" conf:targetfail=""/>
+ <transition event="timeout" conf:targetpass=""/>
+ </state>
+
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file
diff --git a/test/w3c/txml/test580.txml b/test/w3c/txml/test580.txml
new file mode 100644
index 0000000..4fddd39
--- /dev/null
+++ b/test/w3c/txml/test580.txml
@@ -0,0 +1,52 @@
+<?xml version="1.0"?>
+<!-- test that a history state never ends up part of the configuration -->
+
+
+<scxml version="1.0" initial="p1" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance">
+ <datamodel>
+ <data conf:id="1" conf:expr="0"/>
+ </datamodel>
+
+<parallel id="p1">
+ <onentry>
+ <send delay="2s" event="timeout"/>
+ </onentry>
+
+
+ <state id="s0">
+ <transition conf:inState="sh1" conf:targetfail=""/>
+ <transition event="timeout" conf:targetfail=""/>
+ </state>
+
+
+<state id="s1">
+ <initial>
+ <transition target="sh1"/>
+ </initial>
+
+
+ <history id="sh1">
+ <transition target="s11"/>
+ </history>
+
+ <state id="s11">
+ <transition conf:inState="sh1" conf:targetfail=""/>
+ <transition target="s12"/>
+ </state>
+
+ <state id="s12"/>
+ <transition conf:inState="sh1" conf:targetfail=""/>
+ <transition conf:idVal="1==0" target="sh1"/>
+ <transition conf:idVal="1==1" conf:targetpass=""/>
+ <onexit>
+ <conf:incrementID id="1"/>
+ </onexit>
+ </state>
+
+
+ </parallel>
+
+<conf:pass/>
+<conf:fail/>
+
+</scxml> \ No newline at end of file