diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-12-05 16:20:11 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2014-12-05 16:20:11 (GMT) |
commit | 93f8cb376e6e496f0194d1e0657081354434da96 (patch) | |
tree | 551d4b37708cb983b73432029f370b605d76da29 /test | |
parent | a5a139f46438148901ea6627b73d1bf6ae39b346 (diff) | |
download | uscxml-93f8cb376e6e496f0194d1e0657081354434da96.zip uscxml-93f8cb376e6e496f0194d1e0657081354434da96.tar.gz uscxml-93f8cb376e6e496f0194d1e0657081354434da96.tar.bz2 |
Support for xinclude
Diffstat (limited to 'test')
-rw-r--r-- | test/ctest/CTestCustom.ctest.in | 2 | ||||
-rw-r--r-- | test/src/test-datamodel.cpp | 4 | ||||
-rw-r--r-- | test/src/test-issue-reporting.cpp | 4 | ||||
-rw-r--r-- | test/src/test-lifecycle.cpp | 12 | ||||
-rw-r--r-- | test/src/test-predicates.cpp | 2 | ||||
-rw-r--r-- | test/uscxml/xinclude/included.scxml | 3 | ||||
-rw-r--r-- | test/uscxml/xinclude/test-xinclude.scxml | 9 |
7 files changed, 23 insertions, 13 deletions
diff --git a/test/ctest/CTestCustom.ctest.in b/test/ctest/CTestCustom.ctest.in index 1362ea5..feba4c1 100644 --- a/test/ctest/CTestCustom.ctest.in +++ b/test/ctest/CTestCustom.ctest.in @@ -104,7 +104,6 @@ set(CTEST_CUSTOM_TESTS_IGNORE "spin/promela/test178.scxml" # manual test with two identical params - failed "spin/promela/test194.scxml" # illegal target for send "spin/promela/test199.scxml" # invalid send type - "spin/promela/test215.scxml" # nested SCXML document with typeexpr at invoke "spin/promela/test216.scxml" # nested SCXML document with srcexpr at invoke "spin/promela/test230.scxml" # nested SCXML document with manual test "spin/promela/test298.scxml" # non-existent data model location @@ -113,7 +112,6 @@ set(CTEST_CUSTOM_TESTS_IGNORE "spin/promela/test343.scxml" # test that illegal <param> produces error.execution "spin/promela/test488.scxml" # illegal expr in <param> produces error.execution "spin/promela/test496.scxml" # tests error.communication with illegal target - "spin/promela/test500.scxml" # uses _ioprocessors.scxml.location "spin/promela/test513.txt" # pure manual wget "spin/promela/test521.scxml" # tests error.communication with illegal target "spin/promela/test528.scxml" # illegal 'expr' produces error.execution diff --git a/test/src/test-datamodel.cpp b/test/src/test-datamodel.cpp index f0b7536..4b93b4d 100644 --- a/test/src/test-datamodel.cpp +++ b/test/src/test-datamodel.cpp @@ -52,7 +52,7 @@ int main(int argc, char** argv) { } - Interpreter interpreter = Interpreter::fromXML("<scxml></scxml>"); + Interpreter interpreter = Interpreter::fromXML("<scxml></scxml>", ""); DataModel dm(Factory::getInstance()->createDataModel("ecmascript", interpreter.getImpl().get())); dm.evalAsString("var foo = 12"); @@ -513,7 +513,7 @@ int main(int argc, char** argv) { "</scxml>"; TestDataModelExtension ext; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); interpreter.addDataModelExtension(&ext); InterpreterState state; diff --git a/test/src/test-issue-reporting.cpp b/test/src/test-issue-reporting.cpp index 39dad05..98c2a21 100644 --- a/test/src/test-issue-reporting.cpp +++ b/test/src/test-issue-reporting.cpp @@ -5,7 +5,7 @@ using namespace uscxml; std::set<std::string> issueLocationsForXML(const std::string xml) { - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); std::list<InterpreterIssue> issues = interpreter.validate(); std::set<std::string> issueLocations; @@ -52,7 +52,7 @@ int main(int argc, char** argv) { "</scxml>"; IssueMonitor monitor; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); interpreter.addMonitor(&monitor); interpreter.interpret(); diff --git a/test/src/test-lifecycle.cpp b/test/src/test-lifecycle.cpp index 8ecad37..ff2fafd 100644 --- a/test/src/test-lifecycle.cpp +++ b/test/src/test-lifecycle.cpp @@ -217,7 +217,7 @@ int main(int argc, char** argv) { // syntactic xml parse error try { const char* xml = "<invalid"; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); assert(false); } catch (Event& e) { std::cout << e; @@ -228,7 +228,7 @@ int main(int argc, char** argv) { // semantic xml parse error try { const char* xml = "<invalid />"; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); interpreter.addMonitor(mon); assert(interpreter.getState() == USCXML_INSTANTIATED); interpreter.step(); @@ -248,7 +248,7 @@ int main(int argc, char** argv) { " </state>" " <final id=\"done\" />" "</scxml>"; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); interpreter.addMonitor(mon); assert(interpreter.getState() == USCXML_INSTANTIATED); interpreter.step(); @@ -271,7 +271,7 @@ int main(int argc, char** argv) { " <final id=\"done\" />" "</scxml>"; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); interpreter.addMonitor(mon); callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); @@ -315,7 +315,7 @@ int main(int argc, char** argv) { " <final id=\"done\" />" "</scxml>"; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); interpreter.addMonitor(mon); callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); @@ -374,7 +374,7 @@ int main(int argc, char** argv) { " <final id=\"done\" />" "</scxml>"; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); interpreter.addMonitor(mon); callBackSeq.push_back(USCXML_BEFOREENTERINGSTATE); diff --git a/test/src/test-predicates.cpp b/test/src/test-predicates.cpp index 02e0faf..f66e8ba 100644 --- a/test/src/test-predicates.cpp +++ b/test/src/test-predicates.cpp @@ -20,7 +20,7 @@ int main(int argc, char** argv) { " </parallel>" "</scxml>"; - Interpreter interpreter = Interpreter::fromXML(xml); + Interpreter interpreter = Interpreter::fromXML(xml, ""); assert(interpreter); interpreter.getImpl()->init(); diff --git a/test/uscxml/xinclude/included.scxml b/test/uscxml/xinclude/included.scxml new file mode 100644 index 0000000..4d8c8f5 --- /dev/null +++ b/test/uscxml/xinclude/included.scxml @@ -0,0 +1,3 @@ +<state id="start"> + <transition target="pass" /> +</state>
\ No newline at end of file diff --git a/test/uscxml/xinclude/test-xinclude.scxml b/test/uscxml/xinclude/test-xinclude.scxml new file mode 100644 index 0000000..a07c087 --- /dev/null +++ b/test/uscxml/xinclude/test-xinclude.scxml @@ -0,0 +1,9 @@ +<scxml xmlns:xi="http://www.w3.org/2001/XInclude"> + <xi:include href="included.scxml" /> + <final id="fail"> + <onentry><log expr="FAIL!" /></onentry> + </final> + <final id="pass"> + <onentry><log expr="PASS!" /></onentry> + </final> +</scxml>
\ No newline at end of file |