summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools/qstring/tst_qstring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools/qstring/tst_qstring.cpp')
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 414ba2d8cf..03436375dd 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -1066,6 +1066,7 @@ void tst_QString::acc_01()
QT_WARNING_PUSH
QT_WARNING_DISABLE_GCC("-Wformat-security")
+QT_WARNING_DISABLE_CLANG("-Wformat-security")
void tst_QString::isNull()
{
@@ -3817,7 +3818,7 @@ void tst_QString::startsWith()
QVERIFY( !a.startsWith(QLatin1Char('x')) );
QVERIFY( !a.startsWith(QChar()) );
- a = QString::null;
+ a = QString();
QVERIFY( !a.startsWith("") );
QVERIFY( a.startsWith(QString::null) );
QVERIFY( !a.startsWith("ABC") );
@@ -3927,7 +3928,7 @@ void tst_QString::endsWith()
QVERIFY( a.endsWith(QLatin1String(0)) );
QVERIFY( !a.endsWith(QLatin1String("ABC")) );
- a = QString::null;
+ a = QString();
QVERIFY( !a.endsWith("") );
QVERIFY( a.endsWith(QString::null) );
QVERIFY( !a.endsWith("ABC") );
@@ -4272,11 +4273,7 @@ void tst_QString::local8Bit_data()
QTest::addColumn<QString>("local8Bit");
QTest::addColumn<QByteArray>("result");
-/*
- QString::local8Bit() called on a null QString returns an _empty_
- QByteArray.
-*/
- QTest::newRow("nullString") << QString() << QByteArray("");
+ QTest::newRow("nullString") << QString() << QByteArray();
QTest::newRow("emptyString") << QString("") << QByteArray("");
QTest::newRow("string") << QString("test") << QByteArray("test");
@@ -6070,6 +6067,14 @@ void tst_QString::compare_data()
lower += QChar(QChar::lowSurrogate(0x10428));
QTest::newRow("data8") << upper << lower << -1 << 0;
+ QTest::newRow("vectorized-boundaries-7") << QString("1234567") << QString("abcdefg") << -1 << -1;
+ QTest::newRow("vectorized-boundaries-8") << QString("12345678") << QString("abcdefgh") << -1 << -1;
+ QTest::newRow("vectorized-boundaries-9") << QString("123456789") << QString("abcdefghi") << -1 << -1;
+
+ QTest::newRow("vectorized-boundaries-15") << QString("123456789012345") << QString("abcdefghiklmnop") << -1 << -1;
+ QTest::newRow("vectorized-boundaries-16") << QString("1234567890123456") << QString("abcdefghiklmnopq") << -1 << -1;
+ QTest::newRow("vectorized-boundaries-17") << QString("12345678901234567") << QString("abcdefghiklmnopqr") << -1 << -1;
+
// embedded nulls
// These don't work as of now. It's OK that these don't work since \0 is not a valid unicode
/*QTest::newRow("data10") << QString(QByteArray("\0", 1)) << QString(QByteArray("\0", 1)) << 0 << 0;
@@ -6337,7 +6342,7 @@ void tst_QString::repeatedSignature() const
{
/* repated() should be a const member. */
const QString string;
- string.repeated(3);
+ (void) string.repeated(3);
}
void tst_QString::repeated() const