diff options
Diffstat (limited to 'tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp')
-rw-r--r-- | tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp b/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp index 7d0c5d8d99..f510d8f669 100644 --- a/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp +++ b/tests/auto/tools/qdbusxml2cpp/tst_qdbusxml2cpp.cpp @@ -162,6 +162,16 @@ void tst_qdbusxml2cpp::process_data() .arg(basicTypeList[i].cppType), QRegularExpression::DotMatchesEverythingOption); } + QTest::newRow("method-name") + << "<method name=\"Method\">" + "<arg type=\"s\" direction=\"in\"/>" + "<annotation name=\"org.qtproject.QtDBus.MethodName\" value=\"MethodRenamed\" />" + "</method>" + << QRegularExpression("Q_SLOTS:.*QDBusPendingReply<> MethodRenamed\\(const QString &\\w*", + QRegularExpression::DotMatchesEverythingOption) + << QRegularExpression("Q_SLOTS:.*void MethodRenamed\\(const QString &\\w*", + QRegularExpression::DotMatchesEverythingOption); + QTest::newRow("method-complex") << "<method name=\"Method\">" "<arg type=\"(dd)\" direction=\"in\"/>" @@ -213,8 +223,10 @@ void tst_qdbusxml2cpp::process() QFETCH_GLOBAL(QString, commandLineArg); // Run the tool + const QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath); + const QString command = binpath + QLatin1String("/qdbusxml2cpp"); QProcess process; - process.start("qdbusxml2cpp", QStringList() << commandLineArg << "-" << "-N"); + process.start(command, QStringList() << commandLineArg << "-" << "-N"); QVERIFY2(process.waitForStarted(), qPrintable(process.errorString())); // feed it our XML data |