diff options
author | Ed Baak <ed.baak@nokia.com> | 2010-07-26 10:25:38 +1000 |
---|---|---|
committer | Ed Baak <ed.baak@nokia.com> | 2010-07-26 10:25:38 +1000 |
commit | eb2fbe409d1423c0b707b9986ee1e56fa19b355a (patch) | |
tree | 8779c4ac6bd6576adb332a06bc74c286a39da168 | |
parent | 3988c9601839fe3447be30907733adb947b8aa5d (diff) | |
parent | 230793fbcdf34297ebaf1650e8d5284639c826e2 (diff) |
Merge branch 'master' of scm.dev.nokia.troll.no:research/qtuitest
-rw-r--r-- | interpreter/qscriptsystemtest.cpp | 7 | ||||
-rw-r--r-- | libqsystemtest/qabstracttest.cpp | 4 | ||||
-rw-r--r-- | libqsystemtest/qsystemtest.cpp | 6 | ||||
-rw-r--r-- | libqsystemtest/qsystemtest.h | 6 | ||||
-rw-r--r-- | libqsystemtest/qsystemtest_p.cpp | 5 |
5 files changed, 19 insertions, 9 deletions
diff --git a/interpreter/qscriptsystemtest.cpp b/interpreter/qscriptsystemtest.cpp index 3d2305b..134af57 100644 --- a/interpreter/qscriptsystemtest.cpp +++ b/interpreter/qscriptsystemtest.cpp @@ -891,6 +891,13 @@ void QScriptSystemTest::scriptPositionChange(qint64 scriptId, int line, int colu QTestMessage ide_msg("queryBreakpoint"); ide_msg["file"] = ctxInfo.fileName(); ide_msg["line"] = ctxInfo.lineNumber(); + if (ctxInfo.functionName().isEmpty()) { + ide_msg["function"] = currentTestFunction(); + } else { + ide_msg["function"] = ctxInfo.functionName(); + ide_msg["funcStart"] = ctxInfo.functionStartLineNumber(); + ide_msg["funcEnd"] = ctxInfo.functionEndLineNumber(); + } ide_msg["depth"] = m_contextDepth; QTestMessage reply; testIDE()->sendMessage( ide_msg, reply, -1 ); diff --git a/libqsystemtest/qabstracttest.cpp b/libqsystemtest/qabstracttest.cpp index 61b6896..dc6f115 100644 --- a/libqsystemtest/qabstracttest.cpp +++ b/libqsystemtest/qabstracttest.cpp @@ -154,7 +154,7 @@ QAbstractTest::QAbstractTest(QString const &srcdir, QObject *parent) d->learnMode = LearnNone; d->failEmptyTest = false; if (!srcdir.isEmpty()) - setupTestDataPath(qPrintable(srcdir + "/tst_phonytest.cpp")); + setupTestDataPath(qPrintable(QString("%1/tst_phonytest.cpp").arg(srcdir))); } /* @@ -302,7 +302,7 @@ QString QAbstractTest::testCaseName() const */ QString QAbstractTest::currentTestFunction( bool fullName ) const { - return fullName ? (testCaseName() + "::" + QTest::currentTestFunction()) : (QTest::currentTestFunction()); + return fullName ? QString("%1::%2").arg(testCaseName()).arg(QTest::currentTestFunction()) : (QString(QTest::currentTestFunction())); } #ifndef QTCREATOR_QTEST diff --git a/libqsystemtest/qsystemtest.cpp b/libqsystemtest/qsystemtest.cpp index f590b58..8fade62 100644 --- a/libqsystemtest/qsystemtest.cpp +++ b/libqsystemtest/qsystemtest.cpp @@ -66,7 +66,7 @@ #define OBJECT_EXIST_TIMEOUT 1000 #define BT(message) (\ - message["location"] = QString("%1:%2%3").arg(__FILE__).arg(__LINE__).arg(!message["location"].toString().isEmpty() ? "\n" + message["location"].toString() : ""),\ + message["location"] = QString("%1:%2%3").arg(__FILE__).arg(__LINE__).arg(!message["location"].toString().isEmpty() ? QString("\n") + message["location"].toString() : QString()),\ message) #undef QFAIL @@ -406,7 +406,7 @@ QVariant QSystemTest::getSelectedValue( const QString &queryPath ) QTestMessage testMessage(msg); if (!doQuery(testMessage, queryPath, &reply)) return ret; if (!reply[msg].isValid()) { - reply["status"] = "ERROR: no data in reply to " + msg + "; status: " + reply["status"].toString(); + reply["status"] = QString("ERROR: no data in reply to %1; status: %2").arg(msg).arg(reply["status"].toString()); setQueryError(reply); return ret; } @@ -433,7 +433,7 @@ QVariant QSystemTest::getValue( const QString &queryPath ) QTestMessage testMessage(msg); if (!doQuery(testMessage, queryPath, &reply)) return ret; if (!reply[msg].isValid()) { - reply["status"] = "ERROR: no data in reply to " + msg + "; status: " + reply["status"].toString(); + reply["status"] = QString("ERROR: no data in reply to %1; status: %2").arg(msg).arg(reply["status"].toString()); setQueryError(reply); return ret; } diff --git a/libqsystemtest/qsystemtest.h b/libqsystemtest/qsystemtest.h index c8ec39b..51ee1af 100644 --- a/libqsystemtest/qsystemtest.h +++ b/libqsystemtest/qsystemtest.h @@ -435,7 +435,7 @@ protected: QTestMessage testMessage(msg); if (!doQuery(testMessage, queryPath, &reply)) return ret; if (!reply[msg].isValid()) { - reply["status"] = "ERROR: no data in reply to " + msg + "; status: " + reply["status"].toString(); + reply["status"] = QString("ERROR: no data in reply to %1; status: %2").arg(msg).arg(reply["status"].toString()); setQueryError(reply); return ret; } @@ -451,7 +451,7 @@ protected: virtual void setLocation(const QString& = QString(),int = -1); virtual void processMessage(const QTestMessage&); - QTestRemote *testIDE(); +// QTestRemote *testIDE(); bool abort_prompt; @@ -472,6 +472,8 @@ public: QString PATH(); QString which( const QString &appName ); + QTestRemote *testIDE(); + signals: void appGainedFocus(QString const &appName); void appBecameIdle(QString const &appName); diff --git a/libqsystemtest/qsystemtest_p.cpp b/libqsystemtest/qsystemtest_p.cpp index 2020bf9..1914e62 100644 --- a/libqsystemtest/qsystemtest_p.cpp +++ b/libqsystemtest/qsystemtest_p.cpp @@ -61,7 +61,7 @@ #define OBJECT_EXIST_TIMEOUT 1000 #define BT(message) (\ - message["location"] = QString("%1:%2%3").arg(__FILE__).arg(__LINE__).arg(!message["location"].toString().isEmpty() ? "\n" + message["location"].toString() : ""),\ + message["location"] = QString("%1:%2%3").arg(__FILE__).arg(__LINE__).arg(!message["location"].toString().isEmpty() ? QString("\n") + message["location"].toString() : QString()),\ message) /*! @@ -246,8 +246,9 @@ void QSystemTest::manualTestData( const QString &description, bool isAlternative */ QTestMessage QSystemTest::query( const QTestMessage &msg, const QString &queryPath, int timeout ) { +// manualTest( msg.event() + QString("--") + msg.msgId() + "--" + msg.toString() ); if (m_run_as_manual_test) {\ - manualTest( msg.event() + "--" + msg.msgId() + "--" + msg.toString() );\ + manualTest( QString("%1 -- %2 -- $3").arg(msg.event()).arg(msg.msgId()).arg(msg.toString()) );\ QTestMessage reply;\ reply["status"] = "OK";\ return reply;\ |