Cleanup corelib autotests

Remove literal tabs.

Change-Id: I210a0259773cceb20d35ebc80b889e3ebb88b540
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-11-07 19:19:27 +10:00 committed by Qt by Nokia
parent 2cd4710715
commit 8e11f7c93a
30 changed files with 3355 additions and 3380 deletions

View File

@ -203,7 +203,8 @@ void tst_QBuffer::writeBlock_data()
QTest::addColumn<QString>("str"); QTest::addColumn<QString>("str");
QTest::newRow( "small_bytearray" ) << QString("Test"); QTest::newRow( "small_bytearray" ) << QString("Test");
QTest::newRow( "large_bytearray" ) << QString("The QBuffer class is an I/O device that operates on a QByteArray.\n" QTest::newRow( "large_bytearray" ) << QString(
"The QBuffer class is an I/O device that operates on a QByteArray.\n"
"QBuffer is used to read and write to a memory buffer. It is normally " "QBuffer is used to read and write to a memory buffer. It is normally "
"used with a QTextStream or a QDataStream. QBuffer has an associated " "used with a QTextStream or a QDataStream. QBuffer has an associated "
"QByteArray which holds the buffer data. The size() of the buffer is " "QByteArray which holds the buffer data. The size() of the buffer is "

View File

@ -2787,7 +2787,6 @@ void tst_QFile::map()
QVERIFY(file.open(QFile::ReadWrite)); QVERIFY(file.open(QFile::ReadWrite));
memory = file.map(offset, size); memory = file.map(offset, size);
if (error != QFile::NoError) { if (error != QFile::NoError) {
QVERIFY(file.error() != QFile::NoError); QVERIFY(file.error() != QFile::NoError);
return; return;
} }

View File

@ -246,7 +246,6 @@ void tst_QTemporaryFile::autoRemove()
QVERIFY(QFile::exists(fileName)); QVERIFY(QFile::exists(fileName));
QVERIFY(QFile::remove(fileName)); QVERIFY(QFile::remove(fileName));
// Do not explicitly call setAutoRemove (tests if it really is the default as documented) // Do not explicitly call setAutoRemove (tests if it really is the default as documented)
{ {
QTemporaryFile file("tempXXXXXX"); QTemporaryFile file("tempXXXXXX");
@ -255,7 +254,6 @@ void tst_QTemporaryFile::autoRemove()
file.close(); file.close();
} }
QVERIFY(!QFile::exists(fileName)); QVERIFY(!QFile::exists(fileName));
} }
void tst_QTemporaryFile::nonWritableCurrentDir() void tst_QTemporaryFile::nonWritableCurrentDir()

View File

@ -796,7 +796,6 @@ void tst_QUrl::resolving()
QCOMPARE(url.resolved(relativeUrl).toString(), relsolvedUrl); QCOMPARE(url.resolved(relativeUrl).toString(), relsolvedUrl);
} }
void tst_QUrl::toString_data() void tst_QUrl::toString_data()
{ {
QTest::addColumn<QString>("urlString"); QTest::addColumn<QString>("urlString");
@ -921,8 +920,6 @@ void tst_QUrl::isParentOf_data()
<< QString::fromLatin1("http://a.b.c/de") << false; << QString::fromLatin1("http://a.b.c/de") << false;
QTest::newRow("data4") << QString::fromLatin1("http://a.b.c/d/") QTest::newRow("data4") << QString::fromLatin1("http://a.b.c/d/")
<< QString::fromLatin1("http://a.b.c/d/e") << true; << QString::fromLatin1("http://a.b.c/d/e") << true;
} }
void tst_QUrl::toString_constructed_data() void tst_QUrl::toString_constructed_data()

View File

@ -49,7 +49,6 @@
static int Step = 0; static int Step = 0;
Sender RandomSender (0, 0); Sender RandomSender (0, 0);
void TRACE (int step, const char *name) void TRACE (int step, const char *name)
{ {
for (int t = 0; t < step - 1; t++) for (int t = 0; t < step - 1; t++)
@ -58,7 +57,6 @@ void TRACE (int step, const char *name)
return; return;
} }
Receiver::Receiver () Receiver::Receiver ()
: QObject () : QObject ()
{ {
@ -81,7 +79,6 @@ void Receiver::received ()
TRACE (stepCopy, "ends Receiver::received()"); TRACE (stepCopy, "ends Receiver::received()");
} }
Disconnector::Disconnector () Disconnector::Disconnector ()
: QObject () : QObject ()
{ {
@ -133,7 +130,6 @@ void Sender::fire ()
TRACE (stepCopy, "ends Sender::fire()"); TRACE (stepCopy, "ends Sender::fire()");
} }
int main (int argc, char *argv []) int main (int argc, char *argv [])
{ {
QCoreApplication app (argc, argv); QCoreApplication app (argc, argv);
@ -145,10 +141,7 @@ int main (int argc, char *argv [])
r.s = &s; r.s = &s;
d.s = &s; d.s = &s;
::Step = 0; ::Step = 0;
s.fire (); s.fire ();
return 0; return 0;
} }

View File

@ -64,7 +64,6 @@ public:
Sender *s; Sender *s;
}; };
class Disconnector : public QObject class Disconnector : public QObject
{ {
Q_OBJECT Q_OBJECT
@ -80,7 +79,6 @@ public:
Sender *s; Sender *s;
}; };
class Sender : public QObject class Sender : public QObject
{ {
Q_OBJECT Q_OBJECT
@ -99,5 +97,4 @@ public:
Disconnector *d; Disconnector *d;
}; };
#endif // SIGNAL_BUG_H #endif // SIGNAL_BUG_H

View File

@ -173,12 +173,15 @@ class ReceiverObject : public QObject
Q_OBJECT Q_OBJECT
public: public:
ReceiverObject() : sequence_slot1( 0 ), ReceiverObject()
sequence_slot2( 0 ), : sequence_slot1( 0 )
sequence_slot3( 0 ), , sequence_slot2( 0 )
sequence_slot4( 0 ) {} , sequence_slot3( 0 )
, sequence_slot4( 0 )
{}
void reset() { void reset()
{
sequence_slot4 = 0; sequence_slot4 = 0;
sequence_slot3 = 0; sequence_slot3 = 0;
sequence_slot2 = 0; sequence_slot2 = 0;
@ -198,7 +201,8 @@ public:
int count_slot3; int count_slot3;
int count_slot4; int count_slot4;
bool called(int slot) { bool called(int slot)
{
switch (slot) { switch (slot) {
case 1: return sequence_slot1; case 1: return sequence_slot1;
case 2: return sequence_slot2; case 2: return sequence_slot2;

View File

@ -205,7 +205,6 @@ void tst_QLibrary::version()
Q_UNUSED(loadversion); Q_UNUSED(loadversion);
Q_UNUSED(resultversion); Q_UNUSED(resultversion);
#endif #endif
} }
void tst_QLibrary::load_data() void tst_QLibrary::load_data()

View File

@ -403,8 +403,7 @@ void tst_QByteArray::split_data()
QTest::addColumn<QByteArray>("sample"); QTest::addColumn<QByteArray>("sample");
QTest::addColumn<int>("size"); QTest::addColumn<int>("size");
QTest::newRow("1") << QByteArray("-rw-r--r-- 1 0 0 519240 Jul 9 2002 bigfile") QTest::newRow("1") << QByteArray("-rw-r--r-- 1 0 0 519240 Jul 9 2002 bigfile") << 14;
<< 14;
QTest::newRow("2") << QByteArray("abcde") << 1; QTest::newRow("2") << QByteArray("abcde") << 1;
QTest::newRow("one empty") << QByteArray("") << 1; QTest::newRow("one empty") << QByteArray("") << 1;
QTest::newRow("two empty") << QByteArray(" ") << 2; QTest::newRow("two empty") << QByteArray(" ") << 2;

View File

@ -250,7 +250,6 @@ void tst_QLocale::ctor()
QVERIFY(l.country() == QLocale::UnitedKingdom); QVERIFY(l.country() == QLocale::UnitedKingdom);
} }
TEST_CTOR(Aymara, AnyCountry, QLocale::English, QLocale::UnitedKingdom) TEST_CTOR(Aymara, AnyCountry, QLocale::English, QLocale::UnitedKingdom)
TEST_CTOR(Aymara, France, QLocale::English, QLocale::UnitedKingdom) TEST_CTOR(Aymara, France, QLocale::English, QLocale::UnitedKingdom)

View File

@ -220,21 +220,16 @@ void tst_QRegExp::indexIn_data()
QTest::newRow( stri + "cat05" ) << QString("b") << QString("a") << -1 << -1 << QStringList(); QTest::newRow( stri + "cat05" ) << QString("b") << QString("a") << -1 << -1 << QStringList();
QTest::newRow( stri + "cat06" ) << QString("ab") << QString("ab") << 0 << 2 << QStringList(); QTest::newRow( stri + "cat06" ) << QString("ab") << QString("ab") << 0 << 2 << QStringList();
QTest::newRow( stri + "cat07" ) << QString("ab") << QString("ba") << -1 << -1 << QStringList(); QTest::newRow( stri + "cat07" ) << QString("ab") << QString("ba") << -1 << -1 << QStringList();
QTest::newRow( stri + "cat08" ) << QString("abab") << QString("abbaababab") << 4 << 4 QTest::newRow( stri + "cat08" ) << QString("abab") << QString("abbaababab") << 4 << 4 << QStringList();
<< QStringList();
indexIn_addMoreRows(stri); indexIn_addMoreRows(stri);
} }
} }
void tst_QRegExp::indexIn_addMoreRows(const QByteArray &stri) void tst_QRegExp::indexIn_addMoreRows(const QByteArray &stri)
{ {
// from Perl Cookbook // from Perl Cookbook
QTest::newRow( stri + "cook00" ) << QString("^(m*)(d?c{0,3}|c[dm])(1?x{0,3}|x[lc])(v?i{0" QTest::newRow( stri + "cook00" ) << QString("^(m*)(d?c{0,3}|c[dm])(1?x{0,3}|x[lc])(v?i{0,3}|i[vx])$")
",3}|i[vx])$")
<< QString("mmxl") << 0 << 4 << QString("mmxl") << 0 << 4
<< QStringList( QStringList() << "mm" << "" << "xl" << QStringList( QStringList() << "mm" << "" << "xl"
<< "" ); << "" );
@ -314,19 +309,15 @@ void tst_QRegExp::indexIn_addMoreRows(const QByteArray &stri)
QTest::newRow( stri + "math17" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?" QTest::newRow( stri + "math17" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?"
":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$") ":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$")
<< QString("aaa") << 0 << 3 << QString("aaa") << 0 << 3
<< QStringList( QStringList() << "" << "" << "" << "aaa" << QStringList( QStringList() << "" << "" << "" << "aaa" << "a" << "aa" );
<< "a" << "aa" );
QTest::newRow( stri + "math18" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?" QTest::newRow( stri + "math18" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?"
":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$") ":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$")
<< QString("aaaaa") << 0 << 5 << QString("aaaaa") << 0 << 5
<< QStringList( QStringList() << "aaaaa" << "a" << "aaa" << QStringList( QStringList() << "aaaaa" << "a" << "aaa" << "" << "" << "" );
<< "" << "" << "" );
QTest::newRow( stri + "math19" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?" QTest::newRow( stri + "math19" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?"
":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$") ":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$")
<< QString("aaaaaaaa") << 0 << 8 << QString("aaaaaaaa") << 0 << 8
<< QStringList( QStringList() << "" << "" << "" << QStringList( QStringList() << "" << "" << "" << "aaaaaaaa" << "a" << "aa" );
<< "aaaaaaaa" << "a"
<< "aa" );
QTest::newRow( stri + "math20" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?" QTest::newRow( stri + "math20" ) << QString("^(?:(a(?:(\\1\\3)(\\1\\2))*(?:\\1\\3)?)|((?"
":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$") ":(\\4(?:^a)?\\6)(\\4\\5))*(?:\\4\\6)?))$")
<< QString("aaaaaaaaa") << -1 << -1 << QString("aaaaaaaaa") << -1 << -1
@ -924,8 +915,8 @@ void tst_QRegExp::testEscapingWildcard_data(){
QTest::newRow("a true '\\' in input") << "\\Qt;" << "\\Qt;" << true; QTest::newRow("a true '\\' in input") << "\\Qt;" << "\\Qt;" << true;
QTest::newRow("two true '\\' in input") << "\\\\Qt;" << "\\\\Qt;" << true; QTest::newRow("two true '\\' in input") << "\\\\Qt;" << "\\\\Qt;" << true;
QTest::newRow("a '\\' at the end") << "\\\\Qt;" << "\\\\Qt;" << true; QTest::newRow("a '\\' at the end") << "\\\\Qt;" << "\\\\Qt;" << true;
} }
void tst_QRegExp::testEscapingWildcard(){ void tst_QRegExp::testEscapingWildcard(){
QFETCH(QString, pattern); QFETCH(QString, pattern);
@ -949,8 +940,8 @@ void tst_QRegExp::testInvalidWildcard_data(){
QTest::newRow("ending [\\") << "abc[\\" << false; QTest::newRow("ending [\\") << "abc[\\" << false;
QTest::newRow("ending []") << "abc[]" << false; QTest::newRow("ending []") << "abc[]" << false;
QTest::newRow("ending [[") << "abc[[" << false; QTest::newRow("ending [[") << "abc[[" << false;
} }
void tst_QRegExp::testInvalidWildcard(){ void tst_QRegExp::testInvalidWildcard(){
QFETCH(QString, pattern); QFETCH(QString, pattern);

View File

@ -775,8 +775,6 @@ void tst_QString::constructor()
QVERIFY( empty.isEmpty() ); QVERIFY( empty.isEmpty() );
} }
void tst_QString::constructorQByteArray_data() void tst_QString::constructorQByteArray_data()
{ {
QTest::addColumn<QByteArray>("src" ); QTest::addColumn<QByteArray>("src" );