summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/tools')
-rw-r--r--tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp36
-rw-r--r--tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp4
-rw-r--r--tests/auto/corelib/tools/qdate/tst_qdate.cpp26
-rw-r--r--tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp26
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp4
-rw-r--r--tests/auto/corelib/tools/qstring/tst_qstring.cpp58
-rw-r--r--tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp16
-rw-r--r--tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp20
-rw-r--r--tests/auto/corelib/tools/qstringref/tst_qstringref.cpp24
-rw-r--r--tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp16
10 files changed, 115 insertions, 115 deletions
diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
index 40e4cc398f..5e53683abd 100644
--- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
+++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp
@@ -865,7 +865,7 @@ void tst_QByteArray::indexOf_data()
QTest::newRow("BoyerMooreStressTest4") << QByteArray(veryBigHaystack) << QByteArray(veryBigHaystack + 'c') << 0 << -1;
QTest::newRow("BoyerMooreStressTest5") << QByteArray(veryBigHaystack) << QByteArray('c' + veryBigHaystack) << 0 << -1;
QTest::newRow("BoyerMooreStressTest6") << QByteArray('d' + veryBigHaystack) << QByteArray('c' + veryBigHaystack) << 0 << -1;
- QTest::newRow("BoyerMooreStressTest6") << QByteArray(veryBigHaystack + 'c') << QByteArray('c' + veryBigHaystack) << 0 << -1;
+ QTest::newRow("BoyerMooreStressTest7") << QByteArray(veryBigHaystack + 'c') << QByteArray('c' + veryBigHaystack) << 0 << -1;
}
void tst_QByteArray::indexOf()
@@ -988,13 +988,13 @@ void tst_QByteArray::toInt_data()
QTest::addColumn<bool>("expectedok");
QTest::newRow("base 10") << QByteArray("100") << 10 << int(100) << true;
- QTest::newRow("base 16") << QByteArray("100") << 16 << int(256) << true;
- QTest::newRow("base 16") << QByteArray("0400") << 16 << int(1024) << true;
+ QTest::newRow("base 16-1") << QByteArray("100") << 16 << int(256) << true;
+ QTest::newRow("base 16-2") << QByteArray("0400") << 16 << int(1024) << true;
QTest::newRow("base 2") << QByteArray("1111") << 2 << int(15) << true;
QTest::newRow("base 8") << QByteArray("100") << 8 << int(64) << true;
- QTest::newRow("base 0") << QByteArray("0x10") << 0 << int(16) << true;
- QTest::newRow("base 0") << QByteArray("10") << 0 << int(10) << true;
- QTest::newRow("base 0") << QByteArray("010") << 0 << int(8) << true;
+ QTest::newRow("base 0-1") << QByteArray("0x10") << 0 << int(16) << true;
+ QTest::newRow("base 0-2") << QByteArray("10") << 0 << int(10) << true;
+ QTest::newRow("base 0-3") << QByteArray("010") << 0 << int(8) << true;
QTest::newRow("empty") << QByteArray() << 0 << int(0) << false;
// using fromRawData
@@ -1002,7 +1002,7 @@ void tst_QByteArray::toInt_data()
QTest::newRow("raw2") << QByteArray::fromRawData("1foo", 1) << 10 << 1 << true;
QTest::newRow("raw3") << QByteArray::fromRawData("12", 1) << 10 << 1 << true;
QTest::newRow("raw4") << QByteArray::fromRawData("123456789", 1) << 10 << 1 << true;
- QTest::newRow("raw4") << QByteArray::fromRawData("123456789", 2) << 10 << 12 << true;
+ QTest::newRow("raw5") << QByteArray::fromRawData("123456789", 2) << 10 << 12 << true;
QTest::newRow("raw-static") << QByteArray::fromRawData(&globalChar, 1) << 10 << 1 << true;
}
@@ -1394,58 +1394,58 @@ void tst_QByteArray::repeated_data() const
QTest::addColumn<int>("count" );
/* Empty strings. */
- QTest::newRow("")
+ QTest::newRow("data1")
<< QByteArray()
<< QByteArray()
<< 0;
- QTest::newRow("")
+ QTest::newRow("data2")
<< QByteArray()
<< QByteArray()
<< -1004;
- QTest::newRow("")
+ QTest::newRow("data3")
<< QByteArray()
<< QByteArray()
<< 1;
- QTest::newRow("")
+ QTest::newRow("data4")
<< QByteArray()
<< QByteArray()
<< 5;
/* On simple string. */
- QTest::newRow("")
+ QTest::newRow("data5")
<< QByteArray("abc")
<< QByteArray()
<< -1004;
- QTest::newRow("")
+ QTest::newRow("data6")
<< QByteArray("abc")
<< QByteArray()
<< -1;
- QTest::newRow("")
+ QTest::newRow("data7")
<< QByteArray("abc")
<< QByteArray()
<< 0;
- QTest::newRow("")
+ QTest::newRow("data8")
<< QByteArray("abc")
<< QByteArray("abc")
<< 1;
- QTest::newRow("")
+ QTest::newRow("data9")
<< QByteArray(("abc"))
<< QByteArray(("abcabc"))
<< 2;
- QTest::newRow("")
+ QTest::newRow("data10")
<< QByteArray(("abc"))
<< QByteArray(("abcabcabc"))
<< 3;
- QTest::newRow("")
+ QTest::newRow("data11")
<< QByteArray(("abc"))
<< QByteArray(("abcabcabcabc"))
<< 4;
diff --git a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
index 3a257c2f11..0f35089ff7 100644
--- a/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
+++ b/tests/auto/corelib/tools/qcryptographichash/tst_qcryptographichash.cpp
@@ -158,8 +158,8 @@ void tst_QCryptographicHash::files_data() {
QTest::addColumn<QString>("filename");
QTest::addColumn<QCryptographicHash::Algorithm>("algorithm");
QTest::addColumn<QByteArray>("md5sum");
- QTest::newRow("Line") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5");
- QTest::newRow("Line") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e");
+ QTest::newRow("data1") << QString::fromAscii("data/2c1517dad3678f03917f15849b052fd5.md5") << QCryptographicHash::Md5 << QByteArray("2c1517dad3678f03917f15849b052fd5");
+ QTest::newRow("data2") << QString::fromAscii("data/d41d8cd98f00b204e9800998ecf8427e.md5") << QCryptographicHash::Md5 << QByteArray("d41d8cd98f00b204e9800998ecf8427e");
}
diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
index 4921a7e734..258dbf8625 100644
--- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp
+++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp
@@ -147,14 +147,14 @@ void tst_QDate::isValid_data()
QTest::newRow("month 13") << 2000 << 13 << 1 << nullJd << false;
// test leap years
- QTest::newRow("non-leap") << 2006 << 2 << 29 << nullJd << false;
- QTest::newRow("normal leap") << 2004 << 2 << 29 << qint64(2453065) << true;
- QTest::newRow("century leap") << 1900 << 2 << 29 << nullJd << false;
- QTest::newRow("century leap") << 2100 << 2 << 29 << nullJd << false;
- QTest::newRow("400-years leap") << 2000 << 2 << 29 << qint64(2451604) << true;
- QTest::newRow("400-years leap 2") << 2400 << 2 << 29 << qint64(2597701) << true;
- QTest::newRow("400-years leap 3") << 1600 << 2 << 29 << qint64(2305507) << true;
- QTest::newRow("year 0") << 0 << 2 << 27 << nullJd << false;
+ QTest::newRow("non-leap") << 2006 << 2 << 29 << nullJd << false;
+ QTest::newRow("normal leap") << 2004 << 2 << 29 << qint64(2453065) << true;
+ QTest::newRow("century leap 1900") << 1900 << 2 << 29 << nullJd << false;
+ QTest::newRow("century leap 2100") << 2100 << 2 << 29 << nullJd << false;
+ QTest::newRow("400-years leap 2000") << 2000 << 2 << 29 << qint64(2451604) << true;
+ QTest::newRow("400-years leap 2400") << 2400 << 2 << 29 << qint64(2597701) << true;
+ QTest::newRow("400-years leap 1600") << 1600 << 2 << 29 << qint64(2305507) << true;
+ QTest::newRow("year 0") << 0 << 2 << 27 << nullJd << false;
// test the number of days in months:
QTest::newRow("jan") << 2000 << 1 << 31 << qint64(2451575) << true;
@@ -262,7 +262,7 @@ void tst_QDate::dayOfWeek_data()
QTest::newRow("data8") << -4800 << 1 << 1 << 1;
QTest::newRow("data9") << -4800 << 1 << 2 << 2;
QTest::newRow("data10") << -4800 << 1 << 3 << 3;
- QTest::newRow("data12") << -4800 << 1 << 4 << 4;
+ QTest::newRow("data11") << -4800 << 1 << 4 << 4;
QTest::newRow("data12") << -4800 << 1 << 5 << 5;
QTest::newRow("data13") << -4800 << 1 << 6 << 6;
QTest::newRow("data14") << -4800 << 1 << 7 << 7;
@@ -580,10 +580,10 @@ void tst_QDate::addMonths_data()
QTest::newRow( "data14" ) << 2000 << 2 << 29 << -12 << 1999 << 2 << 28;
// year sign change:
- QTest::newRow( "data14" ) << 1 << 1 << 1 << -1 << -1 << 12 << 1;
- QTest::newRow( "data15" ) << 1 << 1 << 1 << -12 << -1 << 1 << 1;
- QTest::newRow( "data16" ) << -1 << 12 << 1 << 1 << 1 << 1 << 1;
- QTest::newRow( "data17" ) << -1 << 1 << 1 << 12 << 1 << 1 << 1;
+ QTest::newRow( "data15" ) << 1 << 1 << 1 << -1 << -1 << 12 << 1;
+ QTest::newRow( "data16" ) << 1 << 1 << 1 << -12 << -1 << 1 << 1;
+ QTest::newRow( "data17" ) << -1 << 12 << 1 << 1 << 1 << 1 << 1;
+ QTest::newRow( "data18" ) << -1 << 1 << 1 << 12 << 1 << 1 << 1;
}
void tst_QDate::addYears()
diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
index af8deefa4c..eb6af23ba5 100644
--- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
+++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
@@ -1363,19 +1363,19 @@ void tst_QDateTime::dateFromStringFormat_data()
QTest::newRow("data24") << tuesday << QString("dddd") << QDate(1900, 1, 2);
QTest::newRow("data25") << wednesday << QString("dddd") << QDate(1900, 1, 3);
QTest::newRow("data26") << thursday << QString("dddd") << QDate(1900, 1, 4);
- QTest::newRow("data26") << friday << QString("dddd") << QDate(1900, 1, 5);
- QTest::newRow("data27") << saturday << QString("dddd") << QDate(1900, 1, 6);
- QTest::newRow("data28") << sunday << QString("dddd") << QDate(1900, 1, 7);
-
- QTest::newRow("data29") << monday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 2);
- QTest::newRow("data30") << tuesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 3);
- QTest::newRow("data31") << wednesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 4);
- QTest::newRow("data32") << thursday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 5);
- QTest::newRow("data33") << friday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 6);
- QTest::newRow("data34") << saturday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 7);
- QTest::newRow("data35") << sunday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 1);
-
- QTest::newRow("data36 ") << tuesday + " 2007 " + march << QString("dddd yyyy MMMM") << QDate(2007, 3, 6);
+ QTest::newRow("data27") << friday << QString("dddd") << QDate(1900, 1, 5);
+ QTest::newRow("data28") << saturday << QString("dddd") << QDate(1900, 1, 6);
+ QTest::newRow("data29") << sunday << QString("dddd") << QDate(1900, 1, 7);
+
+ QTest::newRow("data30") << monday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 2);
+ QTest::newRow("data31") << tuesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 3);
+ QTest::newRow("data32") << wednesday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 4);
+ QTest::newRow("data33") << thursday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 5);
+ QTest::newRow("data34") << friday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 6);
+ QTest::newRow("data35") << saturday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 7);
+ QTest::newRow("data36") << sunday + " 2006" << QString("dddd yyyy") << QDate(2006, 1, 1);
+
+ QTest::newRow("data37") << tuesday + " 2007 " + march << QString("dddd yyyy MMMM") << QDate(2007, 3, 6);
}
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 5544c0fd71..e23448c056 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -934,7 +934,7 @@ void tst_QLocale::formatDateTime_data()
<< "\"yymm\"" << "\"7414\"";
QTest::newRow("27C") << "C" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 13))
<< "'\"yymm\"'" << "\"yymm\"";
- QTest::newRow("27C") << "C" << QDateTime()
+ QTest::newRow("28C") << "C" << QDateTime()
<< "'\"yymm\"'" << "";
QTest::newRow("1no_NO") << "no_NO" << QDateTime(QDate(1974, 12, 1), QTime(5, 14, 13))
@@ -976,7 +976,7 @@ void tst_QLocale::formatDateTime_data()
<< "\"yymm\"" << "\"7414\"";
QTest::newRow("27no_NO") << "no_NO" << QDateTime(QDate(1974, 12, 1), QTime(15, 14, 13))
<< "'\"yymm\"'" << "\"yymm\"";
- QTest::newRow("27no_NO") << "no_NO" << QDateTime()
+ QTest::newRow("28no_NO") << "no_NO" << QDateTime()
<< "'\"yymm\"'" << "";
}
diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
index 3be7302223..3fb253c646 100644
--- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp
+++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp
@@ -447,7 +447,7 @@ void tst_QString::replace_uint_uint_data()
QTest::newRow( "rep08" ) << QString("ACABCAB") << 3 << 2 << QString("XX") << QString("ACAXXAB");
QTest::newRow( "rep09" ) << QString("ACABCAB") << 4 << 2 << QString("XX") << QString("ACABXXB");
QTest::newRow( "rep10" ) << QString("ACABCAB") << 5 << 2 << QString("XX") << QString("ACABCXX");
- QTest::newRow( "rep10" ) << QString("ACABCAB") << 6 << 2 << QString("XX") << QString("ACABCAXX");
+ QTest::newRow( "rep11" ) << QString("ACABCAB") << 6 << 2 << QString("XX") << QString("ACABCAXX");
QTest::newRow( "rep12" ) << QString() << 0 << 10 << QString("X") << QString("X");
QTest::newRow( "rep13" ) << QString("short") << 0 << 10 << QString("X") << QString("X");
QTest::newRow( "rep14" ) << QString() << 0 << 10 << QString("XX") << QString("XX");
@@ -1042,7 +1042,7 @@ void tst_QString::indexOf_data()
QTest::newRow("BoyerMooreStressTest4") << veryBigHaystack << QString(veryBigHaystack + 'c') << 0 << true << -1;
QTest::newRow("BoyerMooreStressTest5") << veryBigHaystack << QString('c' + veryBigHaystack) << 0 << true << -1;
QTest::newRow("BoyerMooreStressTest6") << QString('d' + veryBigHaystack) << QString('c' + veryBigHaystack) << 0 << true << -1;
- QTest::newRow("BoyerMooreStressTest6") << QString(veryBigHaystack + 'c') << QString('c' + veryBigHaystack) << 0 << true << -1;
+ QTest::newRow("BoyerMooreStressTest7") << QString(veryBigHaystack + 'c') << QString('c' + veryBigHaystack) << 0 << true << -1;
QTest::newRow("BoyerMooreInsensitiveStressTest") << veryBigHaystack << veryBigHaystack << 0 << false << 0;
@@ -1211,15 +1211,15 @@ void tst_QString::lastIndexOf_data()
QTest::newRow("4") << a << "G" << 14 << 14 << true;
QTest::newRow("5") << a << "G" << 13 << 11 << true;
QTest::newRow("6") << a << "B" << a.size() - 1 << 1 << true;
- QTest::newRow("6") << a << "B" << - 1 << 1 << true;
- QTest::newRow("7") << a << "B" << 1 << 1 << true;
- QTest::newRow("8") << a << "B" << 0 << -1 << true;
+ QTest::newRow("7") << a << "B" << - 1 << 1 << true;
+ QTest::newRow("8") << a << "B" << 1 << 1 << true;
+ QTest::newRow("9") << a << "B" << 0 << -1 << true;
- QTest::newRow("9") << a << "G" << -1 << a.size()-1 << true;
- QTest::newRow("10") << a << "G" << a.size()-1 << a.size()-1 << true;
- QTest::newRow("11") << a << "G" << a.size() << -1 << true;
- QTest::newRow("12") << a << "A" << 0 << 0 << true;
- QTest::newRow("13") << a << "A" << -1*a.size() << 0 << true;
+ QTest::newRow("10") << a << "G" << -1 << a.size()-1 << true;
+ QTest::newRow("11") << a << "G" << a.size()-1 << a.size()-1 << true;
+ QTest::newRow("12") << a << "G" << a.size() << -1 << true;
+ QTest::newRow("13") << a << "A" << 0 << 0 << true;
+ QTest::newRow("14") << a << "A" << -1*a.size() << 0 << true;
QTest::newRow("15") << a << "efg" << 0 << -1 << false;
QTest::newRow("16") << a << "efg" << a.size() << -1 << false;
@@ -4672,8 +4672,8 @@ void tst_QString::compare_data()
// different length
QTest::newRow("data6") << QString("abcdef") << QString("abc") << 1 << 1;
- QTest::newRow("data6") << QString("abCdef") << QString("abc") << -1 << 1;
- QTest::newRow("data7") << QString("abc") << QString("abcdef") << -1 << -1;
+ QTest::newRow("data7") << QString("abCdef") << QString("abc") << -1 << 1;
+ QTest::newRow("data8") << QString("abc") << QString("abcdef") << -1 << -1;
QString upper;
upper += QChar(QChar::highSurrogate(0x10400));
@@ -4685,12 +4685,12 @@ void tst_QString::compare_data()
// 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("data9") << QString(QByteArray("\0", 1)) << QString(QByteArray("\0", 1)) << 0 << 0;
- QTest::newRow("data10") << QString(QByteArray("\0", 1)) << QString("") << 1 << 1;
- QTest::newRow("data11") << QString("") << QString(QByteArray("\0", 1)) << -1 << -1;
- QTest::newRow("data12") << QString("ab\0c") << QString(QByteArray("ab\0c", 4)) << 0 << 0;
- QTest::newRow("data13") << QString(QByteArray("ab\0c", 4)) << QString("abc") << -1 << -1;
- QTest::newRow("data14") << QString("abc") << QString(QByteArray("ab\0c", 4)) << 1 << 1;*/
+ /*QTest::newRow("data10") << QString(QByteArray("\0", 1)) << QString(QByteArray("\0", 1)) << 0 << 0;
+ QTest::newRow("data11") << QString(QByteArray("\0", 1)) << QString("") << 1 << 1;
+ QTest::newRow("data12") << QString("") << QString(QByteArray("\0", 1)) << -1 << -1;
+ QTest::newRow("data13") << QString("ab\0c") << QString(QByteArray("ab\0c", 4)) << 0 << 0;
+ QTest::newRow("data14") << QString(QByteArray("ab\0c", 4)) << QString("abc") << -1 << -1;
+ QTest::newRow("data15") << QString("abc") << QString(QByteArray("ab\0c", 4)) << 1 << 1;*/
}
static bool isLatin(const QString &s)
@@ -4934,58 +4934,58 @@ void tst_QString::repeated_data() const
QTest::addColumn<int>("count" );
/* Empty strings. */
- QTest::newRow("")
+ QTest::newRow("data1")
<< QString()
<< QString()
<< 0;
- QTest::newRow("")
+ QTest::newRow("data2")
<< QString()
<< QString()
<< -1004;
- QTest::newRow("")
+ QTest::newRow("data3")
<< QString()
<< QString()
<< 1;
- QTest::newRow("")
+ QTest::newRow("data4")
<< QString()
<< QString()
<< 5;
/* On simple string. */
- QTest::newRow("")
+ QTest::newRow("data5")
<< QString(QLatin1String("abc"))
<< QString()
<< -1004;
- QTest::newRow("")
+ QTest::newRow("data6")
<< QString(QLatin1String("abc"))
<< QString()
<< -1;
- QTest::newRow("")
+ QTest::newRow("data7")
<< QString(QLatin1String("abc"))
<< QString()
<< 0;
- QTest::newRow("")
+ QTest::newRow("data8")
<< QString(QLatin1String("abc"))
<< QString(QLatin1String("abc"))
<< 1;
- QTest::newRow("")
+ QTest::newRow("data9")
<< QString(QLatin1String("abc"))
<< QString(QLatin1String("abcabc"))
<< 2;
- QTest::newRow("")
+ QTest::newRow("data10")
<< QString(QLatin1String("abc"))
<< QString(QLatin1String("abcabcabc"))
<< 3;
- QTest::newRow("")
+ QTest::newRow("data11")
<< QString(QLatin1String("abc"))
<< QString(QLatin1String("abcabcabcabc"))
<< 4;
diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
index e3eb1a21ac..6066f7c8e0 100644
--- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
+++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp
@@ -193,8 +193,8 @@ void tst_QStringList::removeDuplicates_data()
QTest::addColumn<QString>("after");
QTest::addColumn<int>("count");
- QTest::newRow("empty") << "Hello,Hello" << "Hello" << 1;
- QTest::newRow("empty") << "Hello,World" << "Hello,World" << 0;
+ QTest::newRow("empty-1") << "Hello,Hello" << "Hello" << 1;
+ QTest::newRow("empty-2") << "Hello,World" << "Hello,World" << 0;
}
void tst_QStringList::removeDuplicates()
@@ -245,35 +245,35 @@ void tst_QStringList::join_data() const
QTest::addColumn<QString>("separator");
QTest::addColumn<QString>("expectedResult");
- QTest::newRow("")
+ QTest::newRow("data1")
<< QStringList()
<< QString()
<< QString();
- QTest::newRow("")
+ QTest::newRow("data2")
<< QStringList()
<< QString(QLatin1String("separator"))
<< QString();
- QTest::newRow("")
+ QTest::newRow("data3")
<< QStringList("one")
<< QString(QLatin1String("separator"))
<< QString("one");
- QTest::newRow("")
+ QTest::newRow("data4")
<< QStringList("one")
<< QString(QLatin1String("separator"))
<< QString("one");
- QTest::newRow("")
+ QTest::newRow("data5")
<< (QStringList()
<< QLatin1String("a")
<< QLatin1String("b"))
<< QString(QLatin1String(" "))
<< QString("a b");
- QTest::newRow("")
+ QTest::newRow("data6")
<< (QStringList()
<< QLatin1String("a")
<< QLatin1String("b")
diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
index ebbad86c81..5829c0e917 100644
--- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
+++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp
@@ -81,16 +81,16 @@ void tst_QStringMatcher::indexIn_data()
QTest::addColumn<QString>("haystack");
QTest::addColumn<int>("from");
QTest::addColumn<int>("indexIn");
- QTest::newRow("empty") << QString() << QString("foo") << 0 << 0;
- QTest::newRow("empty") << QString() << QString("foo") << 10 << -1;
- QTest::newRow("empty") << QString() << QString("foo") << -10 << 0;
-
- QTest::newRow("simple") << QString("a") << QString("foo") << 0 << -1;
- QTest::newRow("simple") << QString("a") << QString("bar") << 0 << 1;
- QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 0 << 26;
- QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 20 << 26;
- QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 26 << 26;
- QTest::newRow("harder") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 27 << -1;
+ QTest::newRow("empty-1") << QString() << QString("foo") << 0 << 0;
+ QTest::newRow("empty-2") << QString() << QString("foo") << 10 << -1;
+ QTest::newRow("empty-3") << QString() << QString("foo") << -10 << 0;
+
+ QTest::newRow("simple-1") << QString("a") << QString("foo") << 0 << -1;
+ QTest::newRow("simple-2") << QString("a") << QString("bar") << 0 << 1;
+ QTest::newRow("harder-1") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 0 << 26;
+ QTest::newRow("harder-2") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 20 << 26;
+ QTest::newRow("harder-3") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 26 << 26;
+ QTest::newRow("harder-4") << QString("foo") << QString("slkdf sldkjf slakjf lskd ffools ldjf") << 27 << -1;
}
void tst_QStringMatcher::indexIn()
diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
index 77d2101320..de01df2001 100644
--- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
+++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp
@@ -288,7 +288,7 @@ void tst_QStringRef::indexOf_data()
QTest::newRow("BoyerMooreStressTest4") << veryBigHaystack << veryBigHaystack + 'c' << 0 << true << -1;
QTest::newRow("BoyerMooreStressTest5") << veryBigHaystack << 'c' + veryBigHaystack << 0 << true << -1;
QTest::newRow("BoyerMooreStressTest6") << 'd' + veryBigHaystack << 'c' + veryBigHaystack << 0 << true << -1;
- QTest::newRow("BoyerMooreStressTest6") << veryBigHaystack + 'c' << 'c' + veryBigHaystack << 0 << true << -1;
+ QTest::newRow("BoyerMooreStressTest7") << veryBigHaystack + 'c' << 'c' + veryBigHaystack << 0 << true << -1;
QTest::newRow("BoyerMooreInsensitiveStressTest") << veryBigHaystack << veryBigHaystack << 0 << false << 0;
@@ -441,15 +441,15 @@ void tst_QStringRef::lastIndexOf_data()
QTest::newRow("4") << a << "G" << 14 << 14 << true;
QTest::newRow("5") << a << "G" << 13 << 11 << true;
QTest::newRow("6") << a << "B" << a.size() - 1 << 1 << true;
- QTest::newRow("6") << a << "B" << - 1 << 1 << true;
- QTest::newRow("7") << a << "B" << 1 << 1 << true;
- QTest::newRow("8") << a << "B" << 0 << -1 << true;
+ QTest::newRow("7") << a << "B" << - 1 << 1 << true;
+ QTest::newRow("8") << a << "B" << 1 << 1 << true;
+ QTest::newRow("9") << a << "B" << 0 << -1 << true;
- QTest::newRow("9") << a << "G" << -1 << a.size()-1 << true;
- QTest::newRow("10") << a << "G" << a.size()-1 << a.size()-1 << true;
- QTest::newRow("11") << a << "G" << a.size() << -1 << true;
- QTest::newRow("12") << a << "A" << 0 << 0 << true;
- QTest::newRow("13") << a << "A" << -1*a.size() << 0 << true;
+ QTest::newRow("10") << a << "G" << -1 << a.size()-1 << true;
+ QTest::newRow("11") << a << "G" << a.size()-1 << a.size()-1 << true;
+ QTest::newRow("12") << a << "G" << a.size() << -1 << true;
+ QTest::newRow("13") << a << "A" << 0 << 0 << true;
+ QTest::newRow("14") << a << "A" << -1*a.size() << 0 << true;
QTest::newRow("15") << a << "efg" << 0 << -1 << false;
QTest::newRow("16") << a << "efg" << a.size() << -1 << false;
@@ -777,8 +777,8 @@ void tst_QStringRef::compare_data()
// different length
QTest::newRow("data6") << QString("abcdef") << QString("abc") << 1 << 1;
- QTest::newRow("data6") << QString("abCdef") << QString("abc") << -1 << 1;
- QTest::newRow("data7") << QString("abc") << QString("abcdef") << -1 << -1;
+ QTest::newRow("data7") << QString("abCdef") << QString("abc") << -1 << 1;
+ QTest::newRow("data8") << QString("abc") << QString("abcdef") << -1 << -1;
QString upper;
upper += QChar(QChar::highSurrogate(0x10400));
@@ -786,7 +786,7 @@ void tst_QStringRef::compare_data()
QString lower;
lower += QChar(QChar::highSurrogate(0x10428));
lower += QChar(QChar::lowSurrogate(0x10428));
- QTest::newRow("data8") << upper << lower << -1 << 0;
+ QTest::newRow("data9") << upper << lower << -1 << 0;
}
static bool isLatin(const QString &s)
diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index 89dd01ac3a..b8ae709fd0 100644
--- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -302,22 +302,22 @@ void tst_QTextBoundaryFinder::toNextBoundary_data()
QList<int> boundaries;
boundaries << 0 << 3 << 4 << 7 << 8 << 11 << 12 << 13 << 16 << 17 << 20 << 21 << 24 << 25;
- QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \
+ QTest::newRow("data1") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word) \
<< boundaries;
boundaries.clear();
boundaries << 0 << 13 << 25;
- QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \
+ QTest::newRow("data2") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence) \
<< boundaries;
boundaries.clear();
boundaries << 0 << 4 << 8 << 13 << 17 << 21 << 25;
- QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \
+ QTest::newRow("data3") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line) \
<< boundaries;
boundaries.clear();
boundaries << 0 << 5 << 9 << 15 << 17 << 21 << 28;
- QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line)
+ QTest::newRow("data4") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line)
<< boundaries;
}
@@ -344,22 +344,22 @@ void tst_QTextBoundaryFinder::toPreviousBoundary_data()
QList<int> boundaries;
boundaries << 25 << 24 << 21 << 20 << 17 << 16 << 13 << 12 << 11 << 8 << 7 << 4 << 3 << 0;
- QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word)
+ QTest::newRow("data1") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Word)
<< boundaries;
boundaries.clear();
boundaries << 25 << 13 << 0;
- QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence)
+ QTest::newRow("data2") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Sentence)
<< boundaries;
boundaries.clear();
boundaries << 25 << 21 << 17 << 13 << 8 << 4 << 0;
- QTest::newRow("Line") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line)
+ QTest::newRow("data3") << QString("Aaa bbb ccc. Ddd eee fff.") << int(QTextBoundaryFinder::Line)
<< boundaries;
boundaries.clear();
boundaries << 28 << 21 << 17 << 15 << 9 << 5 << 0;
- QTest::newRow("Line") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line)
+ QTest::newRow("data4") << QString::fromUtf8("Diga-nos qualé a sua opinião") << int(QTextBoundaryFinder::Line)
<< boundaries;
}