Fix autotests expecting a trailing whitespace for qDebug stream
authorKai Koehne <kai.koehne@digia.com>
Wed, 30 Oct 2013 15:59:04 +0000 (16:59 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 12 Dec 2013 09:52:27 +0000 (10:52 +0100)
The behavior of QDebug was fixed in qtbase. Update autotests
accordingly.

Change-Id: I36c442fb772ba35b71b6ab50b5f77a3f9c1463e3
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
tests/auto/qml/debugger/qqmldebugclient/tst_qqmldebugclient.cpp
tests/auto/qml/debugger/qqmldebugservice/tst_qqmldebugservice.cpp
tests/auto/qml/qqmlerror/tst_qqmlerror.cpp
tests/auto/qml/qqmlglobal/tst_qqmlglobal.cpp
tests/auto/qml/qqmlinstruction/tst_qqmlinstruction.cpp
tests/auto/qml/qqmllistcompositor/tst_qqmllistcompositor.cpp
tests/auto/qml/qqmlpropertymap/tst_qqmlpropertymap.cpp
tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp
tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp
tests/auto/quick/qquickview/tst_qquickview.cpp

index bca40e9..4a8025c 100644 (file)
@@ -124,7 +124,7 @@ void tst_QQmlDebugClient::state()
     QTRY_COMPARE(client.state(), QQmlDebugClient::Unavailable);
 
     // duplicate plugin name
-    QTest::ignoreMessage(QtWarningMsg, "QQmlDebugClient: Conflicting plugin name \"tst_QQmlDebugClient::state()\" ");
+    QTest::ignoreMessage(QtWarningMsg, "QQmlDebugClient: Conflicting plugin name \"tst_QQmlDebugClient::state()\"");
     QQmlDebugClient client2("tst_QQmlDebugClient::state()", m_conn);
     QCOMPARE(client2.state(), QQmlDebugClient::NotConnected);
 
index 1c1d84f..c50bb10 100644 (file)
@@ -164,7 +164,7 @@ void tst_QQmlDebugService::state()
 
     QTRY_COMPARE(service.state(), QQmlDebugService::Unavailable);
 
-    QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Conflicting plugin name \"tst_QQmlDebugService::state()\" ");
+    QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Conflicting plugin name \"tst_QQmlDebugService::state()\"");
     QQmlDebugTestService duplicate("tst_QQmlDebugService::state()");
     QCOMPARE(duplicate.state(), QQmlDebugService::NotConnected);
 }
@@ -183,7 +183,7 @@ void tst_QQmlDebugService::sendMessage()
     QByteArray resp = client.waitForResponse();
     QCOMPARE(resp, msg);
 
-    QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Conflicting plugin name \"tst_QQmlDebugService::sendMessage()\" ");
+    QTest::ignoreMessage(QtWarningMsg, "QQmlDebugService: Conflicting plugin name \"tst_QQmlDebugService::sendMessage()\"");
     QQmlDebugTestService duplicate("tst_QQmlDebugService::sendMessage()");
     duplicate.sendMessage("msg");
 }
index 44fbb0a..c3d8a15 100644 (file)
@@ -203,7 +203,7 @@ void tst_qqmlerror::debug()
         error.setLine(92);
         error.setColumn(13);
 
-        QTest::ignoreMessage(QtWarningMsg, "http://www.qt-project.org/main.qml:92:13: An Error ");
+        QTest::ignoreMessage(QtWarningMsg, "http://www.qt-project.org/main.qml:92:13: An Error");
         qWarning() << error;
     }
 
index 793da64..2d7e0a8 100644 (file)
@@ -63,7 +63,7 @@ void tst_qqmlglobal::initTestCase()
 
 void tst_qqmlglobal::colorProviderWarning()
 {
-    const QLatin1String expected("Warning: QQml_colorProvider: no color provider has been set! ");
+    const QLatin1String expected("Warning: QQml_colorProvider: no color provider has been set!");
     QTest::ignoreMessage(QtWarningMsg, expected.data());
     QQml_colorProvider();
 }
index f29c3a2..9d62aa2 100644 (file)
@@ -500,7 +500,7 @@ void tst_qqmlinstruction::dump()
         << "8\t\tSTORE_INTEGER\t\t5\t9"
         << "9\t\tSTORE_BOOL\t\t6\ttrue"
         << "10\t\tSTORE_STRING\t\t7\t1\t\t\"Test String\""
-        << "11\t\tSTORE_URL\t\t8\t0\t\tQUrl(\"http://www.qt-project.org\") "
+        << "11\t\tSTORE_URL\t\t8\t0\t\tQUrl(\"http://www.qt-project.org\")"
         << "12\t\tSTORE_COLOR\t\t9\t\t\t\"ff00ff00\""
         << "13\t\tSTORE_DATE\t\t10\t9"
         << "14\t\tSTORE_TIME\t\t11"
@@ -552,7 +552,6 @@ void tst_qqmlinstruction::dump()
 
     data->dumpInstructions();
 
-    QSKIP("Disable test temporarily until codereview.qt-project.org/#change,69731 integrated");
     const int messageCount = messageHandler.messages().count();
     QCOMPARE(messageCount, expect.count());
     for (int ii = 0; ii < messageCount; ++ii) {
index d5e85f4..1431648 100644 (file)
@@ -1725,11 +1725,11 @@ void tst_qqmllistcompositor::changeDebug()
 
 void tst_qqmllistcompositor::groupDebug()
 {
-    QTest::ignoreMessage(QtDebugMsg, "Default ");
+    QTest::ignoreMessage(QtDebugMsg, "Default");
     qDebug() << C::Default;
-    QTest::ignoreMessage(QtDebugMsg, "Cache ");
+    QTest::ignoreMessage(QtDebugMsg, "Cache");
     qDebug() << C::Cache;
-    QTest::ignoreMessage(QtDebugMsg, "Group3 ");
+    QTest::ignoreMessage(QtDebugMsg, "Group3");
     qDebug() << Selection;
 }
 
index ca212d3..d76c11b 100644 (file)
@@ -86,21 +86,21 @@ void tst_QQmlPropertyMap::insert()
 
     //inserting property names same with existing method(signal, slot, method) names is not allowed
     //QQmlPropertyMap has an invokable keys() method
-    QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"keys\" is not permitted, conflicts with internal symbols. ");
+    QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"keys\" is not permitted, conflicts with internal symbols.");
     map.insert(QLatin1String("keys"), 1);
     QVERIFY(map.keys().count() == 2);
     QVERIFY(!map.contains(QLatin1String("keys")));
     QVERIFY(map.value(QLatin1String("keys")).isNull());
 
     //QQmlPropertyMap has a deleteLater() slot
-    QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"deleteLater\" is not permitted, conflicts with internal symbols. ");
+    QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"deleteLater\" is not permitted, conflicts with internal symbols.");
     map.insert(QLatin1String("deleteLater"), 1);
     QVERIFY(map.keys().count() == 2);
     QVERIFY(!map.contains(QLatin1String("deleteLater")));
     QVERIFY(map.value(QLatin1String("deleteLater")).isNull());
 
     //QQmlPropertyMap has an valueChanged() signal
-    QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"valueChanged\" is not permitted, conflicts with internal symbols. ");
+    QTest::ignoreMessage(QtWarningMsg, "Creating property with name \"valueChanged\" is not permitted, conflicts with internal symbols.");
     map.insert(QLatin1String("valueChanged"), 1);
     QVERIFY(map.keys().count() == 2);
     QVERIFY(!map.contains(QLatin1String("valueChanged")));
index 7c0507d..5b8695f 100644 (file)
@@ -804,7 +804,7 @@ void tst_qqmlvaluetypes::font()
     // Test pixelSize and pointSize
     {
         QQmlComponent component(&engine, testFileUrl("font_write.3.qml"));
-        QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. ");
+        QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size.");
         MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
         QVERIFY(object != 0);
 
@@ -814,7 +814,7 @@ void tst_qqmlvaluetypes::font()
     }
     {
         QQmlComponent component(&engine, testFileUrl("font_write.4.qml"));
-        QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size. ");
+        QTest::ignoreMessage(QtWarningMsg, "Both point size and pixel size set. Using pixel size.");
         MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create());
         QVERIFY(object != 0);
 
index ff95547..8bf9d14 100644 (file)
@@ -2663,8 +2663,8 @@ void tst_qquicktextedit::delegateLoading_data()
 
     // import installed
     QTest::newRow("pass") << "cursorHttpTestPass.qml" << "";
-    QTest::newRow("fail1") << "cursorHttpTestFail1.qml" << "http://localhost:42332/FailItem.qml: Remote host closed the connection ";
-    QTest::newRow("fail2") << "cursorHttpTestFail2.qml" << "http://localhost:42332/ErrItem.qml:4:5: Fungus is not a type ";
+    QTest::newRow("fail1") << "cursorHttpTestFail1.qml" << "http://localhost:42332/FailItem.qml: Remote host closed the connection";
+    QTest::newRow("fail2") << "cursorHttpTestFail2.qml" << "http://localhost:42332/ErrItem.qml:4:5: Fungus is not a type";
 }
 
 void tst_qquicktextedit::delegateLoading()
index a4ed126..77aeba9 100644 (file)
@@ -229,7 +229,7 @@ void tst_QQuickView::engine()
     QCOMPARE(view3->engine(), view4->engine());
     delete view3;
     QVERIFY(!view4->engine());
-    QTest::ignoreMessage(QtWarningMsg, "QQuickView: invalid qml engine. ");
+    QTest::ignoreMessage(QtWarningMsg, "QQuickView: invalid qml engine.");
     view4->setSource(QUrl());
 
     QCOMPARE(view4->status(), QQuickView::Error);