diff options
author | Kai Koehne <kai.koehne@digia.com> | 2013-10-16 15:59:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-06 13:33:10 +0100 |
commit | 326e9c8962532f66109f94f224f891c4445ce87f (patch) | |
tree | 382c9c6eb7bc66382d095e944acaa912b9dfcb98 /tests/auto/corelib/io/qdebug | |
parent | 6c322a917ad57d57f0ee76825eab3e2e008c5bd4 (diff) |
Remove trailing space from QDebug stream
It's unexpected that all messages generated by the stream version
of qDebug and friends have a trailing space. It also makes switching
to categorized logging (which only supports the stream version) difficult,
since all autotests checking for debug output would have to be adapted.
Task-number: QTBUG-15256
Change-Id: I8d627a8379dc273d9689f5611184f03607b73823
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/corelib/io/qdebug')
-rw-r--r-- | tests/auto/corelib/io/qdebug/tst_qdebug.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp index f452efc1b3..29c7e6a81e 100644 --- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp +++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp @@ -65,8 +65,8 @@ void tst_QDebug::assignment() const QDebug debug1(QtDebugMsg); QDebug debug2(QtWarningMsg); - QTest::ignoreMessage(QtDebugMsg, "foo "); - QTest::ignoreMessage(QtWarningMsg, "bar 1 2 "); + QTest::ignoreMessage(QtDebugMsg, "foo"); + QTest::ignoreMessage(QtWarningMsg, "bar 1 2"); debug1 << "foo"; debug2 << "bar"; @@ -118,7 +118,7 @@ void tst_QDebug::warningWithoutDebug() const { qWarning() << "A qWarning() message"; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtWarningMsg); - QCOMPARE(s_msg, QString::fromLatin1("A qWarning() message ")); + QCOMPARE(s_msg, QString::fromLatin1("A qWarning() message")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -133,7 +133,7 @@ void tst_QDebug::criticalWithoutDebug() const { qCritical() << "A qCritical() message"; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtCriticalMsg); - QCOMPARE(s_msg, QString::fromLatin1("A qCritical() message ")); + QCOMPARE(s_msg, QString::fromLatin1("A qCritical() message")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -145,7 +145,7 @@ void tst_QDebug::debugWithBool() const { qDebug() << false << true; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("false true ")); + QCOMPARE(s_msg, QString::fromLatin1("false true")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -215,7 +215,7 @@ void tst_QDebug::stateSaver() const } d.space() << 42; } - QCOMPARE(s_msg, QString::fromLatin1("02a 42 ")); + QCOMPARE(s_msg, QString::fromLatin1("02a 42")); } void tst_QDebug::veryLongWarningMessage() const @@ -247,7 +247,7 @@ void tst_QDebug::qDebugQStringRef() const { qDebug() << inRef; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"input\" ")); + QCOMPARE(s_msg, QString::fromLatin1("\"input\"")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -261,7 +261,7 @@ void tst_QDebug::qDebugQStringRef() const { qDebug() << inRef; } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"\" ")); + QCOMPARE(s_msg, QString::fromLatin1("\"\"")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); @@ -274,7 +274,7 @@ void tst_QDebug::qDebugQLatin1String() const { qDebug() << QLatin1String("foo") << QLatin1String("") << QLatin1String("barbaz", 3); } QString file = __FILE__; int line = __LINE__ - 1; QString function = Q_FUNC_INFO; QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\" ")); + QCOMPARE(s_msg, QString::fromLatin1("\"foo\" \"\" \"bar\"")); QCOMPARE(QString::fromLatin1(s_file), file); QCOMPARE(s_line, line); QCOMPARE(QString::fromLatin1(s_function), function); |