diff options
author | Jędrzej Nowacki <jedrzej.nowacki@nokia.com> | 2011-11-16 14:43:28 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-16 15:46:26 +0100 |
commit | ea2e8abd5c655027da51548e0d0f2f55dfb947bc (patch) | |
tree | 57a5df55fc5358a2f035ae1b675537167f26d1d5 /tests/auto/declarative/qdeclarativeqt | |
parent | 92660b13bb138d219f49ea203fa5e5aed9de74cb (diff) |
Fix console.log function.
This patch fix problem of a truncated log message if it includes
an object. The regression was introduced by
a7f5c93de3f9811eef3f5a19ab6dec83b997e0d6.
Change-Id: I080956ef3c902b6c4a57f5d0066c4616a449e661
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativeqt')
-rw-r--r-- | tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml index afb758a21f..2692abb82e 100644 --- a/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml +++ b/tests/auto/declarative/qdeclarativeqt/data/consoleLog.qml @@ -25,6 +25,8 @@ QtObject { console.log(f) console.log(root) console.log(g) + console.log(1, "pong!", new Object) + console.log(1, ["ping","pong"], new Object, 2) console.log(exception) //This has to be at the end } } diff --git a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp index c550ac2f5b..83bed2bf5b 100644 --- a/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp +++ b/tests/auto/declarative/qdeclarativeqt/tst_qdeclarativeqt.cpp @@ -484,6 +484,10 @@ void tst_qdeclarativeqt::consoleLog() QTest::ignoreMessage(QtDebugMsg, qPrintable(testBoolean.arg(startLineNumber++))); QTest::ignoreMessage(QtDebugMsg, qPrintable(testObject.arg(startLineNumber++))); QTest::ignoreMessage(QtDebugMsg, qPrintable(testObject.arg(startLineNumber++))); + QString testMix = QString::fromLatin1("1 pong! Object (%1:%2)").arg(testFileUrl.toString()); + QTest::ignoreMessage(QtDebugMsg, qPrintable(testMix.arg(startLineNumber++))); + testMix = QString::fromLatin1("1 [ping,pong] Object 2 (%1:%2)").arg(testFileUrl.toString()); + QTest::ignoreMessage(QtDebugMsg, qPrintable(testMix.arg(startLineNumber++))); QString testException = QString(QLatin1String("%1:%2: ReferenceError: Can't find variable: exception")).arg(testFileUrl.toString()); QTest::ignoreMessage(QtWarningMsg, qPrintable(testException.arg(startLineNumber++))); |