summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-05-14 12:39:37 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-05-14 12:39:37 (GMT)
commit9b5bc11d60dd6d111661ce4aa37725046071cf6e (patch)
tree059a50029ba778e8351c6ade233276ad9bafe75f /test
parent56074d3bd2ab4c8220b67b3da56ff55bbb286bae (diff)
downloaduscxml-9b5bc11d60dd6d111661ce4aa37725046071cf6e.zip
uscxml-9b5bc11d60dd6d111661ce4aa37725046071cf6e.tar.gz
uscxml-9b5bc11d60dd6d111661ce4aa37725046071cf6e.tar.bz2
Passes more tests again
Diffstat (limited to 'test')
-rw-r--r--test/issues/test-issue116.scxml8
-rw-r--r--test/issues/test-issue121.scxml13
-rw-r--r--test/issues/test-issue127.scxml29
3 files changed, 44 insertions, 6 deletions
diff --git a/test/issues/test-issue116.scxml b/test/issues/test-issue116.scxml
index 8d1d2b8..b5e618e 100644
--- a/test/issues/test-issue116.scxml
+++ b/test/issues/test-issue116.scxml
@@ -9,9 +9,9 @@ end
</data>
</datamodel>
<state id="StateShape1">
- <transition cond="Var1==0" target="Pass"/>
- <transition cond="Var1==555" target="Fail"/>
+ <transition cond="Var1==0" target="pass"/>
+ <transition cond="Var1==555" target="fail"/>
</state>
- <final id="Pass"/>
- <final id="Fail"/>
+ <final id="pass"/>
+ <final id="fail"/>
</scxml> \ No newline at end of file
diff --git a/test/issues/test-issue121.scxml b/test/issues/test-issue121.scxml
index d5bf353..aa7fe15 100644
--- a/test/issues/test-issue121.scxml
+++ b/test/issues/test-issue121.scxml
@@ -1,9 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s0" version="1.0" datamodel="promela">
<datamodel>
- <data id="var1" type="int" />
+ <data id="var1" type="int" expr="0" />
</datamodel>
<state id="s0" initial="s01">
+ <onentry>
+ <send event="timeout" delay="1000"/>
+ </onentry>
+
+ <transition cond="var1 == 3" target="pass" />
+ <transition event="timeout" target="fail" />
+
<invoke src="test-issue121.child" type="http://www.w3.org/TR/scxml/" id="pOne">
<param name="p_id" type="int" expr="1" />
</invoke>
@@ -12,10 +19,12 @@
</invoke>
<state id="s01">
<transition event="Random_Event">
- <assign location="var1" expr="_event.data.var1"/>
+ <assign location="var1" expr="_event.data.var1 + var1"/>
<log label="var1 value" expr="var1"/>
</transition>
</state>
</state>
+ <final id="pass"/>
+ <final id="fail"/>
</scxml>
\ No newline at end of file
diff --git a/test/issues/test-issue127.scxml b/test/issues/test-issue127.scxml
new file mode 100644
index 0000000..e522f43
--- /dev/null
+++ b/test/issues/test-issue127.scxml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<scxml xmlns="http://www.w3.org/2005/07/scxml" initial="s01" version="1.0" datamodel="promela">
+ <datamodel>
+ <data id="var1" type="int" expr="0"/>
+ <data id="var2" type="int" expr="2"/>
+ <data id="var3" type="int" expr="2"/>
+ </datamodel>
+ <state id="s01">
+ <onentry>
+ <assign location="var1" type="int" expr="var3"/> <!--on substituting expr = "var3 + 0 ". SCXML will pass-->
+ <log label="var1" expr="var1"/>
+ <assign location="var2" type="int" expr="var3 + 1"/>
+ <log label="var2" expr="var2"/>
+ </onentry>
+ <transition cond="var1 == 2" target="pass" />
+ <transition target="fail" />
+ </state>
+ <final id="pass">
+ <onentry>
+ <log label="result" expr="'pass'"/>
+ </onentry>
+ </final>
+ <final id="fail">
+ <onentry>
+ <log label="result" expr="'fail'"/>
+ </onentry>
+ </final>
+</scxml>
+ \ No newline at end of file