summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@theqtcompany.com>2016-05-31 16:21:29 +0200
committerJarek Kobus <jaroslaw.kobus@qt.io>2016-06-07 08:43:43 +0000
commit4a0d14bfcc49edc60127e0833f6cc8d4edad9027 (patch)
tree250b9730d25a9c01a4563ad25e18445f6e11e59d /tests
parent2906a351df804c0e8d5e4377b9ecd48d293ddf41 (diff)
Implement srcexpr in <invoke>
Change-Id: I572342eb4952a6a0777a7503d374da6536ba052d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/3rdparty/scion-tests/scxml-test-framework/test/test216sub1.scxml5
-rw-r--r--tests/auto/scion/scion.pro1
-rw-r--r--tests/auto/scion/tst_scion.cpp5
3 files changed, 9 insertions, 2 deletions
diff --git a/tests/3rdparty/scion-tests/scxml-test-framework/test/test216sub1.scxml b/tests/3rdparty/scion-tests/scxml-test-framework/test/test216sub1.scxml
new file mode 100644
index 0000000..cf9a3c4
--- /dev/null
+++ b/tests/3rdparty/scion-tests/scxml-test-framework/test/test216sub1.scxml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><!-- when invoked, terminate returning done.invoke. This proves that the invocation succeeded. --><scxml xmlns="http://www.w3.org/2005/07/scxml" xmlns:conf="http://www.w3.org/2005/scxml-conformance" initial="final" version="1.0" datamodel="ecmascript">
+
+<final id="final"/>
+
+</scxml>
diff --git a/tests/auto/scion/scion.pro b/tests/auto/scion/scion.pro
index eccc02d..1b58a21 100644
--- a/tests/auto/scion/scion.pro
+++ b/tests/auto/scion/scion.pro
@@ -52,6 +52,7 @@ ALLSCXMLS = $$files($$SCXMLS_DIR/*.scxml, true)
# For a better explanation about the "blacklisted" tests, see tst_scion.cpp
# <invoke>
BLACKLISTED = \
+ test216sub1.scxml \
test226sub1.txml \
test239sub1.scxml \
test242sub1.scxml \
diff --git a/tests/auto/scion/tst_scion.cpp b/tests/auto/scion/tst_scion.cpp
index b5e0d0f..c06ac1b 100644
--- a/tests/auto/scion/tst_scion.cpp
+++ b/tests/auto/scion/tst_scion.cpp
@@ -67,8 +67,6 @@ static QSet<QString> testFailOnRun = QSet<QString>()
<< QLatin1String("w3c-ecma/test456.txml") // replaced by modified_test456
// FIXME: qscxmlc fails on improper scxml file, currently no way of testing it properly for compiled case
<< QLatin1String("w3c-ecma/test301.txml")
- // FIXME: Currently we do not support loading scripts from a srcexpr.
- << QLatin1String("w3c-ecma/test216.txml")
// FIXME: Currently we do not support nested scxml as a child of assign.
<< QLatin1String("w3c-ecma/test530.txml")
;
@@ -217,6 +215,7 @@ void TestScion::dynamic()
QScopedPointer<QScxmlStateMachine> stateMachine(parser.instantiateStateMachine());
QVERIFY(stateMachine != Q_NULLPTR);
+ stateMachine->setLoader(&loader);
parser.instantiateDataModel(stateMachine.data());
const bool runResult = runTest(stateMachine.data(), testDescription.object());
@@ -262,6 +261,8 @@ void TestScion::compiled()
QEXPECT_FAIL("", "This is expected to fail", Abort);
}
QVERIFY(stateMachine != Q_NULLPTR);
+ DynamicLoader loader;
+ stateMachine->setLoader(&loader);
const bool runResult = runTest(stateMachine.data(), testDescription.object());
if (runResult == false && testStatus == TestFailsOnRun)