Cleanup corelib autotests
Remove references to the old bug tracker. The data from the old bug tracker is no longer accessible, so these markers are meaningless. Change-Id: Ib9d029d52b70fd0a512b9532d65f03763eabfe57 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
parent
fad19e18af
commit
75b66dc8b0
@ -345,7 +345,6 @@ void tst_QBuffer::seekTest()
|
||||
}
|
||||
|
||||
// Special case 2: seeking to an arbitrary position beyond the buffer auto-expands it
|
||||
// (see Task 184730)
|
||||
{
|
||||
char c;
|
||||
const int offset = 1; // any positive integer will do
|
||||
|
@ -3057,7 +3057,6 @@ void tst_QDataStream::compatibility_Qt3()
|
||||
QDataStream in(stream);
|
||||
in.setVersion(QDataStream::Qt_3_3);
|
||||
|
||||
//task 196100
|
||||
quint32 type;
|
||||
in >> type;
|
||||
//29 is the type of a QByteArray in Qt3
|
||||
@ -3066,7 +3065,6 @@ void tst_QDataStream::compatibility_Qt3()
|
||||
in >> ba2;
|
||||
QCOMPARE(ba2, ba);
|
||||
|
||||
//task196415
|
||||
quint32 color;
|
||||
in >> color;
|
||||
QCOMPARE(color, invalidColor);
|
||||
|
@ -2363,9 +2363,7 @@ void tst_QFile::rename()
|
||||
|
||||
Here, we reproduce that condition by having a QFile sub-class with this
|
||||
peculiar atEnd() behavior.
|
||||
|
||||
See task 231583.
|
||||
*/
|
||||
*/
|
||||
void tst_QFile::renameWithAtEndSpecialFile() const
|
||||
{
|
||||
class PeculiarAtEnd : public QFile
|
||||
|
@ -447,7 +447,7 @@ void tst_QFileInfo::absolutePath_data()
|
||||
QString nonCurrentDrivePrefix =
|
||||
drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:");
|
||||
|
||||
// Make sure drive-relative paths return correct absolute paths (task 255326)
|
||||
// Make sure drive-relative paths return correct absolute paths.
|
||||
QTest::newRow("<current drive>:my.dll") << drivePrefix + "my.dll" << QDir::currentPath() << "my.dll";
|
||||
QTest::newRow("<not current drive>:my.dll") << nonCurrentDrivePrefix + "my.dll"
|
||||
<< nonCurrentDrivePrefix + "/"
|
||||
@ -460,7 +460,6 @@ void tst_QFileInfo::absolutePath_data()
|
||||
QTest::newRow("/test") << "/test" << drivePrefix + "/" << "test";
|
||||
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
|
||||
// see task 102898
|
||||
QTest::newRow("c:\\autoexec.bat") << "c:\\autoexec.bat" << "C:/"
|
||||
<< "autoexec.bat";
|
||||
#endif
|
||||
@ -498,7 +497,7 @@ void tst_QFileInfo::absFilePath_data()
|
||||
QTest::newRow(".") << curr << QDir::currentPath();
|
||||
QTest::newRow("absFilePath") << "c:\\home\\andy\\tmp.txt" << "C:/home/andy/tmp.txt";
|
||||
|
||||
// Make sure drive-relative paths return correct absolute paths (task 255326)
|
||||
// Make sure drive-relative paths return correct absolute paths.
|
||||
drivePrefix = QDir::currentPath().left(2);
|
||||
QString nonCurrentDrivePrefix =
|
||||
drivePrefix.left(1).compare("X", Qt::CaseInsensitive) == 0 ? QString("Y:") : QString("X:");
|
||||
@ -866,7 +865,7 @@ void tst_QFileInfo::size()
|
||||
QFETCH(QString, file);
|
||||
|
||||
QFileInfo fi(file);
|
||||
(void)fi.permissions(); // see task 104198
|
||||
(void)fi.permissions();
|
||||
QTEST(int(fi.size()), "size");
|
||||
}
|
||||
|
||||
@ -876,8 +875,8 @@ void tst_QFileInfo::systemFiles()
|
||||
QSKIP("This is a Windows only test");
|
||||
#endif
|
||||
QFileInfo fi("c:\\pagefile.sys");
|
||||
QVERIFY(fi.exists()); // task 167099
|
||||
QVERIFY(fi.size() > 0); // task 189202
|
||||
QVERIFY(fi.exists());
|
||||
QVERIFY(fi.size() > 0);
|
||||
QVERIFY(fi.lastModified().isValid());
|
||||
}
|
||||
|
||||
|
@ -552,7 +552,8 @@ public:
|
||||
|
||||
};
|
||||
|
||||
// This is a testcase for the bug fixed with bd287865
|
||||
// This is a regression test for an old bug where peeking at
|
||||
// more than one character failed to put them back.
|
||||
void tst_QIODevice::peekBug()
|
||||
{
|
||||
PeekBug peekBug;
|
||||
|
@ -1867,7 +1867,6 @@ void tst_QProcess::atEnd2()
|
||||
//-----------------------------------------------------------------------------
|
||||
void tst_QProcess::waitForReadyReadForNonexistantProcess()
|
||||
{
|
||||
// This comes from task 108968
|
||||
// Start a program that doesn't exist, process events and then try to waitForReadyRead
|
||||
qRegisterMetaType<QProcess::ProcessError>("QProcess::ProcessError");
|
||||
qRegisterMetaType<QProcess::ExitStatus>("QProcess::ExitStatus");
|
||||
|
@ -1646,7 +1646,7 @@ void tst_QSettings::testChildKeysAndGroups()
|
||||
settings1.endGroup();
|
||||
settings1.endGroup();
|
||||
|
||||
{ // task 53792
|
||||
{
|
||||
QSettings settings2("other.software.org");
|
||||
settings2.setValue("viewbar/foo/test1", "1");
|
||||
settings2.setValue("viewbar/foo/test2", "2");
|
||||
|
@ -1595,7 +1595,6 @@ void tst_QTextStream::numeralCase_data()
|
||||
QTest::newRow("oct 2") << oct_ << base << noop_ << noop_ << 31 << "037";
|
||||
}
|
||||
|
||||
// From Task 125496
|
||||
void tst_QTextStream::numeralCase()
|
||||
{
|
||||
QFETCH(QTextStreamFunction, func1);
|
||||
|
@ -878,13 +878,13 @@ void tst_QUrl::toString_data()
|
||||
<< uint(QUrl::None)
|
||||
<< QString::fromLatin1("http://andreas:hemmelig@www.vg.no/?my=query&your=query#yougotfragged");
|
||||
|
||||
QTest::newRow("nopath_task31320") << QString::fromLatin1("host://protocol")
|
||||
<< uint(QUrl::None)
|
||||
<< QString::fromLatin1("host://protocol");
|
||||
QTest::newRow("nopath") << QString::fromLatin1("host://protocol")
|
||||
<< uint(QUrl::None)
|
||||
<< QString::fromLatin1("host://protocol");
|
||||
|
||||
QTest::newRow("underscore_QTBUG-7434") << QString::fromLatin1("http://foo_bar.host.com/rss.php")
|
||||
<< uint(QUrl::None)
|
||||
<< QString::fromLatin1("http://foo_bar.host.com/rss.php");
|
||||
QTest::newRow("underscore") << QString::fromLatin1("http://foo_bar.host.com/rss.php")
|
||||
<< uint(QUrl::None)
|
||||
<< QString::fromLatin1("http://foo_bar.host.com/rss.php");
|
||||
}
|
||||
|
||||
void tst_QUrl::toString()
|
||||
@ -1192,7 +1192,7 @@ void tst_QUrl::compat_constructor_03_data()
|
||||
QTest::newRow( "windowsDrive04" ) << QString( "c:WinNT/" ) << QString( "c:WinNT/" );
|
||||
QTest::newRow( "windowsDrive05" ) << QString( "c:autoexec.bat" ) << QString( "c:autoexec.bat" );
|
||||
|
||||
QTest::newRow("task31280") << QString("protocol://host") << QString("protocol://host");
|
||||
QTest::newRow("nopath") << QString("protocol://host") << QString("protocol://host");
|
||||
}
|
||||
|
||||
void tst_QUrl::compat_constructor_03()
|
||||
@ -1923,13 +1923,11 @@ void tst_QUrl::tolerantParser()
|
||||
}
|
||||
|
||||
{
|
||||
// task 243557
|
||||
QByteArray tsdgeos("http://google.com/c?c=Translation+%C2%BB+trunk|");
|
||||
QUrl tsdgeosQUrl;
|
||||
tsdgeosQUrl.setEncodedUrl(tsdgeos, QUrl::TolerantMode);
|
||||
QVERIFY(tsdgeosQUrl.isValid()); // failed in Qt-4.4, works in Qt-4.5
|
||||
QByteArray tsdgeosExpected("http://google.com/c?c=Translation+%C2%BB+trunk%7C");
|
||||
//QCOMPARE(tsdgeosQUrl.toEncoded(), tsdgeosExpected); // unusable output from qtestlib...
|
||||
QCOMPARE(QString(tsdgeosQUrl.toEncoded()), QString(tsdgeosExpected));
|
||||
}
|
||||
|
||||
|
@ -3346,8 +3346,8 @@ void tst_QObject::interfaceIid()
|
||||
|
||||
void tst_QObject::deleteQObjectWhenDeletingEvent()
|
||||
{
|
||||
//this is related to task 259514
|
||||
//before the fix this used to dead lock when the QObject from the event was destroyed
|
||||
// This is a regression test for an old bug that used to deadlock
|
||||
// when the QObject from the event was destroyed.
|
||||
|
||||
struct MyEvent : public QEvent
|
||||
{
|
||||
|
@ -1490,8 +1490,6 @@ void tst_QVariant::writeToReadFromDataStream_data()
|
||||
|
||||
void tst_QVariant::writeToReadFromDataStream()
|
||||
{
|
||||
// See #15831 for more information on the bug
|
||||
|
||||
QFETCH( QVariant, writeVariant );
|
||||
QFETCH( bool, isNull );
|
||||
QByteArray data;
|
||||
@ -1567,7 +1565,6 @@ void tst_QVariant::writeToReadFromOldDataStream()
|
||||
|
||||
void tst_QVariant::checkDataStream()
|
||||
{
|
||||
// test fix for task 215610
|
||||
const QByteArray settingsHex("0000002effffffffff");
|
||||
const QByteArray settings = QByteArray::fromHex(settingsHex);
|
||||
QDataStream in(settings);
|
||||
@ -1816,7 +1813,7 @@ void tst_QVariant::operator_eq_eq()
|
||||
QFETCH( QVariant, left );
|
||||
QFETCH( QVariant, right );
|
||||
QFETCH( bool, equal );
|
||||
QEXPECT_FAIL("nullint", "See task 118496", Continue);
|
||||
QEXPECT_FAIL("nullint", "See QTBUG-22933", Continue);
|
||||
QCOMPARE( left == right, equal );
|
||||
}
|
||||
|
||||
@ -1929,9 +1926,6 @@ void tst_QVariant::typeToName()
|
||||
|
||||
void tst_QVariant::streamInvalidVariant()
|
||||
{
|
||||
// I wasn't sure where this test belonged, so it's here
|
||||
// See #17423 for more details
|
||||
|
||||
int writeX = 1;
|
||||
int writeY = 2;
|
||||
int readX;
|
||||
@ -2451,8 +2445,6 @@ Q_DECLARE_METATYPE(qint8);
|
||||
|
||||
void tst_QVariant::convertToQUint8() const
|
||||
{
|
||||
// See task 158470.
|
||||
|
||||
/* qint8. */
|
||||
{
|
||||
const qint8 anInt = 32;
|
||||
@ -2846,9 +2838,7 @@ void tst_QVariant::convertByteArrayToBool_data() const
|
||||
|
||||
Rationale: "9.9" is not a valid int. However, doubles are by definition not
|
||||
ints and therefore it makes more sense to perform conversion for those.
|
||||
|
||||
See task 237252.
|
||||
*/
|
||||
*/
|
||||
void tst_QVariant::toIntFromQString() const
|
||||
{
|
||||
QVariant first("9.9");
|
||||
@ -2871,9 +2861,7 @@ void tst_QVariant::toIntFromQString() const
|
||||
|
||||
Rationale: if 2147483630 is set in float and then converted to int,
|
||||
there will be overflow and the result will be -2147483648.
|
||||
|
||||
See task 250267.
|
||||
*/
|
||||
*/
|
||||
void tst_QVariant::toIntFromDouble() const
|
||||
{
|
||||
double d = 2147483630; // max int 2147483647
|
||||
|
@ -1794,7 +1794,7 @@ void tst_QStateMachine::parallelRootState()
|
||||
QTest::ignoreMessage(QtWarningMsg, "QStateMachine::start: No initial state set for machine. Refusing to start.");
|
||||
machine.start();
|
||||
QCoreApplication::processEvents();
|
||||
QEXPECT_FAIL("", "parallel root state is not supported (task 256587)", Continue);
|
||||
QEXPECT_FAIL("", "parallel root state is not supported (QTBUG-22931)", Continue);
|
||||
QCOMPARE(startedSpy.count(), 1);
|
||||
}
|
||||
|
||||
|
@ -849,7 +849,6 @@ void tst_QByteArray::indexOf_data()
|
||||
QTest::newRow( "17" ) << QByteArray("aBc") << QByteArray("bC") << 0 << -1;
|
||||
QTest::newRow( "18" ) << QByteArray("aBc") << QByteArray("BC") << 0 << -1;
|
||||
|
||||
// task 203692
|
||||
static const char h19[] = {'x', 0x00, (char)0xe7, 0x25, 0x1c, 0x0a};
|
||||
static const char n19[] = {0x00, 0x00, 0x01, 0x00};
|
||||
QTest::newRow( "19" ) << QByteArray(h19, sizeof(h19))
|
||||
@ -929,7 +928,6 @@ void tst_QByteArray::lastIndexOf_data()
|
||||
QTest::newRow( "23" ) << QByteArray("aBc") << QByteArray("bC") << 0 << -1;
|
||||
QTest::newRow( "24" ) << QByteArray("aBc") << QByteArray("BC") << 0 << -1;
|
||||
|
||||
// task 203692
|
||||
static const char h25[] = {0x00, (char)0xbc, 0x03, 0x10, 0x0a };
|
||||
static const char n25[] = {0x00, 0x00, 0x01, 0x00};
|
||||
QTest::newRow( "25" ) << QByteArray(h25, sizeof(h25))
|
||||
|
@ -871,7 +871,6 @@ void tst_QDateTime::toUTC()
|
||||
QSKIP("Not tested with timezone other than Central European (CET/CST)");
|
||||
}
|
||||
|
||||
// To make sure bug 72713 never happens again
|
||||
QDateTime dt = QDateTime::currentDateTime();
|
||||
if(dt.time().msec() == 0){
|
||||
dt.setTime(dt.time().addMSecs(1));
|
||||
@ -1246,39 +1245,39 @@ void tst_QDateTime::fromStringTextDate_data()
|
||||
QTest::addColumn<int>("msec");
|
||||
QTest::addColumn<int>("timeSpec");
|
||||
|
||||
QTest::newRow("task27910") << QString("Tue Jun 17 08:00:10 2003")
|
||||
QTest::newRow("text date") << QString("Tue Jun 17 08:00:10 2003")
|
||||
<< int(Qt::TextDate)
|
||||
<< 17 << 6 << 2003 << 8 << 0 << 10 << 0
|
||||
<< int(Qt::LocalTime);
|
||||
QTest::newRow("task77042") << QString("2005-06-28T07:57:30.0010000000Z")
|
||||
QTest::newRow("ISO date") << QString("2005-06-28T07:57:30.0010000000Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 1
|
||||
<< int(Qt::UTC);
|
||||
|
||||
QTest::newRow("task77042-2") << QString("2005-06-28T07:57:30,0040000000Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 4
|
||||
<< int(Qt::UTC);
|
||||
QTest::newRow("ISO date with comma 1") << QString("2005-06-28T07:57:30,0040000000Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 4
|
||||
<< int(Qt::UTC);
|
||||
|
||||
QTest::newRow("task77042-3") << QString("2005-06-28T07:57:30,0015Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 2
|
||||
<< int(Qt::UTC);
|
||||
QTest::newRow("ISO date with comma 2") << QString("2005-06-28T07:57:30,0015Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 2
|
||||
<< int(Qt::UTC);
|
||||
|
||||
QTest::newRow("task77042-4") << QString("2005-06-28T07:57:30,0014Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 1
|
||||
<< int(Qt::UTC);
|
||||
QTest::newRow("ISO date with comma 3") << QString("2005-06-28T07:57:30,0014Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 1
|
||||
<< int(Qt::UTC);
|
||||
|
||||
QTest::newRow("task77042-5") << QString("2005-06-28T07:57:30,1Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 100
|
||||
<< int(Qt::UTC);
|
||||
QTest::newRow("ISO date with comma 4") << QString("2005-06-28T07:57:30,1Z")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 100
|
||||
<< int(Qt::UTC);
|
||||
|
||||
QTest::newRow("task77042-6") << QString("2005-06-28T07:57:30,11")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 110
|
||||
<< int(Qt::LocalTime);
|
||||
QTest::newRow("ISO date with comma 5") << QString("2005-06-28T07:57:30,11")
|
||||
<< int(Qt::ISODate)
|
||||
<< 28 << 6 << 2005 << 7 << 57 << 30 << 110
|
||||
<< int(Qt::LocalTime);
|
||||
|
||||
QTest::newRow("Year 0999") << QString("Tue Jun 17 08:00:10 0999")
|
||||
<< int(Qt::TextDate)
|
||||
|
@ -751,8 +751,6 @@ void tst_QHash::operator_eq()
|
||||
}
|
||||
|
||||
{
|
||||
// task 102658
|
||||
|
||||
QHash<QString, int> a;
|
||||
QHash<QString, int> b;
|
||||
|
||||
|
@ -167,14 +167,14 @@ void tst_QLine::testIntersection_data()
|
||||
<< 10.0000000000001 << 0.0 << 10.0 << 20.0
|
||||
<< int(QLineF::BoundedIntersection) << 10.0 << 10.0;
|
||||
|
||||
QTest::newRow("task 241464") << 100.1599256468623
|
||||
<< 100.7861905065196
|
||||
<< 100.1599256468604
|
||||
<< -9999.78619050651
|
||||
<< 10.0 << 50.0 << 190.0 << 50.0
|
||||
<< int(QLineF::BoundedIntersection)
|
||||
<< 100.1599256468622
|
||||
<< 50.0;
|
||||
QTest::newRow("long vertical") << 100.1599256468623
|
||||
<< 100.7861905065196
|
||||
<< 100.1599256468604
|
||||
<< -9999.78619050651
|
||||
<< 10.0 << 50.0 << 190.0 << 50.0
|
||||
<< int(QLineF::BoundedIntersection)
|
||||
<< 100.1599256468622
|
||||
<< 50.0;
|
||||
|
||||
QLineF baseA(0, -50, 0, 50);
|
||||
QLineF baseB(-50, 0, 50, 0);
|
||||
|
@ -460,8 +460,6 @@ void tst_QMap::operator_eq()
|
||||
}
|
||||
|
||||
{
|
||||
// task 102658
|
||||
|
||||
QMap<QString, int> a;
|
||||
QMap<QString, int> b;
|
||||
|
||||
|
@ -389,13 +389,13 @@ void tst_QRect::normalized_data()
|
||||
QTest::newRow( "NegativePointQRect" ) << getQRectCase( NegativePointQRect ) << QRect( -10, -10, 5, 5 );
|
||||
QTest::newRow( "NullQRect" ) << getQRectCase( NullQRect ) << getQRectCase( NullQRect );
|
||||
QTest::newRow( "EmptyQRect" ) << getQRectCase( EmptyQRect ) << getQRectCase( EmptyQRect );
|
||||
QTest::newRow( "Task80908") << QRect(100, 200, 100, 0) << QRect(100, 200, 100, 0);
|
||||
QTest::newRow( "ZeroWidth" ) << QRect(100, 200, 100, 0) << QRect(100, 200, 100, 0);
|
||||
// Since "NegativeSizeQRect passes, I expect both of these to pass too.
|
||||
// This passes, since height() returns -1 before normalization
|
||||
QTest::newRow( "Task85023") << QRect(QPoint(100,201), QPoint(199,199)) << QRect(QPoint(100,199), QPoint(199,201));
|
||||
QTest::newRow( "NegativeHeight") << QRect(QPoint(100,201), QPoint(199,199)) << QRect(QPoint(100,199), QPoint(199,201));
|
||||
// This, on the other hand height() returns 0 before normalization.
|
||||
QTest::newRow( "Task85023.1") << QRect(QPoint(100,200), QPoint(199,199)) << QRect(QPoint(100,199), QPoint(199,200));
|
||||
QTest::newRow( "Task188109" ) << QRect(QPoint(263, 113), QPoint(136, 112)) << QRect(QPoint(136, 113), QPoint(263, 112));
|
||||
QTest::newRow( "ZeroHeight1" ) << QRect(QPoint(100,200), QPoint(199,199)) << QRect(QPoint(100,199), QPoint(199,200));
|
||||
QTest::newRow( "ZeroHeight2" ) << QRect(QPoint(263,113), QPoint(136,112)) << QRect(QPoint(136,113), QPoint(263,112));
|
||||
}
|
||||
|
||||
void tst_QRect::normalized()
|
||||
@ -403,8 +403,7 @@ void tst_QRect::normalized()
|
||||
QFETCH(QRect, r);
|
||||
QFETCH(QRect, nr);
|
||||
|
||||
if (QTest::currentDataTag() == QString("Task85023.1"))
|
||||
QEXPECT_FAIL("", "due to broken QRect definition (not possible to change)", Continue);
|
||||
QEXPECT_FAIL("ZeroHeight1", "due to broken QRect definition (not possible to change, see QTBUG-22934)", Continue);
|
||||
QCOMPARE(r.normalized(), nr);
|
||||
}
|
||||
|
||||
|
@ -135,7 +135,6 @@ void tst_QSet::operator_eq()
|
||||
}
|
||||
|
||||
{
|
||||
// Task 102658
|
||||
QSet<QString> a;
|
||||
QSet<QString> b;
|
||||
|
||||
|
@ -3186,8 +3186,8 @@ void tst_QString::fromUtf8_data()
|
||||
str += QChar::ReplacementCharacter;
|
||||
str += " Netscape";
|
||||
|
||||
QTest::newRow("task28417") << QByteArray("Prohl\355\276e\350 plugin\371 Netscape") << str << -1;
|
||||
QTest::newRow("task28417-len") << QByteArray("Prohl\355\276e\350 plugin\371 Netscape") << QString("") << 0;
|
||||
QTest::newRow("invalid utf8 2") << QByteArray("Prohl\355\276e\350 plugin\371 Netscape") << str << -1;
|
||||
QTest::newRow("invalid utf8-len 2") << QByteArray("Prohl\355\276e\350 plugin\371 Netscape") << QString("") << 0;
|
||||
|
||||
QTest::newRow("null-1") << QByteArray() << QString() << -1;
|
||||
QTest::newRow("null0") << QByteArray() << QString() << 0;
|
||||
@ -3621,7 +3621,6 @@ void tst_QString::arg()
|
||||
str2 = str2.arg("A", "B", "C", "D", "E", "F");
|
||||
QCOMPARE(str2, QString("A B C D E F %1000 %1230"));
|
||||
|
||||
// task 201185
|
||||
QCOMPARE(QString("%1").arg(-1, 3, 10, QChar('0')), QString("-01"));
|
||||
QCOMPARE(QString("%1").arg(-100, 3, 10, QChar('0')), QString("-100"));
|
||||
QCOMPARE(QString("%1").arg(-1, 3, 10, QChar(' ')), QString(" -1"));
|
||||
@ -3694,15 +3693,15 @@ void tst_QString::section_data()
|
||||
QTest::newRow( "data2" ) << QString("/usr/local/bin/myapp") << QString("/") << 3 << 3 << int(QString::SectionSkipEmpty) << QString("myapp") << false;
|
||||
QTest::newRow( "data3" ) << QString("forename**middlename**surname**phone") << QString("**") << 2 << 2 << int(QString::SectionDefault) << QString("surname") << false;
|
||||
QTest::newRow( "data4" ) << QString("forename**middlename**surname**phone") << QString("**") << -3 << -2 << int(QString::SectionDefault) << QString("middlename**surname") << false;
|
||||
QTest::newRow( "task-21749-1" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 0 << 0 << int(QString::SectionSkipEmpty) << QString("Datt") << false;
|
||||
QTest::newRow( "task-21749-2" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 1 << 1 << int(QString::SectionSkipEmpty) << QString("wollen") << false;
|
||||
QTest::newRow( "task-21749-3" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 2 << 2 << int(QString::SectionSkipEmpty) << QString("wir") << false;
|
||||
QTest::newRow( "task-21749-4" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 3 << 3 << int(QString::SectionSkipEmpty) << QString("mal") << false;
|
||||
QTest::newRow( "task-21749-5" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 4 << 4 << int(QString::SectionSkipEmpty) << QString("sehen") << false;
|
||||
QTest::newRow( "data5" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 0 << 0 << int(QString::SectionSkipEmpty) << QString("Datt") << false;
|
||||
QTest::newRow( "data6" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 1 << 1 << int(QString::SectionSkipEmpty) << QString("wollen") << false;
|
||||
QTest::newRow( "data7" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 2 << 2 << int(QString::SectionSkipEmpty) << QString("wir") << false;
|
||||
QTest::newRow( "data8" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 3 << 3 << int(QString::SectionSkipEmpty) << QString("mal") << false;
|
||||
QTest::newRow( "data9" ) << QString("##Datt######wollen######wir######mal######sehen##") << QString("#") << 4 << 4 << int(QString::SectionSkipEmpty) << QString("sehen") << false;
|
||||
// not fixed for 3.1
|
||||
QTest::newRow( "task-27269" ) << QString("a/b/c/d") << QString("/") << 1 << -1 << int(QString::SectionIncludeLeadingSep | QString::SectionIncludeTrailingSep) << QString("/b/c/d") << false;
|
||||
QTest::newRow( "task-43641" ) << QString("aoLoboLocolod") << QString("olo") << -1 << -1 << int(QString::SectionCaseInsensitiveSeps) << QString("d") << false;
|
||||
QTest::newRow( "task-27593" ) << QString("F0") << QString("F") << 0 << 0 << int(QString::SectionSkipEmpty) << QString("0") << false;
|
||||
QTest::newRow( "data10" ) << QString("a/b/c/d") << QString("/") << 1 << -1 << int(QString::SectionIncludeLeadingSep | QString::SectionIncludeTrailingSep) << QString("/b/c/d") << false;
|
||||
QTest::newRow( "data11" ) << QString("aoLoboLocolod") << QString("olo") << -1 << -1 << int(QString::SectionCaseInsensitiveSeps) << QString("d") << false;
|
||||
QTest::newRow( "data12" ) << QString("F0") << QString("F") << 0 << 0 << int(QString::SectionSkipEmpty) << QString("0") << false;
|
||||
QTest::newRow( "foo1" ) << QString("foo;foo;") << QString(";") << 0 << 0
|
||||
<< int(QString::SectionIncludeLeadingSep) << QString("foo") << false;
|
||||
QTest::newRow( "foo2" ) << QString("foo;foo;") << QString(";") << 1 << 1
|
||||
@ -3722,19 +3721,18 @@ void tst_QString::section_data()
|
||||
QTest::newRow( "qmake_pathrx" ) << QString("/Users/sam/troll/qt4.0/src/corelib/QtCore_debug.xcode/")
|
||||
<< QString("/") << 0 << -2 << int(QString::SectionDefault)
|
||||
<< QString("/Users/sam/troll/qt4.0/src/corelib/QtCore_debug.xcode") << true;
|
||||
QTest::newRow( "task72972" ) << QString("||2|3|||")
|
||||
QTest::newRow( "data13" ) << QString("||2|3|||")
|
||||
<< QString("|") << 0 << 1 << int(QString::SectionIncludeLeadingSep|QString::SectionIncludeTrailingSep)
|
||||
<< QString("||") << false;
|
||||
QTest::newRow( "task72972rx" ) << QString("||2|3|||")
|
||||
QTest::newRow( "data14" ) << QString("||2|3|||")
|
||||
<< QString("\\|") << 0 << 1 << int(QString::SectionIncludeLeadingSep|QString::SectionIncludeTrailingSep)
|
||||
<< QString("||") << true;
|
||||
QTest::newRow( "task72972-2" ) << QString("|1|2|")
|
||||
QTest::newRow( "data15" ) << QString("|1|2|")
|
||||
<< QString("|") << 0 << 1 << int(QString::SectionIncludeLeadingSep|QString::SectionIncludeTrailingSep)
|
||||
<< QString("|1|") << false;
|
||||
QTest::newRow( "task72972-2rx" ) << QString("|1|2|")
|
||||
<< QString("\\|") << 0 << 1
|
||||
<< int(QString::SectionIncludeLeadingSep|QString::SectionIncludeTrailingSep)
|
||||
<< QString("|1|") << true;
|
||||
QTest::newRow( "data16" ) << QString("|1|2|")
|
||||
<< QString("\\|") << 0 << 1 << int(QString::SectionIncludeLeadingSep|QString::SectionIncludeTrailingSep)
|
||||
<< QString("|1|") << true;
|
||||
QTest::newRow( "normal1" ) << QString("o1o2o")
|
||||
<< QString("o") << 0 << 0
|
||||
<< int(QString::SectionIncludeLeadingSep|QString::SectionIncludeTrailingSep)
|
||||
@ -3775,11 +3773,11 @@ void tst_QString::section_data()
|
||||
<< QString("[a-z]") << 1 << 2
|
||||
<< int(QString::SectionIncludeLeadingSep|QString::SectionIncludeTrailingSep)
|
||||
<< QString("o1o2o") << true;
|
||||
QTest::newRow( "task45855-rx" ) << QString("This is a story, a small story")
|
||||
QTest::newRow( "data17" ) << QString("This is a story, a small story")
|
||||
<< QString("\\b") << 3 << 3
|
||||
<< int(QString::SectionDefault)
|
||||
<< QString("is") << true;
|
||||
QTest::newRow( "task257941-rx" ) << QString("99.0 42.3")
|
||||
QTest::newRow( "data18" ) << QString("99.0 42.3")
|
||||
<< QString("\\s*[AaBb]\\s*") << 1 << 1
|
||||
<< int(QString::SectionIncludeLeadingSep)
|
||||
<< QString() << true;
|
||||
|
@ -872,7 +872,7 @@ void tst_QXmlStream::setEntityResolver()
|
||||
}
|
||||
}
|
||||
|
||||
void tst_QXmlStream::testFalsePrematureError() const // task 179320
|
||||
void tst_QXmlStream::testFalsePrematureError() const
|
||||
{
|
||||
const char *illegal_start = "illegal<sta";
|
||||
const char *legal_start = "<sta";
|
||||
@ -907,9 +907,7 @@ void tst_QXmlStream::testFalsePrematureError() const // task 179320
|
||||
}
|
||||
}
|
||||
|
||||
/*!
|
||||
See task 188737. Crash due to using empty QStack.
|
||||
*/
|
||||
// Regression test for crash due to using empty QStack.
|
||||
void tst_QXmlStream::writerHangs() const
|
||||
{
|
||||
QFile file("test.xml");
|
||||
@ -925,9 +923,7 @@ void tst_QXmlStream::writerHangs() const
|
||||
writer.writeEndElement();
|
||||
writer.writeEndDocument();
|
||||
}
|
||||
/*!
|
||||
Task 189611
|
||||
*/
|
||||
|
||||
void tst_QXmlStream::writerAutoFormattingWithComments() const
|
||||
{
|
||||
QBuffer buffer;
|
||||
@ -942,10 +938,6 @@ void tst_QXmlStream::writerAutoFormattingWithComments() const
|
||||
QCOMPARE(buffer.buffer().data(), str);
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
Task 206782
|
||||
*/
|
||||
void tst_QXmlStream::writerAutoFormattingWithTabs() const
|
||||
{
|
||||
QBuffer buffer;
|
||||
@ -980,9 +972,6 @@ void tst_QXmlStream::writerAutoFormattingWithProcessingInstructions() const
|
||||
QCOMPARE(buffer.buffer().data(), str);
|
||||
}
|
||||
|
||||
/*!
|
||||
Task 204822
|
||||
*/
|
||||
void tst_QXmlStream::writeAttributesWithSpace() const
|
||||
{
|
||||
QBuffer buffer;
|
||||
@ -998,9 +987,6 @@ void tst_QXmlStream::writeAttributesWithSpace() const
|
||||
QCOMPARE(buffer.buffer().data(), s.toUtf8().data());
|
||||
}
|
||||
|
||||
/*!
|
||||
Task 209340
|
||||
*/
|
||||
void tst_QXmlStream::writerAutoEmptyTags() const
|
||||
{
|
||||
QBuffer buffer;
|
||||
@ -1394,7 +1380,7 @@ void tst_QXmlStream::garbageInXMLPrologUTF8Explicitly() const
|
||||
QCOMPARE(out.data(), QByteArray("<?xml version=\"1.0\" encoding=\"UTF-8\"?><Foo/>\n"));
|
||||
}
|
||||
|
||||
void tst_QXmlStream::clear() const // task 228768
|
||||
void tst_QXmlStream::clear() const
|
||||
{
|
||||
QString xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><body></body>";
|
||||
QXmlStreamReader reader;
|
||||
@ -1458,7 +1444,7 @@ void tst_QXmlStream::checkCommentIndentation_data() const
|
||||
QTest::newRow("advanced-comment") << advancedInput << advancedOutput;
|
||||
}
|
||||
|
||||
void tst_QXmlStream::checkCommentIndentation() const // task 256468
|
||||
void tst_QXmlStream::checkCommentIndentation() const
|
||||
{
|
||||
QFETCH(QString, input);
|
||||
QFETCH(QString, expectedOutput);
|
||||
|
Loading…
Reference in New Issue
Block a user