summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2016-08-18 17:14:03 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2016-08-19 07:12:25 +0000
commita0f8c4e865e6171c832b6590dc1dc4a09ae03848 (patch)
treee6874feadb294b74eb8d752a23419c5d812ee05e /tests
parent0933e6d71310178667cce1a60ac65c23a956eb34 (diff)
Support <content expr="...">
Previously, the expressions were never evaluated, but just taken as strings. Change-Id: Id506670cd0e954919941b5cf7c496b7c57f04711 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.json4
-rw-r--r--tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.scxml28
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.json b/tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.json
new file mode 100644
index 0000000..2b697c0
--- /dev/null
+++ b/tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.json
@@ -0,0 +1,4 @@
+{
+ "initialConfiguration" : ["pass"],
+ "events" : []
+}
diff --git a/tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.scxml b/tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.scxml
new file mode 100644
index 0000000..4cfa34a
--- /dev/null
+++ b/tests/3rdparty/scion-tests/scxml-test-framework/test/content-expr-in-send/test0.txml.scxml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" binding="early"
+ name="content-expr-in-send" datamodel="ecmascript">
+ <state id="top">
+ <onentry>
+ <send event="timeout" delay="2s"/>
+ <send event="to_second">
+ <content>blah</content>
+ </send>
+ </onentry>
+ <state id="first">
+ <transition event="to_second" target="second"/>
+ </state>
+
+ <state id="second">
+ <onentry>
+ <send event="to_pass">
+ <content expr="_event.data"/>
+ </send>
+ </onentry>
+ </state>
+ <transition event="to_pass" cond="_event.data=='blah'" target="pass"/>
+ <transition event="timeout" target="fail"/>
+ </state>
+
+ <final id="pass"><onentry><log label="Outcome" expr="'pass'"/></onentry></final>
+ <final id="fail"><onentry><log label="Outcome" expr="'fail'"/></onentry></final>
+</scxml>