diff options
Diffstat (limited to 'tests/auto/corelib/text')
-rw-r--r-- | tests/auto/corelib/text/qlocale/tst_qlocale.cpp | 3 | ||||
-rw-r--r-- | tests/auto/corelib/text/qstring/tst_qstring.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp index 4ee6c6df75..6bd9e5c25a 100644 --- a/tests/auto/corelib/text/qlocale/tst_qlocale.cpp +++ b/tests/auto/corelib/text/qlocale/tst_qlocale.cpp @@ -2108,8 +2108,7 @@ void tst_QLocale::windowsDefaultLocale() QCOMPARE(locale.toString(QDate(1974, 12, 1), QLocale::NarrowFormat), locale.toString(QDate(1974, 12, 1), QLocale::ShortFormat)); QCOMPARE(locale.toString(QDate(1974, 12, 1), QLocale::LongFormat), QString("1@12@1974")); - const QString expectedFormattedShortTimeSeconds = QStringLiteral("1^2^3"); - const QString expectedFormattedShortTime = QStringLiteral("1^2"); + const QString expectedFormattedShortTime = QStringLiteral("1^2^3"); QCOMPARE(locale.toString(QTime(1,2,3), QLocale::ShortFormat), expectedFormattedShortTime); QCOMPARE(locale.toString(QTime(1,2,3), QLocale::NarrowFormat), locale.toString(QTime(1,2,3), QLocale::ShortFormat)); diff --git a/tests/auto/corelib/text/qstring/tst_qstring.cpp b/tests/auto/corelib/text/qstring/tst_qstring.cpp index 878988d425..90f7f63192 100644 --- a/tests/auto/corelib/text/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/text/qstring/tst_qstring.cpp @@ -4876,6 +4876,9 @@ void tst_QString::arg() QCOMPARE( s4.arg("foo", 10), QLatin1String("[ foo]") ); QCOMPARE( s4.arg("foo", -10), QLatin1String("[foo ]") ); + // QStringRef argument in multi-arg: + QCOMPARE(QString("%1;%2").arg(QStringRef(), QString()), ";"); + QString firstName( "James" ); QString lastName( "Bond" ); QString fullName = QString( "My name is %2, %1 %2" ) |