diff options
Diffstat (limited to 'tests/auto/corelib/io/qdebug/tst_qdebug.cpp')
-rw-r--r-- | tests/auto/corelib/io/qdebug/tst_qdebug.cpp | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp index 0b54f53517..3dbda13643 100644 --- a/tests/auto/corelib/io/qdebug/tst_qdebug.cpp +++ b/tests/auto/corelib/io/qdebug/tst_qdebug.cpp @@ -66,7 +66,6 @@ private slots: void veryLongWarningMessage() const; void qDebugQChar() const; void qDebugQString() const; - void qDebugQStringRef() const; void qDebugQStringView() const; void qDebugQLatin1String() const; void qDebugQByteArray() const; @@ -438,7 +437,7 @@ void tst_QDebug::qDebugQString() const QString file, function; int line = 0; const QString in(QLatin1String("input")); - const QStringRef inRef(&in); + const QStringView inRef{ in }; MessageHandlerSetter mhs(myMessageHandler); { qDebug() << inRef; } @@ -509,47 +508,6 @@ void tst_QDebug::qDebugQString() const QCOMPARE(s_msg, QString("\"\\uDC00\\uD800x\\uD800\"")); } -void tst_QDebug::qDebugQStringRef() const -{ - /* Use a basic string. */ - { - QString file, function; - int line = 0; - const QString in(QLatin1String("input")); - const QStringRef inRef(&in); - - MessageHandlerSetter mhs(myMessageHandler); - { qDebug() << inRef; } -#ifndef QT_NO_MESSAGELOGCONTEXT - file = __FILE__; line = __LINE__ - 2; function = Q_FUNC_INFO; -#endif - QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"input\"")); - QCOMPARE(QString::fromLatin1(s_file), file); - QCOMPARE(s_line, line); - QCOMPARE(QString::fromLatin1(s_function), function); - } - - /* Use a null QStringRef. */ - { - QString file, function; - int line = 0; - - const QStringRef inRef; - - MessageHandlerSetter mhs(myMessageHandler); - { qDebug() << inRef; } -#ifndef QT_NO_MESSAGELOGCONTEXT - file = __FILE__; line = __LINE__ - 2; function = Q_FUNC_INFO; -#endif - QCOMPARE(s_msgType, QtDebugMsg); - QCOMPARE(s_msg, QString::fromLatin1("\"\"")); - QCOMPARE(QString::fromLatin1(s_file), file); - QCOMPARE(s_line, line); - QCOMPARE(QString::fromLatin1(s_function), function); - } -} - void tst_QDebug::qDebugQStringView() const { /* Use a basic string. */ |