diff options
Diffstat (limited to 'tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp')
-rw-r--r-- | tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp b/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp index cb07181c82..c51a0909f8 100644 --- a/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp +++ b/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 Intel Corporation. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include <QTest> #include <QLibraryInfo> @@ -371,36 +371,43 @@ void tst_qdbusxml2cpp::missingAnnotation_data() { QTest::addColumn<QString>("xmlSnippet"); QTest::addColumn<QString>("annotationName"); + QTest::addColumn<QString>("location"); QTest::newRow("property") << R"(<property type="%1" name="name" access="readwrite"/>)" - << "org.qtproject.QtDBus.QtTypeName"; + << "org.qtproject.QtDBus.QtTypeName" + << "7:2"; QTest::newRow("method-in") << R"(<method name="Method"> <arg type="%1" name="name" direction="in"/> </method>)" - << "org.qtproject.QtDBus.QtTypeName.In0"; + << "org.qtproject.QtDBus.QtTypeName.In0" + << "8:22"; QTest::newRow("method-out") << R"(<method name="Method"> <arg type="%1" name="name" direction="out"/> </method>)" - << "org.qtproject.QtDBus.QtTypeName.Out0"; + << "org.qtproject.QtDBus.QtTypeName.Out0" + << "8:22"; QTest::newRow("signal") << R"(<signal name="Signal"> <arg type="%1" name="name"/> </signal>)" - << "org.qtproject.QtDBus.QtTypeName.Out0"; + << "org.qtproject.QtDBus.QtTypeName.Out0" + << "8:22"; QTest::newRow("signal-out") << R"(<signal name="Signal"> <arg type="%1" name="name" direction="out"/> </signal>)" - << "org.qtproject.QtDBus.QtTypeName.Out0"; + << "org.qtproject.QtDBus.QtTypeName.Out0" + << "8:22"; } void tst_qdbusxml2cpp::missingAnnotation() { QFETCH(QString, xmlSnippet); QFETCH(QString, annotationName); + QFETCH(QString, location); QString type = "(ii)"; QProcess process; @@ -415,9 +422,9 @@ void tst_qdbusxml2cpp::missingAnnotation() QVERIFY(!errOutput.isEmpty()); // check it did suggest the right annotation - QString expected = R"(qdbusxml2cpp: Got unknown type `%1' processing '' -You should add <annotation name="%2" value="<type>"/> to the XML description for 'name')"; - expected = expected.arg(type, annotationName); + QString expected = R"(<standard input>:%3: error: unknown type `%1' +<standard input>:%3: note: you should add <annotation name="%2" value="<type>"/>)"; + expected = expected.arg(type, annotationName, location); QCOMPARE(errOutput, expected); } |