summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Isdale <keith.isdale@nokia.com>2010-07-23 14:57:17 +1000
committerKeith Isdale <keith.isdale@nokia.com>2010-07-23 14:57:17 +1000
commit90cbe9b5b9427471a40ca74e0adecb296f8dea4b (patch)
treeedf80bb1dcd46dde7b0a20fa4e004d4c8a79e1d6
parentee015674d014f71c148220d0921c252903414fb6 (diff)
parent3d4d0b29343bc61f568c69f5afb1d8f02b985ba3 (diff)
Merge branch 'master' of git://git-nokia.trolltech.com.au/qtsoftware/research/qtuitest
-rw-r--r--interpreter/qscriptsystemtest.cpp7
-rw-r--r--libqsystemtest/qabstracttest.cpp4
-rw-r--r--libqsystemtest/qsystemtest.cpp6
-rw-r--r--libqsystemtest/qsystemtest.h2
-rw-r--r--libqsystemtest/qsystemtest_p.cpp5
5 files changed, 16 insertions, 8 deletions
diff --git a/interpreter/qscriptsystemtest.cpp b/interpreter/qscriptsystemtest.cpp
index 2dbe531..5e56268 100644
--- a/interpreter/qscriptsystemtest.cpp
+++ b/interpreter/qscriptsystemtest.cpp
@@ -890,6 +890,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 bf6ea0b..2353e6d 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 947b4bc..c984208 100644
--- a/libqsystemtest/qsystemtest.cpp
+++ b/libqsystemtest/qsystemtest.cpp
@@ -62,7 +62,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
@@ -393,7 +393,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;
}
@@ -420,7 +420,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 733cc72..a911245 100644
--- a/libqsystemtest/qsystemtest.h
+++ b/libqsystemtest/qsystemtest.h
@@ -431,7 +431,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;
}
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;\