From 3d23818472e371745f4ad4bd4b6c92de3d119e34 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Wed, 15 Mar 2017 16:22:18 +0100 Subject: Output a better warning when runtime-loading malformed SCXML The document might technically have a root element. We might not be able to read it, though. Also, output all errors without quotes. Change-Id: I8133e322e452ea0c3d079b5cbe23aed2f2952b3e Reviewed-by: Erik Verbruggen --- tests/auto/parser/tst_parser.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/auto/parser/tst_parser.cpp b/tests/auto/parser/tst_parser.cpp index 202e783..0e7436d 100644 --- a/tests/auto/parser/tst_parser.cpp +++ b/tests/auto/parser/tst_parser.cpp @@ -69,6 +69,9 @@ void tst_Parser::error() const QStringList expectedErrors = QString::fromUtf8(errorFile.readAll()).split('\n', QString::SkipEmptyParts); + if (!expectedErrors.isEmpty()) + QTest::ignoreMessage(QtWarningMsg, "SCXML document has errors"); + QScopedPointer stateMachine(QScxmlStateMachine::fromFile(scxmlFileName)); QVERIFY(!stateMachine.isNull()); -- cgit v1.2.3