diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-03 01:10:03 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-07-03 01:10:03 (GMT) |
commit | b542369263782dc8b85893e218119ed070efa7b3 (patch) | |
tree | 0a18012a0af991755ceab98a457b46b79c14129f /test/w3c | |
parent | 193a01614dc3290eec51745a91be65c166c3763b (diff) | |
download | uscxml-b542369263782dc8b85893e218119ed070efa7b3.zip uscxml-b542369263782dc8b85893e218119ed070efa7b3.tar.gz uscxml-b542369263782dc8b85893e218119ed070efa7b3.tar.bz2 |
Got ready for cmake3 and some minor fixes
Diffstat (limited to 'test/w3c')
-rw-r--r-- | test/w3c/confEcma.xsl | 17 | ||||
-rw-r--r-- | test/w3c/confXPath.xsl | 17 | ||||
-rw-r--r-- | test/w3c/ecma/test252.scxml | 4 | ||||
-rw-r--r-- | test/w3c/ecma/test343.scxml | 2 | ||||
-rw-r--r-- | test/w3c/ecma/test354.scxml | 4 | ||||
-rw-r--r-- | test/w3c/ecma/test487.scxml | 3 | ||||
-rw-r--r-- | test/w3c/ecma/test553.scxml | 4 | ||||
-rw-r--r-- | test/w3c/ecma/test554.scxml | 4 | ||||
-rw-r--r-- | test/w3c/txml/test252.txml | 4 | ||||
-rw-r--r-- | test/w3c/txml/test343.txml | 2 | ||||
-rw-r--r-- | test/w3c/txml/test354.txml | 4 | ||||
-rw-r--r-- | test/w3c/txml/test487.txml | 3 | ||||
-rw-r--r-- | test/w3c/txml/test553.txml | 4 | ||||
-rw-r--r-- | test/w3c/txml/test554.txml | 4 | ||||
-rw-r--r-- | test/w3c/xpath/test252.scxml | 4 | ||||
-rw-r--r-- | test/w3c/xpath/test343.scxml | 2 | ||||
-rw-r--r-- | test/w3c/xpath/test354.scxml | 4 | ||||
-rw-r--r-- | test/w3c/xpath/test487.scxml | 3 | ||||
-rw-r--r-- | test/w3c/xpath/test553.scxml | 4 | ||||
-rw-r--r-- | test/w3c/xpath/test554.scxml | 4 |
20 files changed, 65 insertions, 32 deletions
diff --git a/test/w3c/confEcma.xsl b/test/w3c/confEcma.xsl index ffc922d..a77d552 100644 --- a/test/w3c/confEcma.xsl +++ b/test/w3c/confEcma.xsl @@ -165,7 +165,7 @@ <content xmlns="http://www.w3.org/2005/07/scxml">foo</content> </xsl:template> - +<xsl:template match="//conf:someInlineVal">123</xsl:template> <!-- this returns something that is guaranteed not to be the ID of the current session --> <xsl:template match="//@conf:invalidSessionID"> @@ -273,6 +273,12 @@ events which cause the test to fail. The default value provided here is pretty <xsl:attribute name="namelist">Var<xsl:value-of select="." /></xsl:attribute> </xsl:template> +<!-- this produces a reference to an invalid namelist, i.e. on that should cause an error --> +<xsl:template match="//@conf:invalidNamelist"> + <xsl:attribute name="namelist">"foo"</xsl:attribute> +</xsl:template> + + <!-- transition conditions --> @@ -380,6 +386,10 @@ events which cause the test to fail. The default value provided here is pretty </xsl:attribute> </xsl:template> +<!-- test that the specified var has the value specified by <conf:someInlineVal> --> +<xsl:template match="//@conf:idSomeVal"> + <xsl:attribute name="cond">Var<xsl:value-of select="." /> == 123</xsl:attribute> +</xsl:template> <!-- test that the event's name fieldhas the value specified --> <xsl:template match="//@conf:eventNameVal"> @@ -428,6 +438,11 @@ is the second argument --> <xsl:attribute name="cond">_event.data == <xsl:value-of select="."/></xsl:attribute> </xsl:template> +<!-- test that _event.data is set to the value specified by <conf:someInlineVal> --> +<xsl:template match="//@conf:eventdataSomeVal"> + <xsl:attribute name="cond">_event.data == 123</xsl:attribute> +</xsl:template> + <xsl:template match="//@conf:emptyEventData"> <xsl:attribute name="cond">typeof _event.data === 'undefined'</xsl:attribute> </xsl:template> diff --git a/test/w3c/confXPath.xsl b/test/w3c/confXPath.xsl index 71286ce..bb65375 100644 --- a/test/w3c/confXPath.xsl +++ b/test/w3c/confXPath.xsl @@ -204,7 +204,7 @@ is of the same type as array123 --> <content xmlns="http://www.w3.org/2005/07/scxml">foo</content> </xsl:template> - +<xsl:template match="//conf:someInlineVal">123</xsl:template> <!-- this returns something that is guaranteed not to be the ID of the current session --> @@ -270,6 +270,11 @@ events which cause the test to fail. The default value provided here is pretty <xsl:attribute name="namelist">$Var<xsl:value-of select="." /></xsl:attribute> </xsl:template> +<!-- this produces a reference to an invalid namelist, i.e. on that should cause an error --> +<xsl:template match="//@conf:invalidNamelist"> + <xsl:attribute name="namelist">"foo"</xsl:attribute> +</xsl:template> + <!-- exprs that return the value of the event fields --> <xsl:template match="//@conf:eventName"> @@ -419,6 +424,11 @@ know if we can make this strong in XPath 1.0 --> </xsl:attribute> </xsl:template> +<!-- test that the specified var has the value specified by <conf:someInlineVal> --> +<xsl:template match="//@conf:idSomeVal"> + <xsl:attribute name="cond">Var<xsl:value-of select="." /> = 123</xsl:attribute> +</xsl:template> + <!-- test on the value of two vars --> <xsl:template match="//@conf:compareIDVal"> <xsl:attribute name="cond"> @@ -513,6 +523,11 @@ is the second argument --> <xsl:attribute name="cond">$_event/data = <xsl:value-of select="."/></xsl:attribute> </xsl:template> +<!-- test that _event.data is set to the value specified by <conf:someInlineVal> --> +<xsl:template match="//@conf:eventdataSomeVal"> + <xsl:attribute name="cond">_event.data = 123</xsl:attribute> +</xsl:template> + <xsl:template match="//@conf:emptyEventData"> <xsl:attribute name="cond">not($_event/data/*)</xsl:attribute> </xsl:template> diff --git a/test/w3c/ecma/test252.scxml b/test/w3c/ecma/test252.scxml index 14c6686..b33342b 100644 --- a/test/w3c/ecma/test252.scxml +++ b/test/w3c/ecma/test252.scxml @@ -5,7 +5,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <state id="s0" initial="s01"> <onentry> - <send event="timeout" delay="2s"/> + <send event="timeout" delayexpr="'50ms'"/> </onentry> <transition event="timeout" target="pass"/> @@ -22,7 +22,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <scxml initial="sub0" version="1.0" datamodel="ecmascript"> <state id="sub0"> <onentry> - <send event="timeout" delay="2s"/> + <send event="timeout" delayexpr="'25ms'"/> </onentry> <transition event="timeout" target="subFinal"/> <onexit> diff --git a/test/w3c/ecma/test343.scxml b/test/w3c/ecma/test343.scxml index 7f15cf0..a1455d9 100644 --- a/test/w3c/ecma/test343.scxml +++ b/test/w3c/ecma/test343.scxml @@ -14,7 +14,7 @@ </state> <final id="s02"> <donedata> - <param location="Varfoo" name="someParam"/> + <param location="foo.bar.baz " name="someParam"/> </donedata> </final> </state> diff --git a/test/w3c/ecma/test354.scxml b/test/w3c/ecma/test354.scxml index ef55794..6c544a4 100644 --- a/test/w3c/ecma/test354.scxml +++ b/test/w3c/ecma/test354.scxml @@ -37,10 +37,10 @@ and that correct values are used --><scxml xmlns="http://www.w3.org/2005/07/scxm <onentry> <send delay="5s" event="timeout"/> <send event="event2"> - <content>foo</content> + <content>123</content> </send> </onentry> - <transition event="event2" cond="_event.data == 'foo'" target="pass"/> + <transition event="event2" cond="_event.data == 123" target="pass"/> <transition event="*" target="fail"/> </state> diff --git a/test/w3c/ecma/test487.scxml b/test/w3c/ecma/test487.scxml index 30a50eb..5baacbe 100644 --- a/test/w3c/ecma/test487.scxml +++ b/test/w3c/ecma/test487.scxml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?><!-- test illegal assignment. error.execution should be raised. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="ecmascript" version="1.0"> <datamodel> - <data id="Var1" expr="return"/> + <data id="Var1"/> </datamodel> <state id="s0"> <onentry> + <assign location="Var1" expr="return"/> <raise event="event"/> </onentry> diff --git a/test/w3c/ecma/test553.scxml b/test/w3c/ecma/test553.scxml index 0beddea..0df3c3e 100644 --- a/test/w3c/ecma/test553.scxml +++ b/test/w3c/ecma/test553.scxml @@ -6,8 +6,8 @@ of <send>'s args causes an error.. --><scxml xmlns="http://www.w3.org/2005/07/s <onentry> <!-- timeout event --> <send event="timeout" delayexpr="'50ms'"/> - <!-- include a non-existing var in the namelist --> - <send event="event1" namelist="Var2"/> + <!-- generate an invalid namelist --> + <send event="event1" namelist=""foo""/> </onentry> <!-- if we get the timeout before event1, we assume that event1 hasn't been sent diff --git a/test/w3c/ecma/test554.scxml b/test/w3c/ecma/test554.scxml index 960f5ac..764241e 100644 --- a/test/w3c/ecma/test554.scxml +++ b/test/w3c/ecma/test554.scxml @@ -8,8 +8,8 @@ before the timer goes off. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xm <send event="timer" delayexpr="'50ms'"/> </onentry> - <!-- namelist references an undeclared variable --> - <invoke type="http://www.w3.org/TR/scxml/" namelist="Var2"> + <!-- reference an invalid namelist --> + <invoke type="http://www.w3.org/TR/scxml/" namelist=""foo""> <content> <scxml initial="subFinal" version="1.0" datamodel="ecmascript"> <final id="subFinal"/> diff --git a/test/w3c/txml/test252.txml b/test/w3c/txml/test252.txml index 40c36cb..ba43543 100644 --- a/test/w3c/txml/test252.txml +++ b/test/w3c/txml/test252.txml @@ -9,7 +9,7 @@ timeout indicates success. --> <state id="s0" initial="s01"> <onentry> - <send event="timeout" delay="2s"/> + <send event="timeout" conf:delay="1"/> </onentry> <transition event="timeout" conf:targetpass=""/> @@ -26,7 +26,7 @@ timeout indicates success. --> <scxml initial="sub0" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance"> <state id="sub0"> <onentry> - <send event="timeout" delay="2s"/> + <send event="timeout" conf:delay=".5"/> </onentry> <transition event="timeout" target="subFinal"/> <onexit> diff --git a/test/w3c/txml/test343.txml b/test/w3c/txml/test343.txml index 1d13da6..f0aba04 100644 --- a/test/w3c/txml/test343.txml +++ b/test/w3c/txml/test343.txml @@ -17,7 +17,7 @@ </state> <final id="s02"> <donedata> - <param conf:location="foo" name="someParam"/> + <param conf:invalidLocation="foo" name="someParam"/> </donedata> </final> </state> diff --git a/test/w3c/txml/test354.txml b/test/w3c/txml/test354.txml index 0f1f6c5..890b6ef 100644 --- a/test/w3c/txml/test354.txml +++ b/test/w3c/txml/test354.txml @@ -41,10 +41,10 @@ and that correct values are used --> <onentry> <send delay="5s" event="timeout"/> <send event="event2"> - <content>foo</content> + <content><conf:someInlineVal/></content> </send> </onentry> - <transition event="event2" conf:eventdataVal="'foo'" conf:targetpass=""/> + <transition event="event2" conf:eventdataSomeVal="" conf:targetpass=""/> <transition event="*" conf:targetfail=""/> </state> diff --git a/test/w3c/txml/test487.txml b/test/w3c/txml/test487.txml index 7210c2b..fe7423c 100644 --- a/test/w3c/txml/test487.txml +++ b/test/w3c/txml/test487.txml @@ -4,11 +4,12 @@ <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:illegalExpr=""/> + <data conf:id="1"/> </datamodel> <state id="s0"> <onentry> + <assign conf:location="1" conf:illegalExpr=""/> <raise event="event"/> </onentry> diff --git a/test/w3c/txml/test553.txml b/test/w3c/txml/test553.txml index 0c6a622..b9dfece 100644 --- a/test/w3c/txml/test553.txml +++ b/test/w3c/txml/test553.txml @@ -10,8 +10,8 @@ of <send>'s args causes an error.. --> <onentry> <!-- timeout event --> <send event="timeout" conf:delay="1"/> - <!-- include a non-existing var in the namelist --> - <send event="event1" conf:namelist="2"/> + <!-- generate an invalid namelist --> + <send event="event1" conf:invalidNamelist=""/> </onentry> <!-- if we get the timeout before event1, we assume that event1 hasn't been sent diff --git a/test/w3c/txml/test554.txml b/test/w3c/txml/test554.txml index 663424f..9e16cf8 100644 --- a/test/w3c/txml/test554.txml +++ b/test/w3c/txml/test554.txml @@ -12,8 +12,8 @@ before the timer goes off. --> <send event="timer" conf:delay="1"/> </onentry> - <!-- namelist references an undeclared variable --> - <invoke type="http://www.w3.org/TR/scxml/" conf:namelist="2"> + <!-- reference an invalid namelist --> + <invoke type="http://www.w3.org/TR/scxml/" conf:invalidNamelist=""> <content> <scxml initial="subFinal" version="1.0" conf:datamodel="" xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance"> <final id="subFinal"/> diff --git a/test/w3c/xpath/test252.scxml b/test/w3c/xpath/test252.scxml index 1f92127..f8d93a5 100644 --- a/test/w3c/xpath/test252.scxml +++ b/test/w3c/xpath/test252.scxml @@ -5,7 +5,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <state id="s0" initial="s01"> <onentry> - <send event="timeout" delay="2s"/> + <send event="timeout" delayexpr="'1s'"/> </onentry> <transition event="timeout" target="pass"/> @@ -22,7 +22,7 @@ timeout indicates success. --><scxml xmlns="http://www.w3.org/2005/07/scxml" x <scxml initial="sub0" version="1.0" datamodel="xpath"> <state id="sub0"> <onentry> - <send event="timeout" delay="2s"/> + <send event="timeout" delayexpr="'.5s'"/> </onentry> <transition event="timeout" target="subFinal"/> <onexit> diff --git a/test/w3c/xpath/test343.scxml b/test/w3c/xpath/test343.scxml index bae14de..e3dbf53 100644 --- a/test/w3c/xpath/test343.scxml +++ b/test/w3c/xpath/test343.scxml @@ -14,7 +14,7 @@ </state> <final id="s02"> <donedata> - <param location="$Varfoo" name="someParam"/> + <param location="foo.bar.baz " name="someParam"/> </donedata> </final> </state> diff --git a/test/w3c/xpath/test354.scxml b/test/w3c/xpath/test354.scxml index 499b568..e75d382 100644 --- a/test/w3c/xpath/test354.scxml +++ b/test/w3c/xpath/test354.scxml @@ -37,10 +37,10 @@ and that correct values are used --><scxml xmlns="http://www.w3.org/2005/07/scxm <onentry> <send delay="5s" event="timeout"/> <send event="event2"> - <content>foo</content> + <content>123</content> </send> </onentry> - <transition event="event2" cond="$_event/data = 'foo'" target="pass"/> + <transition event="event2" cond="_event.data = 123" target="pass"/> <transition event="*" target="fail"/> </state> diff --git a/test/w3c/xpath/test487.scxml b/test/w3c/xpath/test487.scxml index 9e6c441..cec2f64 100644 --- a/test/w3c/xpath/test487.scxml +++ b/test/w3c/xpath/test487.scxml @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?><!-- test illegal assignment. error.execution should be raised. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="s0" datamodel="xpath" version="1.0"> <datamodel> - <data id="Var1" expr="!1"/> + <data id="Var1"/> </datamodel> <state id="s0"> <onentry> + <assign location="$Var1" expr="!1"/> <raise event="event"/> </onentry> diff --git a/test/w3c/xpath/test553.scxml b/test/w3c/xpath/test553.scxml index 00bd1e8..90cd97c 100644 --- a/test/w3c/xpath/test553.scxml +++ b/test/w3c/xpath/test553.scxml @@ -6,8 +6,8 @@ of <send>'s args causes an error.. --><scxml xmlns="http://www.w3.org/2005/07/s <onentry> <!-- timeout event --> <send event="timeout" delayexpr="'1s'"/> - <!-- include a non-existing var in the namelist --> - <send event="event1" namelist="$Var2"/> + <!-- generate an invalid namelist --> + <send event="event1" namelist=""foo""/> </onentry> <!-- if we get the timeout before event1, we assume that event1 hasn't been sent diff --git a/test/w3c/xpath/test554.scxml b/test/w3c/xpath/test554.scxml index 1a2b58a..74e25b3 100644 --- a/test/w3c/xpath/test554.scxml +++ b/test/w3c/xpath/test554.scxml @@ -8,8 +8,8 @@ before the timer goes off. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xm <send event="timer" delayexpr="'1s'"/> </onentry> - <!-- namelist references an undeclared variable --> - <invoke type="http://www.w3.org/TR/scxml/" namelist="$Var2"> + <!-- reference an invalid namelist --> + <invoke type="http://www.w3.org/TR/scxml/" namelist=""foo""> <content> <scxml initial="subFinal" version="1.0" datamodel="xpath"> <final id="subFinal"/> |