diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-11-23 04:26:49 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-11-23 04:26:49 (GMT) |
commit | 3c4df26a8d184b728395c8aad26b05626176b7b5 (patch) | |
tree | 8c5a16a3822f61fbeb0b2405009aeab480ffe98b /tests/auto/declarative/qmlqt | |
parent | a8549cfee8b6ec393dcea6314e6ac7d6c102dc07 (diff) | |
download | Qt-3c4df26a8d184b728395c8aad26b05626176b7b5.zip Qt-3c4df26a8d184b728395c8aad26b05626176b7b5.tar.gz Qt-3c4df26a8d184b728395c8aad26b05626176b7b5.tar.bz2 |
Use console.log, not print.
Diffstat (limited to 'tests/auto/declarative/qmlqt')
-rw-r--r-- | tests/auto/declarative/qmlqt/data/consoleLog.qml | 8 | ||||
-rw-r--r-- | tests/auto/declarative/qmlqt/tst_qmlqt.cpp | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlqt/data/consoleLog.qml b/tests/auto/declarative/qmlqt/data/consoleLog.qml new file mode 100644 index 0000000..e657ff1 --- /dev/null +++ b/tests/auto/declarative/qmlqt/data/consoleLog.qml @@ -0,0 +1,8 @@ +import Qt 4.6 + +QtObject { + Component.onCompleted: { + console.log("completed", "ok") + console.log("completed ok") + } +} diff --git a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp index 292102a..21c5478 100644 --- a/tests/auto/declarative/qmlqt/tst_qmlqt.cpp +++ b/tests/auto/declarative/qmlqt/tst_qmlqt.cpp @@ -72,6 +72,7 @@ private slots: void md5(); void createComponent(); void createQmlObject(); + void consoleLog(); private: QmlEngine engine; @@ -353,6 +354,16 @@ void tst_qmlqt::createQmlObject() delete object; } +void tst_qmlqt::consoleLog() +{ + QTest::ignoreMessage(QtDebugMsg, "completed ok"); + QTest::ignoreMessage(QtDebugMsg, "completed ok"); + QmlComponent component(&engine, TEST_FILE("consoleLog.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); + delete object; +} + QTEST_MAIN(tst_qmlqt) #include "tst_qmlqt.moc" |