From e8f7fccf227a4b3c9fe533cd94e1ffec0107a208 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 7 Nov 2011 15:33:49 +1000 Subject: Cleanup corelib autotests Remove redundant empty constructors, destructors and test functions. Change-Id: Idb51368895e67ec3fc0345a9a5d33d77730c051b Reviewed-by: Rohan McGovern --- .../qabstractanimation/tst_qabstractanimation.cpp | 16 ------ .../qanimationgroup/tst_qanimationgroup.cpp | 24 +-------- .../tst_qparallelanimationgroup.cpp | 14 +---- .../qpauseanimation/tst_qpauseanimation.cpp | 12 ----- .../qpropertyanimation/tst_qpropertyanimation.cpp | 23 ++------- .../tst_qsequentialanimationgroup.cpp | 23 ++------- .../qvariantanimation/tst_qvariantanimation.cpp | 17 ------- .../corelib/codecs/qtextcodec/tst_qtextcodec.cpp | 6 --- .../corelib/global/qgetputenv/tst_qgetputenv.cpp | 15 ------ tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp | 9 ---- .../corelib/io/qdatastream/tst_qdatastream.cpp | 21 +------- tests/auto/corelib/io/qdir/tst_qdir.cpp | 13 ----- tests/auto/corelib/io/qfile/tst_qfile.cpp | 23 +-------- tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp | 13 ++--- tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp | 25 --------- .../io/qstandardpaths/tst_qstandardpaths.cpp | 12 ++--- .../io/qtemporaryfile/tst_qtemporaryfile.cpp | 30 ----------- .../corelib/io/qtextstream/tst_qtextstream.cpp | 22 -------- tests/auto/corelib/io/qurl/tst_qurl.cpp | 26 ---------- .../qabstractitemmodel/tst_qabstractitemmodel.cpp | 42 ++++----------- .../corelib/kernel/qeventloop/tst_qeventloop.cpp | 20 -------- .../corelib/kernel/qitemmodel/tst_qitemmodel.cpp | 4 -- .../corelib/kernel/qmetaobject/tst_qmetaobject.cpp | 35 ------------- .../qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp | 4 -- .../corelib/kernel/qmimedata/tst_qmimedata.cpp | 7 --- tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 42 --------------- .../kernel/qsignalmapper/tst_qsignalmapper.cpp | 43 +--------------- .../kernel/qsocketnotifier/tst_qsocketnotifier.cpp | 12 ----- tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp | 37 -------------- .../corelib/kernel/qtranslator/tst_qtranslator.cpp | 21 -------- .../auto/corelib/kernel/qvariant/tst_qvariant.cpp | 8 --- .../qwineventnotifier/tst_qwineventnotifier.cpp | 31 ------------ .../plugin/qpluginloader/tst_qpluginloader.cpp | 15 ------ .../corelib/statemachine/qstate/tst_qstate.cpp | 5 -- .../qstatemachine/tst_qstatemachine.cpp | 23 --------- .../corelib/thread/qatomicint/tst_qatomicint.cpp | 11 ---- .../thread/qatomicpointer/tst_qatomicpointer.cpp | 13 ----- tests/auto/corelib/thread/qmutex/tst_qmutex.cpp | 14 ----- .../thread/qmutexlocker/tst_qmutexlocker.cpp | 12 ----- .../corelib/thread/qreadlocker/tst_qreadlocker.cpp | 12 ----- .../thread/qreadwritelock/tst_qreadwritelock.cpp | 59 ++++++++-------------- .../corelib/thread/qsemaphore/tst_qsemaphore.cpp | 13 ----- tests/auto/corelib/thread/qthread/tst_qthread.cpp | 16 ------ .../thread/qthreadstorage/tst_qthreadstorage.cpp | 9 ---- .../thread/qwaitcondition/tst_qwaitcondition.cpp | 10 ---- .../thread/qwritelocker/tst_qwritelocker.cpp | 12 ----- .../corelib/tools/qalgorithms/tst_qalgorithms.cpp | 29 +---------- .../auto/corelib/tools/qbitarray/tst_qbitarray.cpp | 33 +----------- .../corelib/tools/qbytearray/tst_qbytearray.cpp | 28 ---------- tests/auto/corelib/tools/qcache/tst_qcache.cpp | 13 ----- tests/auto/corelib/tools/qchar/tst_qchar.cpp | 25 +-------- .../qcontiguouscache/tst_qcontiguouscache.cpp | 3 -- tests/auto/corelib/tools/qdate/tst_qdate.cpp | 32 +----------- .../auto/corelib/tools/qdatetime/tst_qdatetime.cpp | 15 +----- .../tools/qeasingcurve/tst_qeasingcurve.cpp | 34 ++----------- tests/auto/corelib/tools/qhash/tst_qhash.cpp | 8 --- tests/auto/corelib/tools/qline/tst_qline.cpp | 12 +---- tests/auto/corelib/tools/qmap/tst_qmap.cpp | 9 ---- tests/auto/corelib/tools/qmargins/tst_qmargins.cpp | 27 ---------- tests/auto/corelib/tools/qpoint/tst_qpoint.cpp | 18 +------ tests/auto/corelib/tools/qrect/tst_qrect.cpp | 25 --------- tests/auto/corelib/tools/qregexp/tst_qregexp.cpp | 27 ---------- .../corelib/tools/qringbuffer/tst_qringbuffer.cpp | 23 --------- tests/auto/corelib/tools/qsize/tst_qsize.cpp | 27 ---------- tests/auto/corelib/tools/qsizef/tst_qsizef.cpp | 25 +-------- tests/auto/corelib/tools/qstring/tst_qstring.cpp | 13 ----- .../corelib/tools/qstringlist/tst_qstringlist.cpp | 29 ----------- .../tools/qstringmatcher/tst_qstringmatcher.cpp | 6 --- .../corelib/tools/qstringref/tst_qstringref.cpp | 20 -------- .../tst_qtextboundaryfinder.cpp | 20 -------- tests/auto/corelib/tools/qtime/tst_qtime.cpp | 43 ---------------- .../auto/corelib/tools/qtimeline/tst_qtimeline.cpp | 30 +---------- .../tools/qvarlengtharray/tst_qvarlengtharray.cpp | 6 --- tests/auto/corelib/tools/qvector/tst_qvector.cpp | 6 --- 74 files changed, 62 insertions(+), 1398 deletions(-) diff --git a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp index f9dad9154a..8fd5237606 100644 --- a/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp +++ b/tests/auto/corelib/animation/qabstractanimation/tst_qabstractanimation.cpp @@ -47,14 +47,6 @@ class tst_QAbstractAnimation : public QObject { Q_OBJECT -public: - tst_QAbstractAnimation() {}; - virtual ~tst_QAbstractAnimation() {}; - -public Q_SLOTS: - void init(); - void cleanup(); - private slots: void construction(); void destruction(); @@ -87,14 +79,6 @@ public: virtual void updateCurrentTime(int) {} }; -void tst_QAbstractAnimation::init() -{ -} - -void tst_QAbstractAnimation::cleanup() -{ -} - void tst_QAbstractAnimation::construction() { TestableQAbstractAnimation anim; diff --git a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp index 26e2f2f4d8..b92794ee78 100644 --- a/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp +++ b/tests/auto/corelib/animation/qanimationgroup/tst_qanimationgroup.cpp @@ -52,43 +52,25 @@ Q_DECLARE_METATYPE(QAbstractAnimation::State) class tst_QAnimationGroup : public QObject { - Q_OBJECT -public: - tst_QAnimationGroup(); - virtual ~tst_QAnimationGroup(); - + Q_OBJECT public Q_SLOTS: void init(); - void cleanup(); private slots: void construction(); void emptyGroup(); void setCurrentTime(); - void statesAndSignals(); void setParentAutoAdd(); void beginNestedGroup(); void addChildTwice(); void loopWithoutStartValue(); }; -tst_QAnimationGroup::tst_QAnimationGroup() -{ -} - -tst_QAnimationGroup::~tst_QAnimationGroup() -{ -} - void tst_QAnimationGroup::init() { qRegisterMetaType("QAbstractAnimation::State"); } -void tst_QAnimationGroup::cleanup() -{ -} - void tst_QAnimationGroup::construction() { QSequentialAnimationGroup animationgroup; @@ -310,10 +292,6 @@ void tst_QAnimationGroup::setCurrentTime() QCOMPARE(sequence->currentAnimation(), a2_s_o1); } -void tst_QAnimationGroup::statesAndSignals() -{ -} - void tst_QAnimationGroup::setParentAutoAdd() { QParallelAnimationGroup group; diff --git a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp index 432da51ab3..fe07094af5 100644 --- a/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp +++ b/tests/auto/corelib/animation/qparallelanimationgroup/tst_qparallelanimationgroup.cpp @@ -50,11 +50,7 @@ Q_DECLARE_METATYPE(QAbstractAnimation::State) class tst_QParallelAnimationGroup : public QObject { - Q_OBJECT -public: - tst_QParallelAnimationGroup(); - virtual ~tst_QParallelAnimationGroup(); - + Q_OBJECT public Q_SLOTS: void initTestCase(); @@ -79,14 +75,6 @@ private slots: void QTBUG8910_crashWhenRemovingUncontrolledAnimation(); }; -tst_QParallelAnimationGroup::tst_QParallelAnimationGroup() -{ -} - -tst_QParallelAnimationGroup::~tst_QParallelAnimationGroup() -{ -} - void tst_QParallelAnimationGroup::initTestCase() { qRegisterMetaType("QAbstractAnimation::State"); diff --git a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp index ea99e19fb3..ee245cf91b 100644 --- a/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp +++ b/tests/auto/corelib/animation/qpauseanimation/tst_qpauseanimation.cpp @@ -88,10 +88,6 @@ public: class tst_QPauseAnimation : public QObject { Q_OBJECT -public: - tst_QPauseAnimation(); - virtual ~tst_QPauseAnimation(); - public Q_SLOTS: void initTestCase(); @@ -108,14 +104,6 @@ private slots: void zeroDuration(); }; -tst_QPauseAnimation::tst_QPauseAnimation() -{ -} - -tst_QPauseAnimation::~tst_QPauseAnimation() -{ -} - void tst_QPauseAnimation::initTestCase() { qRegisterMetaType("QAbstractAnimation::State"); diff --git a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp index 309f77c7ce..1ac4063f67 100644 --- a/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/corelib/animation/qpropertyanimation/tst_qpropertyanimation.cpp @@ -90,14 +90,9 @@ public: class tst_QPropertyAnimation : public QObject { - Q_OBJECT -public: - tst_QPropertyAnimation(); - virtual ~tst_QPropertyAnimation(); - + Q_OBJECT public Q_SLOTS: - void init(); - void cleanup(); + void initTestCase(); private slots: void construction(); @@ -133,24 +128,12 @@ private slots: void zeroLoopCount(); }; -tst_QPropertyAnimation::tst_QPropertyAnimation() -{ -} - -tst_QPropertyAnimation::~tst_QPropertyAnimation() -{ -} - -void tst_QPropertyAnimation::init() +void tst_QPropertyAnimation::initTestCase() { qRegisterMetaType("QAbstractAnimation::State"); qRegisterMetaType("QAbstractAnimation::DeletionPolicy"); } -void tst_QPropertyAnimation::cleanup() -{ -} - class AnimationObject : public QObject { Q_OBJECT diff --git a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp index 42438a6827..44f0f12b74 100644 --- a/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp +++ b/tests/auto/corelib/animation/qsequentialanimationgroup/tst_qsequentialanimationgroup.cpp @@ -51,14 +51,9 @@ Q_DECLARE_METATYPE(QAbstractAnimation*) class tst_QSequentialAnimationGroup : public QObject { - Q_OBJECT -public: - tst_QSequentialAnimationGroup(); - virtual ~tst_QSequentialAnimationGroup(); - + Q_OBJECT public Q_SLOTS: - void init(); - void cleanup(); + void initTestCase(); private slots: void construction(); @@ -89,24 +84,12 @@ private slots: void pauseResume(); }; -tst_QSequentialAnimationGroup::tst_QSequentialAnimationGroup() -{ -} - -tst_QSequentialAnimationGroup::~tst_QSequentialAnimationGroup() -{ -} - -void tst_QSequentialAnimationGroup::init() +void tst_QSequentialAnimationGroup::initTestCase() { qRegisterMetaType("QAbstractAnimation::State"); qRegisterMetaType("QAbstractAnimation*"); } -void tst_QSequentialAnimationGroup::cleanup() -{ -} - void tst_QSequentialAnimationGroup::construction() { QSequentialAnimationGroup animationgroup; diff --git a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp index 7dcfd1d4f5..bb6d32ee41 100644 --- a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp +++ b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp @@ -46,15 +46,6 @@ class tst_QVariantAnimation : public QObject { Q_OBJECT - -public: - tst_QVariantAnimation() {} - virtual ~tst_QVariantAnimation() {} - -public slots: - void init(); - void cleanup(); - private slots: void construction(); void destruction(); @@ -74,14 +65,6 @@ public: void updateCurrentValue(const QVariant&) {} }; -void tst_QVariantAnimation::init() -{ -} - -void tst_QVariantAnimation::cleanup() -{ -} - void tst_QVariantAnimation::construction() { TestableQVariantAnimation anim; diff --git a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp index b0e9941a31..a6d9ba4720 100644 --- a/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp +++ b/tests/auto/corelib/codecs/qtextcodec/tst_qtextcodec.cpp @@ -74,7 +74,6 @@ private slots: void flagF7808080() const; void flagEFBFBF() const; void decode0D() const; - void codecForIndex() const; void aliasForUTF16() const; void mibForTSCII() const; @@ -455,7 +454,6 @@ void tst_QTextCodec::flagF7808080() const input[2] = char(0x80); input[3] = char(0x80); - QTextCodec *const codec = QTextCodec::codecForMib(106); // UTF-8 QVERIFY(codec); @@ -508,10 +506,6 @@ void tst_QTextCodec::decode0D() const QCOMPARE(QString::fromUtf8(input.constData()).toUtf8(), input); } -void tst_QTextCodec::codecForIndex() const -{ -} - void tst_QTextCodec::aliasForUTF16() const { QVERIFY(QTextCodec::codecForName("UTF-16")->aliases().isEmpty()); diff --git a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp index 9ad98122bc..cb0ee29017 100644 --- a/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp +++ b/tests/auto/corelib/global/qgetputenv/tst_qgetputenv.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -51,14 +50,8 @@ class tst_QGetPutEnv : public QObject { Q_OBJECT - -public: - tst_QGetPutEnv(); - virtual ~tst_QGetPutEnv(); - private slots: void getSetCheck(); -private: }; void tst_QGetPutEnv::getSetCheck() @@ -72,13 +65,5 @@ void tst_QGetPutEnv::getSetCheck() qputenv(varName,QByteArray()); } -tst_QGetPutEnv::tst_QGetPutEnv() -{ -} - -tst_QGetPutEnv::~tst_QGetPutEnv() -{ -} - QTEST_MAIN(tst_QGetPutEnv) #include "tst_qgetputenv.moc" diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp index 0306323b5a..832d7ee063 100644 --- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp +++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp @@ -39,10 +39,8 @@ ** ****************************************************************************/ - #include - #include #include @@ -52,9 +50,6 @@ class tst_QBuffer : public QObject { Q_OBJECT -public: - tst_QBuffer(); - private slots: void open(); void getSetCheck(); @@ -101,10 +96,6 @@ void tst_QBuffer::getSetCheck() QCOMPARE(QByteArray(), obj1.data()); } -tst_QBuffer::tst_QBuffer() -{ -} - void tst_QBuffer::open() { QByteArray data(10, 'f'); diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp index 2745d985a4..dde965b13a 100644 --- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp +++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -54,14 +53,10 @@ class tst_QDataStream : public QObject Q_OBJECT public: - tst_QDataStream(); - virtual ~tst_QDataStream(); - void stream_data(int noOfElements); public slots: - void init(); - void cleanup(); + void cleanupTestCase(); private slots: void getSetCheck(); @@ -296,23 +291,11 @@ void tst_QDataStream::getSetCheck() QCOMPARE(QDataStream::ReadCorruptData, obj1.status()); } -tst_QDataStream::tst_QDataStream() -{ -} - -tst_QDataStream::~tst_QDataStream() +void tst_QDataStream::cleanupTestCase() { QFile::remove(QLatin1String("qdatastream.out")); } -void tst_QDataStream::init() -{ -} - -void tst_QDataStream::cleanup() -{ -} - static int dataIndex(const QString &tag) { int pos = tag.lastIndexOf("_"); diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp index 07d2afd29c..b66a7dac6a 100644 --- a/tests/auto/corelib/io/qdir/tst_qdir.cpp +++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -72,10 +71,6 @@ class tst_QDir : public QObject { Q_OBJECT -public: - tst_QDir(); - virtual ~tst_QDir(); - private slots: void getSetCheck(); void construction(); @@ -213,14 +208,6 @@ void tst_QDir::getSetCheck() QCOMPARE(QDir::SortFlags(QDir::NoSort), obj1.sorting()); } -tst_QDir::tst_QDir() -{ -} - -tst_QDir::~tst_QDir() -{ -} - void tst_QDir::construction() { QFileInfo myFileInfo("/machine/share/dir1/file1"); diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp index 0501ff5a44..a398140061 100644 --- a/tests/auto/corelib/io/qfile/tst_qfile.cpp +++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -101,15 +100,9 @@ class tst_QFile : public QObject { Q_OBJECT -public: - tst_QFile(); - virtual ~tst_QFile(); - - -public slots: +private slots: void init(); void cleanup(); -private slots: void initTestCase(); void cleanupTestCase(); void exists(); @@ -325,28 +318,14 @@ private: FILE *stream_; }; -tst_QFile::tst_QFile() -{ -} - -tst_QFile::~tst_QFile() -{ - -} - void tst_QFile::init() { -// TODO: Add initialization code here. -// This will be executed immediately before each test is run. fd_ = -1; stream_ = 0; } void tst_QFile::cleanup() { -// TODO: Add cleanup code here. -// This will be executed immediately after each test is run. - // for copyFallback() if (QFile::exists("file-copy-destination.txt")) { QFile::setPermissions("file-copy-destination.txt", diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp index 5a43bca2c4..4fa32b0ef6 100644 --- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -79,11 +78,9 @@ class tst_QFileInfo : public QObject { Q_OBJECT -public: - tst_QFileInfo(); - ~tst_QFileInfo(); - private slots: + void cleanupTestCase(); + void getSetCheck(); void copy(); @@ -196,11 +193,7 @@ private slots: void invalidState(); }; -tst_QFileInfo::tst_QFileInfo() -{ -} - -tst_QFileInfo::~tst_QFileInfo() +void tst_QFileInfo::cleanupTestCase() { QFile::remove("brokenlink.lnk"); QFile::remove("link.lnk"); diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp index b087c8fda0..84431b2f9e 100644 --- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp +++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -53,14 +52,6 @@ class tst_QIODevice : public QObject { Q_OBJECT -public: - tst_QIODevice(); - virtual ~tst_QIODevice(); - - -public slots: - void init(); - void cleanup(); private slots: void getSetCheck(); #if !defined(Q_OS_WINCE) || !defined(WINCE_EMULATOR_TEST) @@ -100,22 +91,6 @@ void tst_QIODevice::getSetCheck() QCOMPARE(QIODevice::OpenMode(QIODevice::ReadWrite), obj1->openMode()); } -tst_QIODevice::tst_QIODevice() -{ -} - -tst_QIODevice::~tst_QIODevice() -{ -} - -void tst_QIODevice::init() -{ -} - -void tst_QIODevice::cleanup() -{ -} - //---------------------------------------------------------------------------------- // Networking tests in a WinCE emulator are unstable. diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp index 5c2bb0bb69..b7169dc57b 100644 --- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp +++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -57,14 +56,9 @@ //TESTED_CLASS=QStandardPaths //TESTED_FILES=qstandardpaths.cpp -class tst_qstandardpaths : public QObject { - Q_OBJECT - -public: - tst_qstandardpaths() { - } - virtual ~tst_qstandardpaths() { - } +class tst_qstandardpaths : public QObject +{ + Q_OBJECT private slots: void testDefaultLocations(); diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index f2d2b0a1c8..b2b0f57240 100644 --- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp +++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -65,13 +64,7 @@ class tst_QTemporaryFile : public QObject { Q_OBJECT -public: - tst_QTemporaryFile(); - virtual ~tst_QTemporaryFile(); public slots: - void init(); - void cleanup(); - void initTestCase(); void cleanupTestCase(); @@ -100,8 +93,6 @@ private slots: void QTBUG_4796_data(); void QTBUG_4796(); - -public: }; void tst_QTemporaryFile::initTestCase() @@ -137,27 +128,6 @@ void tst_QTemporaryFile::getSetCheck() QCOMPARE(true, obj1.autoRemove()); } -tst_QTemporaryFile::tst_QTemporaryFile() -{ -} - -tst_QTemporaryFile::~tst_QTemporaryFile() -{ - -} - -void tst_QTemporaryFile::init() -{ -// TODO: Add initialization code here. -// This will be executed immediately before each test is run. -} - -void tst_QTemporaryFile::cleanup() -{ -// TODO: Add cleanup code here. -// This will be executed immediately after each test is run. -} - void tst_QTemporaryFile::fileTemplate_data() { QTest::addColumn("constructorTemplate"); diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp index 5ab71de9d1..4a814799da 100644 --- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp +++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp @@ -39,11 +39,6 @@ ** ****************************************************************************/ - -/*-*-encoding:latin1-*-*/ -//#include -//using namespace std; - #include #ifdef Q_OS_UNIX @@ -80,12 +75,7 @@ class tst_QTextStream : public QObject { Q_OBJECT -public: - tst_QTextStream(); - virtual ~tst_QTextStream(); - public slots: - void init(); void cleanup(); private slots: @@ -376,18 +366,6 @@ void tst_QTextStream::getSetCheck() QCOMPARE(INT_MAX, obj1.realNumberPrecision()); } -tst_QTextStream::tst_QTextStream() -{ -} - -tst_QTextStream::~tst_QTextStream() -{ -} - -void tst_QTextStream::init() -{ -} - void tst_QTextStream::cleanup() { QCoreApplication::instance()->processEvents(); diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp index caa626d97a..8fcc076905 100644 --- a/tests/auto/corelib/io/qurl/tst_qurl.cpp +++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -80,14 +79,6 @@ class tst_QUrl : public QObject { Q_OBJECT -public: - tst_QUrl(); - virtual ~tst_QUrl(); - - -public slots: - void init(); - void cleanup(); private slots: void effectiveTLDs_data(); void effectiveTLDs(); @@ -246,23 +237,6 @@ void tst_QUrl::getSetCheck() QCOMPARE(QUrl::idnWhitelist(), original); } -tst_QUrl::tst_QUrl() -{ -} - -tst_QUrl::~tst_QUrl() -{ - -} - -void tst_QUrl::init() -{ -} - -void tst_QUrl::cleanup() -{ -} - void tst_QUrl::constructing() { QUrl url; diff --git a/tests/auto/corelib/kernel/qabstractitemmodel/tst_qabstractitemmodel.cpp b/tests/auto/corelib/kernel/qabstractitemmodel/tst_qabstractitemmodel.cpp index 6a7a16eae8..62c07dc518 100644 --- a/tests/auto/corelib/kernel/qabstractitemmodel/tst_qabstractitemmodel.cpp +++ b/tests/auto/corelib/kernel/qabstractitemmodel/tst_qabstractitemmodel.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -53,21 +52,15 @@ Q_DECLARE_METATYPE(QModelIndex) /*! - Note that this doesn't test models, but any functionality that QAbstractItemModel shoudl provide + Note that this doesn't test models, but any functionality that QAbstractItemModel should provide */ class tst_QAbstractItemModel : public QObject { Q_OBJECT -public: - tst_QAbstractItemModel(); - virtual ~tst_QAbstractItemModel(); - public slots: void initTestCase(); - void cleanupTestCase(); void init(); - void cleanup(); private slots: void index(); @@ -116,17 +109,15 @@ private slots: void testReset(); - private: DynamicTreeModel *m_model; - }; /*! Test model that impliments the pure vitual functions and anything else that is needed. - It is a table implimented as a vector of vectors of strings. + It is a table implemented as a vector of vectors of strings. */ class QtTestModel: public QAbstractItemModel { @@ -153,8 +144,8 @@ public: }; QtTestModel::QtTestModel(int rows, int columns, QObject *parent) - : QAbstractItemModel(parent), cCount(columns), rCount(rows), wrongIndex(false) { - + : QAbstractItemModel(parent), cCount(columns), rCount(rows), wrongIndex(false) +{ table.resize(rows); for (int r = 0; r < rows; ++r) { table[r].resize(columns); @@ -164,14 +155,17 @@ QtTestModel::QtTestModel(int rows, int columns, QObject *parent) } QtTestModel::QtTestModel(const QVector > tbl, QObject *parent) - : QAbstractItemModel(parent), wrongIndex(false) { + : QAbstractItemModel(parent), wrongIndex(false) +{ table = tbl; rCount = tbl.count(); cCount = tbl.at(0).count(); } QModelIndex QtTestModel::index(int row, int column, const QModelIndex &parent) const - { return hasIndex(row, column, parent) ? createIndex(row, column, 0) : QModelIndex(); } +{ + return hasIndex(row, column, parent) ? createIndex(row, column, 0) : QModelIndex(); +} QModelIndex QtTestModel::parent(const QModelIndex &) const { return QModelIndex(); } int QtTestModel::rowCount(const QModelIndex &parent) const { return parent.isValid() ? 0 : rCount; } @@ -251,14 +245,6 @@ void QtTestModel::reset() QAbstractItemModel::reset(); } -tst_QAbstractItemModel::tst_QAbstractItemModel() -{ -} - -tst_QAbstractItemModel::~tst_QAbstractItemModel() -{ -} - /** * The source Model *must* be initialized before the _data function, since the _data function uses QModelIndexes to reference the items in the tables. * Therefore, we must initialize it globally. @@ -269,11 +255,6 @@ void tst_QAbstractItemModel::initTestCase() qRegisterMetaType("QModelIndex"); } -void tst_QAbstractItemModel::cleanupTestCase() -{ - -} - void tst_QAbstractItemModel::init() { m_model = new DynamicTreeModel(this); @@ -292,11 +273,6 @@ void tst_QAbstractItemModel::init() insertCommand->doCommand(); } -void tst_QAbstractItemModel::cleanup() -{ - -} - /* tests */ diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp index 7446e17f76..9f9e1a01ca 100644 --- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp +++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp @@ -39,10 +39,8 @@ ** ****************************************************************************/ - #include - #include #include #include @@ -183,12 +181,6 @@ public slots: class tst_QEventLoop : public QObject { Q_OBJECT -public: - tst_QEventLoop(); - ~tst_QEventLoop(); -public slots: - void init(); - void cleanup(); private slots: // This test *must* run first. See the definition for why. void processEvents(); @@ -211,18 +203,6 @@ protected: void customEvent(QEvent *e); }; -tst_QEventLoop::tst_QEventLoop() -{ } - -tst_QEventLoop::~tst_QEventLoop() -{ } - -void tst_QEventLoop::init() -{ } - -void tst_QEventLoop::cleanup() -{ } - void tst_QEventLoop::processEvents() { QSignalSpy spy1(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock())); diff --git a/tests/auto/corelib/kernel/qitemmodel/tst_qitemmodel.cpp b/tests/auto/corelib/kernel/qitemmodel/tst_qitemmodel.cpp index 7daa984633..a4b85bb61d 100644 --- a/tests/auto/corelib/kernel/qitemmodel/tst_qitemmodel.cpp +++ b/tests/auto/corelib/kernel/qitemmodel/tst_qitemmodel.cpp @@ -65,10 +65,6 @@ class tst_QItemModel : public QObject { Q_OBJECT -public: - tst_QItemModel() {}; - virtual ~tst_QItemModel() {}; - public slots: void init(); void cleanup(); diff --git a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp index 29b2af44ed..4bf597a9c0 100644 --- a/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp +++ b/tests/auto/corelib/kernel/qmetaobject/tst_qmetaobject.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -119,9 +118,6 @@ class tst_QMetaObject : public QObject public: enum EnumType { EnumType1 }; - tst_QMetaObject(); - ~tst_QMetaObject(); - void setValue(EnumType) {} EnumType getValue() const { return EnumType1; } @@ -151,11 +147,6 @@ public: QList value4; QVariantList value5; -public slots: - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); private slots: void connectSlotsByName(); void invokeMetaMember(); @@ -188,32 +179,6 @@ signals: void value7Changed(const QString &); }; -tst_QMetaObject::tst_QMetaObject() -{ - -} - -tst_QMetaObject::~tst_QMetaObject() -{ - -} - -void tst_QMetaObject::initTestCase() -{ -} - -void tst_QMetaObject::cleanupTestCase() -{ -} - -void tst_QMetaObject::init() -{ -} - -void tst_QMetaObject::cleanup() -{ -} - void tst_QMetaObject::stdSet() { const QMetaObject *mo = metaObject(); diff --git a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp index d7ca8e6f1e..719b20e766 100644 --- a/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp +++ b/tests/auto/corelib/kernel/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp @@ -46,10 +46,6 @@ class tst_QMetaObjectBuilder : public QObject { Q_OBJECT -public: - tst_QMetaObjectBuilder() {} - ~tst_QMetaObjectBuilder() {} - private slots: void mocVersionCheck(); void create(); diff --git a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp index 6876862603..6e8e9940ab 100644 --- a/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp +++ b/tests/auto/corelib/kernel/qmimedata/tst_qmimedata.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -47,11 +46,6 @@ class tst_QMimeData : public QObject { Q_OBJECT -public: - tst_QMimeData() - { - } - private slots: void clear() const; void colorData() const; @@ -338,6 +332,5 @@ void tst_QMimeData::setUrls() const QVERIFY(mimeData.hasUrls() == false); } - QTEST_MAIN(tst_QMimeData) #include "tst_qmimedata.moc" diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 56d63f2e09..7bab96a188 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -39,17 +39,14 @@ ** ****************************************************************************/ - #include #include - #include #include #include #include #include - #include #include #include @@ -62,7 +59,6 @@ #include #endif - #include //TESTED_CLASS= @@ -71,17 +67,6 @@ class tst_QObject : public QObject { Q_OBJECT - -public: - tst_QObject(); - virtual ~tst_QObject(); - - -public slots: - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); private slots: void disconnect(); void connectByName(); @@ -136,35 +121,8 @@ private slots: void disconnectNotSignalMetaMethod(); void autoConnectionBehavior(); void baseDestroyed(); -protected: }; -tst_QObject::tst_QObject() -{ - -} - -tst_QObject::~tst_QObject() -{ - -} - -void tst_QObject::initTestCase() -{ -} - -void tst_QObject::cleanupTestCase() -{ -} - -void tst_QObject::init() -{ -} - -void tst_QObject::cleanup() -{ -} - class SenderObject : public QObject { Q_OBJECT diff --git a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp index a4dc123778..ae82d341e5 100644 --- a/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp +++ b/tests/auto/corelib/kernel/qsignalmapper/tst_qsignalmapper.cpp @@ -39,69 +39,28 @@ ** ****************************************************************************/ - #include - #include #include - - - - //TESTED_CLASS= //TESTED_FILES= class tst_QSignalMapper : public QObject { Q_OBJECT - -public: - tst_QSignalMapper(); - virtual ~tst_QSignalMapper(); - - -public slots: - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); private slots: void mapped(); }; -tst_QSignalMapper::tst_QSignalMapper() -{ -} - -tst_QSignalMapper::~tst_QSignalMapper() -{ -} - -void tst_QSignalMapper::initTestCase() -{ -} - -void tst_QSignalMapper::cleanupTestCase() -{ -} - -void tst_QSignalMapper::init() -{ -} - -void tst_QSignalMapper::cleanup() -{ -} - class QtTestObject : public QObject { Q_OBJECT public slots: void myslot(int id); void myslot(const QString &str); - + public: int id; QString str; diff --git a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp index af20de681f..643524ed61 100644 --- a/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp +++ b/tests/auto/corelib/kernel/qsocketnotifier/tst_qsocketnotifier.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -65,10 +64,6 @@ class tst_QSocketNotifier : public QObject { Q_OBJECT -public: - tst_QSocketNotifier(); - ~tst_QSocketNotifier(); - private slots: void unexpectedDisconnection(); void mixingWithTimers(); @@ -77,13 +72,6 @@ private slots: #endif }; -tst_QSocketNotifier::tst_QSocketNotifier() -{ } - -tst_QSocketNotifier::~tst_QSocketNotifier() -{ -} - class UnexpectedDisconnectTester : public QObject { Q_OBJECT diff --git a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp index 4af2a492d7..c29ad8e44f 100644 --- a/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp +++ b/tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp @@ -39,10 +39,8 @@ ** ****************************************************************************/ - #include - #include #include @@ -56,17 +54,6 @@ class tst_QTimer : public QObject { Q_OBJECT - -public: - tst_QTimer(); - virtual ~tst_QTimer(); - - -public slots: - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); private slots: void zeroTimer(); void singleShotTimeout(); @@ -110,30 +97,6 @@ void TimerHelper::timeout() ++count; } -tst_QTimer::tst_QTimer() -{ -} - -tst_QTimer::~tst_QTimer() -{ -} - -void tst_QTimer::initTestCase() -{ -} - -void tst_QTimer::cleanupTestCase() -{ -} - -void tst_QTimer::init() -{ -} - -void tst_QTimer::cleanup() -{ -} - void tst_QTimer::zeroTimer() { TimerHelper helper; diff --git a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp index 8e2ed157a4..5908c335c2 100644 --- a/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp +++ b/tests/auto/corelib/kernel/qtranslator/tst_qtranslator.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -54,15 +53,8 @@ class tst_QTranslator : public QWidget public: tst_QTranslator(); - virtual ~tst_QTranslator(); - -public slots: - void init(); - void cleanup(); - protected: bool event(QEvent *event); - private slots: void load(); void load2(); @@ -77,7 +69,6 @@ private: int languageChangeEventCounter; }; - tst_QTranslator::tst_QTranslator() : languageChangeEventCounter(0) { @@ -85,18 +76,6 @@ tst_QTranslator::tst_QTranslator() hide(); } -tst_QTranslator::~tst_QTranslator() -{ -} - -void tst_QTranslator::init() -{ -} - -void tst_QTranslator::cleanup() -{ -} - bool tst_QTranslator::event(QEvent *event) { if (event->type() == QEvent::LanguageChange) diff --git a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp index b3e4777e1b..c4fed9088f 100644 --- a/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp +++ b/tests/auto/corelib/kernel/qvariant/tst_qvariant.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -90,9 +89,6 @@ class tst_QVariant : public QObject { Q_OBJECT -public: - tst_QVariant(); - private slots: void constructor(); void copy_constructor(); @@ -275,10 +271,6 @@ Q_DECLARE_METATYPE(QVariant) const qlonglong intMax1 = (qlonglong)INT_MAX + 1; const qulonglong uintMax1 = (qulonglong)UINT_MAX + 1; -tst_QVariant::tst_QVariant() -{ -} - void tst_QVariant::constructor() { QVariant variant; diff --git a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp index c351167ce8..7412baf421 100644 --- a/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp +++ b/tests/auto/corelib/kernel/qwineventnotifier/tst_qwineventnotifier.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -51,20 +50,10 @@ class tst_QWinEventNotifier : public QObject { Q_OBJECT -public: - tst_QWinEventNotifier(); - ~tst_QWinEventNotifier(); - - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); - protected slots: void simple_activated(); void simple_timerSet(); private slots: - void simple(); private: @@ -72,26 +61,6 @@ private: bool simpleActivated; }; -tst_QWinEventNotifier::tst_QWinEventNotifier() -{} - -tst_QWinEventNotifier::~tst_QWinEventNotifier() -{ } - -void tst_QWinEventNotifier::initTestCase() -{ } - -void tst_QWinEventNotifier::cleanupTestCase() -{ } - -void tst_QWinEventNotifier::init() -{ } - -void tst_QWinEventNotifier::cleanup() -{ -} - - void tst_QWinEventNotifier::simple_activated() { simpleActivated = true; diff --git a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp index 5a4db8ac4c..f15aa82f97 100644 --- a/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp +++ b/tests/auto/corelib/plugin/qpluginloader/tst_qpluginloader.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -107,11 +106,6 @@ QT_FORWARD_DECLARE_CLASS(QPluginLoader) class tst_QPluginLoader : public QObject { Q_OBJECT - -public: - tst_QPluginLoader(); - virtual ~tst_QPluginLoader(); - private slots: void errorString(); void loadHints(); @@ -121,15 +115,6 @@ private slots: void loadGarbage(); }; -tst_QPluginLoader::tst_QPluginLoader() - -{ -} - -tst_QPluginLoader::~tst_QPluginLoader() -{ -} - //#define SHOW_ERRORS 1 void tst_QPluginLoader::errorString() diff --git a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp index 0aa3d650c0..9950f85cfc 100644 --- a/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp +++ b/tests/auto/corelib/statemachine/qstate/tst_qstate.cpp @@ -68,7 +68,6 @@ class tst_QState : public QObject public: tst_QState(); - virtual ~tst_QState(); private slots: void assignProperty(); @@ -84,10 +83,6 @@ tst_QState::tst_QState() : functionCalled(false) { } -tst_QState::~tst_QState() -{ -} - class TestClass: public QObject { Q_OBJECT diff --git a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp index 21572218ec..c379504d2c 100644 --- a/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp +++ b/tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp @@ -108,14 +108,7 @@ Q_SIGNALS: class tst_QStateMachine : public QObject { Q_OBJECT -public: - tst_QStateMachine(); - virtual ~tst_QStateMachine(); - private slots: - void init(); - void cleanup(); - void rootState(); void machineWithParent(); void addAndRemoveState(); @@ -217,14 +210,6 @@ private slots: void stopInEventTest(); }; -tst_QStateMachine::tst_QStateMachine() -{ -} - -tst_QStateMachine::~tst_QStateMachine() -{ -} - class TestState : public QState { public: @@ -260,14 +245,6 @@ protected: } }; -void tst_QStateMachine::init() -{ -} - -void tst_QStateMachine::cleanup() -{ -} - class EventTransition : public QAbstractTransition { public: diff --git a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp index 27a2cc2e9c..bc80a5af4d 100644 --- a/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp +++ b/tests/auto/corelib/thread/qatomicint/tst_qatomicint.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -54,10 +53,6 @@ class tst_QAtomicInt : public QObject { Q_OBJECT -public: - tst_QAtomicInt(); - ~tst_QAtomicInt(); - private slots: void warningFree(); @@ -108,12 +103,6 @@ private: static void warningFreeHelper(); }; -tst_QAtomicInt::tst_QAtomicInt() -{ } - -tst_QAtomicInt::~tst_QAtomicInt() -{ } - void tst_QAtomicInt::warningFreeHelper() { qFatal("This code is bogus, and shouldn't be run. We're looking for compiler warnings only."); diff --git a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp index 903f6de5bb..9dde4d2b74 100644 --- a/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp +++ b/tests/auto/corelib/thread/qatomicpointer/tst_qatomicpointer.cpp @@ -39,11 +39,9 @@ ** ****************************************************************************/ - #include #include - #include //TESTED_CLASS= @@ -52,11 +50,6 @@ class tst_QAtomicPointer : public QObject { Q_OBJECT - -public: - tst_QAtomicPointer(); - ~tst_QAtomicPointer(); - private slots: void warningFree(); @@ -85,12 +78,6 @@ private: static void warningFreeHelper(); }; -tst_QAtomicPointer::tst_QAtomicPointer() -{ } - -tst_QAtomicPointer::~tst_QAtomicPointer() -{ } - struct WFHC { void bar() {} diff --git a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp index 71a310bcfd..08a203bcfa 100644 --- a/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp +++ b/tests/auto/corelib/thread/qmutex/tst_qmutex.cpp @@ -54,11 +54,6 @@ class tst_QMutex : public QObject { Q_OBJECT - -public: - tst_QMutex(); - virtual ~tst_QMutex(); - private slots: void tryLock(); void lock_unlock_locked_tryLock(); @@ -70,15 +65,6 @@ private slots: static const int iterations = 100; -tst_QMutex::tst_QMutex() - -{ -} - -tst_QMutex::~tst_QMutex() -{ -} - QAtomicInt lockCount(0); QMutex normalMutex, recursiveMutex(QMutex::Recursive); QSemaphore testsTurn; diff --git a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp index a663b60be7..4d2a6b33ab 100644 --- a/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp +++ b/tests/auto/corelib/thread/qmutexlocker/tst_qmutexlocker.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -73,9 +72,6 @@ class tst_QMutexLocker : public QObject Q_OBJECT public: - tst_QMutexLocker(); - ~tst_QMutexLocker(); - tst_QMutexLockerThread *thread; void waitForThread() @@ -93,14 +89,6 @@ private slots: void lockerStateTest(); }; -tst_QMutexLocker::tst_QMutexLocker() -{ -} - -tst_QMutexLocker::~tst_QMutexLocker() -{ -} - void tst_QMutexLocker::scopeTest() { class ScopeTestThread : public tst_QMutexLockerThread diff --git a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp index 3ec9f1cb25..e5bd5e5ae1 100644 --- a/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp +++ b/tests/auto/corelib/thread/qreadlocker/tst_qreadlocker.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -68,9 +67,6 @@ class tst_QReadLocker : public QObject Q_OBJECT public: - tst_QReadLocker(); - ~tst_QReadLocker(); - tst_QReadLockerThread *thread; void waitForThread() @@ -88,14 +84,6 @@ private slots: void lockerStateTest(); }; -tst_QReadLocker::tst_QReadLocker() -{ -} - -tst_QReadLocker::~tst_QReadLocker() -{ -} - void tst_QReadLocker::scopeTest() { class ScopeTestThread : public tst_QReadLockerThread diff --git a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp index 1b995e8d19..c26120d203 100644 --- a/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp +++ b/tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp @@ -39,11 +39,8 @@ ** ****************************************************************************/ - #include #include - - #include #include #include @@ -73,61 +70,47 @@ class tst_QReadWriteLock : public QObject { Q_OBJECT -public: - tst_QReadWriteLock(); - virtual ~tst_QReadWriteLock(); - /* Singlethreaded tests */ private slots: -void constructDestruct(); -void readLockUnlock(); -void writeLockUnlock(); -void readLockUnlockLoop(); -void writeLockUnlockLoop(); -void readLockLoop(); -void writeLockLoop(); -void readWriteLockUnlockLoop(); -void tryReadLock(); -void tryWriteLock(); + void constructDestruct(); + void readLockUnlock(); + void writeLockUnlock(); + void readLockUnlockLoop(); + void writeLockUnlockLoop(); + void readLockLoop(); + void writeLockLoop(); + void readWriteLockUnlockLoop(); + void tryReadLock(); + void tryWriteLock(); + /* Multithreaded tests */ private slots: - -void readLockBlockRelease(); -void writeLockBlockRelease(); -void multipleReadersBlockRelease(); -void multipleReadersLoop(); -void multipleWritersLoop(); -void multipleReadersWritersLoop(); -void countingTest(); -void limitedReaders(); -void deleteOnUnlock(); + void readLockBlockRelease(); + void writeLockBlockRelease(); + void multipleReadersBlockRelease(); + void multipleReadersLoop(); + void multipleWritersLoop(); + void multipleReadersWritersLoop(); + void countingTest(); + void limitedReaders(); + void deleteOnUnlock(); /* Performance tests */ private slots: -void uncontendedLocks(); + void uncontendedLocks(); // recursive locking tests void recursiveReadLock(); void recursiveWriteLock(); }; -tst_QReadWriteLock::tst_QReadWriteLock() -{ - -} - -tst_QReadWriteLock::~tst_QReadWriteLock() -{ - -} - void tst_QReadWriteLock::constructDestruct() { { diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp index 7c410db148..9643ee448a 100644 --- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp +++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp @@ -39,10 +39,8 @@ ** ****************************************************************************/ - #include - #include #include #include @@ -53,11 +51,6 @@ class tst_QSemaphore : public QObject { Q_OBJECT - -public: - tst_QSemaphore(); - ~tst_QSemaphore(); - private slots: void acquire(); void tryAcquire(); @@ -69,12 +62,6 @@ private slots: static QSemaphore *semaphore = 0; -tst_QSemaphore::tst_QSemaphore() -{ } - -tst_QSemaphore::~tst_QSemaphore() -{ } - class ThreadOne : public QThread { public: diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index bf9faf181a..e6974b48c6 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -67,11 +66,6 @@ class tst_QThread : public QObject { Q_OBJECT - -public: - tst_QThread(); - virtual ~tst_QThread(); - private slots: void currentThreadId(); void currentThread(); @@ -272,16 +266,6 @@ public: } }; -tst_QThread::tst_QThread() - -{ -} - -tst_QThread::~tst_QThread() -{ - -} - void tst_QThread::currentThreadId() { Current_Thread thread; diff --git a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp index 4fc3981abf..5858cd98bb 100644 --- a/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp +++ b/tests/auto/corelib/thread/qthreadstorage/tst_qthreadstorage.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -64,10 +63,6 @@ class tst_QThreadStorage : public QObject { Q_OBJECT - -public: - tst_QThreadStorage(); - private slots: void hasLocalData(); void localData(); @@ -91,10 +86,6 @@ public: }; int Pointer::count = 0; -tst_QThreadStorage::tst_QThreadStorage() - -{ } - void tst_QThreadStorage::hasLocalData() { QThreadStorage pointers; diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp index bbeb979aa3..6e2553fb06 100644 --- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp +++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -55,10 +54,6 @@ class tst_QWaitCondition : public QObject { Q_OBJECT - -public: - tst_QWaitCondition(); - private slots: void wait_QMutex(); void wait_QReadWriteLock(); @@ -76,11 +71,6 @@ static const int ThreadCount = 4; static const int ThreadCount = 10; #endif -tst_QWaitCondition::tst_QWaitCondition() - -{ -} - class wait_QMutex_Thread_1 : public QThread { public: diff --git a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp index a06431a5e1..19a59932fa 100644 --- a/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp +++ b/tests/auto/corelib/thread/qwritelocker/tst_qwritelocker.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -68,9 +67,6 @@ class tst_QWriteLocker : public QObject Q_OBJECT public: - tst_QWriteLocker(); - ~tst_QWriteLocker(); - tst_QWriteLockerThread *thread; void waitForThread() @@ -88,14 +84,6 @@ private slots: void lockerStateTest(); }; -tst_QWriteLocker::tst_QWriteLocker() -{ -} - -tst_QWriteLocker::~tst_QWriteLocker() -{ -} - void tst_QWriteLocker::scopeTest() { class ScopeTestThread : public tst_QWriteLockerThread diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp index 72e5729ee9..1723c25d59 100644 --- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp +++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -59,16 +58,7 @@ using namespace std; class tst_QAlgorithms : public QObject { -Q_OBJECT - -public: - tst_QAlgorithms(); - ~tst_QAlgorithms(); - -public slots: - void init(); - void cleanup(); - + Q_OBJECT private slots: void test_qLowerBound_data(); void test_qLowerBound(); @@ -96,23 +86,6 @@ private: #endif }; -tst_QAlgorithms::tst_QAlgorithms() -{ -} - -tst_QAlgorithms::~tst_QAlgorithms() -{ -} - -void tst_QAlgorithms::init() -{ -} - -void tst_QAlgorithms::cleanup() -{ -} - - class TestInt { public: diff --git a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp index 83fcfccd21..81c6736abd 100644 --- a/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp +++ b/tests/auto/corelib/tools/qbitarray/tst_qbitarray.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -71,16 +70,7 @@ static QBitArray QStringToQBitArray(const QString &str) class tst_QBitArray : public QObject { -Q_OBJECT - -public: - tst_QBitArray(); - virtual ~tst_QBitArray(); - - -public slots: - void init(); - void cleanup(); + Q_OBJECT private slots: void size_data(); void size(); @@ -115,27 +105,6 @@ private slots: Q_DECLARE_METATYPE(QBitArray) -tst_QBitArray::tst_QBitArray() -{ -} - -tst_QBitArray::~tst_QBitArray() -{ - -} - -void tst_QBitArray::init() -{ -// TODO: Add initialization code here. -// This will be executed immediately before each test is run. -} - -void tst_QBitArray::cleanup() -{ -// TODO: Add cleanup code here. -// This will be executed immediately after each test is run. -} - void tst_QBitArray::size_data() { //create the testtable instance and define the elements diff --git a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp index 05bc7399a0..90d24d487a 100644 --- a/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp +++ b/tests/auto/corelib/tools/qbytearray/tst_qbytearray.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -59,13 +58,6 @@ class tst_QByteArray : public QObject public: tst_QByteArray(); - virtual ~tst_QByteArray(); - -public slots: - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); private slots: void swap(); void qCompress_data(); @@ -154,26 +146,6 @@ tst_QByteArray::tst_QByteArray() qRegisterMetaType("qulonglong"); } -tst_QByteArray::~tst_QByteArray() -{ -} - -void tst_QByteArray::initTestCase() -{ -} - -void tst_QByteArray::cleanupTestCase() -{ -} - -void tst_QByteArray::init() -{ -} - -void tst_QByteArray::cleanup() -{ -} - void tst_QByteArray::qCompress_data() { QTest::addColumn("ba"); diff --git a/tests/auto/corelib/tools/qcache/tst_qcache.cpp b/tests/auto/corelib/tools/qcache/tst_qcache.cpp index 2c1f256313..cc00fe3fa5 100644 --- a/tests/auto/corelib/tools/qcache/tst_qcache.cpp +++ b/tests/auto/corelib/tools/qcache/tst_qcache.cpp @@ -49,11 +49,6 @@ class tst_QCache : public QObject { Q_OBJECT - -public: - tst_QCache(); - virtual ~tst_QCache(); - public slots: void initTestCase(); void cleanupTestCase(); @@ -82,14 +77,6 @@ struct Foo { int Foo::count = 0; -tst_QCache::tst_QCache() -{ -} - -tst_QCache::~tst_QCache() -{ -} - void tst_QCache::initTestCase() { Foo::count = 0; diff --git a/tests/auto/corelib/tools/qchar/tst_qchar.cpp b/tests/auto/corelib/tools/qchar/tst_qchar.cpp index a89250ca33..839103415f 100644 --- a/tests/auto/corelib/tools/qchar/tst_qchar.cpp +++ b/tests/auto/corelib/tools/qchar/tst_qchar.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -49,23 +48,13 @@ #include #endif - - //TESTED_CLASS= //TESTED_FILES= class tst_QChar : public QObject { Q_OBJECT - -public: - tst_QChar(); - ~tst_QChar(); - - public slots: - void initTestCase(); - void cleanupTestCase(); void init(); void cleanup(); private slots: @@ -104,20 +93,8 @@ private: #endif }; -tst_QChar::tst_QChar() -{} - -tst_QChar::~tst_QChar() -{ } - -void tst_QChar::initTestCase() -{ } - -void tst_QChar::cleanupTestCase() -{ } - void tst_QChar::init() -{ +{ #if defined(Q_OS_WINCE) int argc = 0; app = new QCoreApplication(argc, NULL); diff --git a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp index 96731f7d78..c96b26bdfb 100644 --- a/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp +++ b/tests/auto/corelib/tools/qcontiguouscache/tst_qcontiguouscache.cpp @@ -50,9 +50,6 @@ class tst_QContiguousCache : public QObject { Q_OBJECT -public: - tst_QContiguousCache() {} - virtual ~tst_QContiguousCache() {} private slots: void empty(); void swap(); diff --git a/tests/auto/corelib/tools/qdate/tst_qdate.cpp b/tests/auto/corelib/tools/qdate/tst_qdate.cpp index b1e0f33ba6..3aa7d03d81 100644 --- a/tests/auto/corelib/tools/qdate/tst_qdate.cpp +++ b/tests/auto/corelib/tools/qdate/tst_qdate.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -49,15 +48,7 @@ class tst_QDate : public QObject { -Q_OBJECT - -public: - tst_QDate(); - virtual ~tst_QDate(); - -public slots: - void init(); - void cleanup(); + Q_OBJECT private slots: void toString(); void isValid_data(); @@ -104,27 +95,6 @@ private slots: Q_DECLARE_METATYPE(QDate) -tst_QDate::tst_QDate() -{ -} - -tst_QDate::~tst_QDate() -{ - -} - -void tst_QDate::init() -{ -// This will be executed immediately before each test is run. -// TODO: Add initialization code here. -} - -void tst_QDate::cleanup() -{ -// This will be executed immediately after each test is run. -// TODO: Add cleanup code here. -} - void tst_QDate::isValid_data() { QTest::addColumn("year"); diff --git a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp index 13b2938027..1bea54f2ec 100644 --- a/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp +++ b/tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #ifndef Q_OS_WINCE #include @@ -61,13 +60,11 @@ class tst_QDateTime : public QObject public: tst_QDateTime(); - virtual ~tst_QDateTime(); static QString str( int y, int month, int d, int h, int min, int s ); static QDateTime dt( const QString& str ); public slots: void init(); - void cleanup(); private slots: void ctor(); void operator_eq(); @@ -162,23 +159,13 @@ tst_QDateTime::tst_QDateTime() europeanTimeZone = (x1 == 631148400 && x2 == 644191200); } -tst_QDateTime::~tst_QDateTime() -{ - -} - void tst_QDateTime::init() { #if defined(Q_OS_WINCE) - SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); + SetUserDefaultLCID(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); #elif defined(Q_OS_WIN) SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); #endif - -} - -void tst_QDateTime::cleanup() -{ } QString tst_QDateTime::str( int y, int month, int d, int h, int min, int s ) diff --git a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp index 851a9d463c..107f9769b1 100644 --- a/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp +++ b/tests/auto/corelib/tools/qeasingcurve/tst_qeasingcurve.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -47,17 +46,9 @@ //TESTED_CLASS= //TESTED_FILES= -class tst_QEasingCurve : public QObject { - Q_OBJECT - -public: - tst_QEasingCurve(); - virtual ~tst_QEasingCurve(); - -public Q_SLOTS: - void init(); - void cleanup(); - +class tst_QEasingCurve : public QObject +{ + Q_OBJECT private slots: void type(); void propertyDefaults(); @@ -67,27 +58,8 @@ private slots: void operators(); void properties(); void metaTypes(); - -protected: }; -tst_QEasingCurve::tst_QEasingCurve() -{ -} - -tst_QEasingCurve::~tst_QEasingCurve() -{ -} - -void tst_QEasingCurve::init() -{ -} - -void tst_QEasingCurve::cleanup() -{ -} -#include - void tst_QEasingCurve::type() { { diff --git a/tests/auto/corelib/tools/qhash/tst_qhash.cpp b/tests/auto/corelib/tools/qhash/tst_qhash.cpp index 277171124c..843216faec 100644 --- a/tests/auto/corelib/tools/qhash/tst_qhash.cpp +++ b/tests/auto/corelib/tools/qhash/tst_qhash.cpp @@ -50,11 +50,6 @@ class tst_QHash : public QObject { Q_OBJECT - -public: - tst_QHash(); - virtual ~tst_QHash() {} - private slots: void insert1(); void erase(); @@ -92,9 +87,6 @@ struct Foo { int data[8]; }; -tst_QHash::tst_QHash() -{} - int Foo::count = 0; //copied from tst_QMap.cpp diff --git a/tests/auto/corelib/tools/qline/tst_qline.cpp b/tests/auto/corelib/tools/qline/tst_qline.cpp index de47506ae3..8451cc631a 100644 --- a/tests/auto/corelib/tools/qline/tst_qline.cpp +++ b/tests/auto/corelib/tools/qline/tst_qline.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -53,11 +52,7 @@ class tst_QLine : public QObject { -Q_OBJECT - -public: - tst_QLine(); - + Q_OBJECT private slots: void testIntersection(); void testIntersection_data(); @@ -90,11 +85,6 @@ private slots: const qreal epsilon = sizeof(qreal) == sizeof(double) ? 1e-8 : 1e-4; -tst_QLine::tst_QLine() - -{ -} - void tst_QLine::testSet() { { diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp index e6e8466aa2..04d6c6a14a 100644 --- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp +++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp @@ -44,7 +44,6 @@ #include #include - #include //TESTED_CLASS= @@ -53,10 +52,6 @@ class tst_QMap : public QObject { Q_OBJECT - -public: - tst_QMap(); - public slots: void init(); private slots: @@ -84,10 +79,6 @@ private slots: void const_shared_null(); }; -tst_QMap::tst_QMap() -{ -} - typedef QMap StringMap; class MyClass diff --git a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp index cb0dd2d67d..b7affac7af 100644 --- a/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp +++ b/tests/auto/corelib/tools/qmargins/tst_qmargins.cpp @@ -50,15 +50,6 @@ Q_DECLARE_METATYPE(QMargins) class tst_QMargins : public QObject { Q_OBJECT - -public: - tst_QMargins(); - virtual ~tst_QMargins(); - - -public slots: - void init(); - void cleanup(); private slots: void getSetCheck(); void dataStreamCheck(); @@ -112,23 +103,5 @@ void tst_QMargins::dataStreamCheck() } } -tst_QMargins::tst_QMargins() -{ -} - -tst_QMargins::~tst_QMargins() -{ -} - -void tst_QMargins::init() -{ -} - -void tst_QMargins::cleanup() -{ -} - - - QTEST_APPLESS_MAIN(tst_QMargins) #include "tst_qmargins.moc" diff --git a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp index c4b5339a3b..1c6117d299 100644 --- a/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp +++ b/tests/auto/corelib/tools/qpoint/tst_qpoint.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -51,12 +50,7 @@ class tst_QPoint : public QObject { -Q_OBJECT - -public: - tst_QPoint(); - virtual ~tst_QPoint(); - + Q_OBJECT private slots: void getSetCheck(); void division(); @@ -64,16 +58,6 @@ private slots: void manhattanLength(); }; -tst_QPoint::tst_QPoint() -{ -} - -tst_QPoint::~tst_QPoint() -{ -} - - - void tst_QPoint::manhattanLength() { { diff --git a/tests/auto/corelib/tools/qrect/tst_qrect.cpp b/tests/auto/corelib/tools/qrect/tst_qrect.cpp index fe3be33255..56db459c29 100644 --- a/tests/auto/corelib/tools/qrect/tst_qrect.cpp +++ b/tests/auto/corelib/tools/qrect/tst_qrect.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -72,17 +71,10 @@ public: NegXQPoint, NegYQPoint, RandomQPoint }; - tst_QRect(); - virtual ~tst_QRect(); - - static QRect getQRectCase( QRectCases c ); static int getIntCase( IntCases i ); static QPoint getQPointCase( QPointCases p ); -public slots: - void init(); - void cleanup(); private slots: void isNull_data(); void isNull(); @@ -215,23 +207,6 @@ private slots: #define LARGE 1000000000 static bool isLarge(int x) { return x > LARGE || x < -LARGE; } - -tst_QRect::tst_QRect() -{ -} - -tst_QRect::~tst_QRect() -{ -} - -void tst_QRect::init() -{ -} - -void tst_QRect::cleanup() -{ -} - QRect tst_QRect::getQRectCase( QRectCases c ) { // Should return the best variety of possible QRects, if a diff --git a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp index 13b020023c..244d637fa4 100644 --- a/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp +++ b/tests/auto/corelib/tools/qregexp/tst_qregexp.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -51,15 +50,6 @@ const int N = 1; class tst_QRegExp : public QObject { Q_OBJECT - -public: - tst_QRegExp(); - virtual ~tst_QRegExp(); - - -public slots: - void init(); - void cleanup(); private slots: void getSetCheck(); void indexIn_data(); @@ -125,14 +115,6 @@ void tst_QRegExp::getSetCheck() extern const char email[]; -tst_QRegExp::tst_QRegExp() -{ -} - -tst_QRegExp::~tst_QRegExp() -{ -} - void tst_QRegExp::lastIndexIn_data() { indexIn_data(); @@ -518,15 +500,6 @@ void tst_QRegExp::indexIn_addMoreRows(const QByteArray &stri) << QStringList(); } - -void tst_QRegExp::init() -{ -} - -void tst_QRegExp::cleanup() -{ -} - /* void tst_QRegExp::isEmpty() { diff --git a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp index 0ca360fda7..ea90b2236d 100644 --- a/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp +++ b/tests/auto/corelib/tools/qringbuffer/tst_qringbuffer.cpp @@ -46,13 +46,6 @@ class tst_QRingBuffer : public QObject { Q_OBJECT - -public: - tst_QRingBuffer(); - virtual ~tst_QRingBuffer(); -public slots: - void initTestCase(); - void cleanupTestCase(); private slots: void readPointerAtPositionWriteRead(); void readPointerAtPositionEmptyRead(); @@ -63,22 +56,6 @@ private slots: void sizeWhenReserved(); }; -tst_QRingBuffer::tst_QRingBuffer() -{ -} - -tst_QRingBuffer::~tst_QRingBuffer() -{ -} - -void tst_QRingBuffer::initTestCase() -{ -} - -void tst_QRingBuffer::cleanupTestCase() -{ -} - void tst_QRingBuffer::sizeWhenReserved() { QRingBuffer ringBuffer; diff --git a/tests/auto/corelib/tools/qsize/tst_qsize.cpp b/tests/auto/corelib/tools/qsize/tst_qsize.cpp index ae9426c568..da636a3747 100644 --- a/tests/auto/corelib/tools/qsize/tst_qsize.cpp +++ b/tests/auto/corelib/tools/qsize/tst_qsize.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -51,15 +50,6 @@ Q_DECLARE_METATYPE(QSize) class tst_QSize : public QObject { Q_OBJECT - -public: - tst_QSize(); - virtual ~tst_QSize(); - - -public slots: - void init(); - void cleanup(); private slots: void getSetCheck(); void scale(); @@ -112,23 +102,6 @@ void tst_QSize::getSetCheck() QCOMPARE(1.1, obj2.height()); } - -tst_QSize::tst_QSize() -{ -} - -tst_QSize::~tst_QSize() -{ -} - -void tst_QSize::init() -{ -} - -void tst_QSize::cleanup() -{ -} - void tst_QSize::scale() { QSize t1( 10, 12 ); diff --git a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp index 9a40abccf4..936df75366 100644 --- a/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp +++ b/tests/auto/corelib/tools/qsizef/tst_qsizef.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -48,17 +47,9 @@ Q_DECLARE_METATYPE(QSizeF) //TESTED_CLASS= //TESTED_FILES=corelib/tools/qsize.h corelib/tools/qsize.cpp -class tst_QSizeF : public QObject { +class tst_QSizeF : public QObject +{ Q_OBJECT - -public: - tst_QSizeF(); - virtual ~tst_QSizeF(); - -public slots: - void init(); - void cleanup(); - private slots: void scale(); @@ -72,18 +63,6 @@ private slots: void transpose(); }; -tst_QSizeF::tst_QSizeF() { -} - -tst_QSizeF::~tst_QSizeF() { -} - -void tst_QSizeF::init() { -} - -void tst_QSizeF::cleanup() { -} - void tst_QSizeF::scale() { QSizeF t1(10.4, 12.8); t1.scale(60.6, 60.6, Qt::IgnoreAspectRatio); diff --git a/tests/auto/corelib/tools/qstring/tst_qstring.cpp b/tests/auto/corelib/tools/qstring/tst_qstring.cpp index 0bf1c8607a..3922e482c8 100644 --- a/tests/auto/corelib/tools/qstring/tst_qstring.cpp +++ b/tests/auto/corelib/tools/qstring/tst_qstring.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -67,11 +66,7 @@ class tst_QString : public QObject public: tst_QString(); - virtual ~tst_QString(); - - public slots: - void init(); void cleanup(); private slots: #if !defined(Q_CC_HPACC) && !defined(QT_NO_STL) @@ -319,14 +314,6 @@ tst_QString::tst_QString() QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO 8859-1")); } -tst_QString::~tst_QString() -{ -} - -void tst_QString::init() -{ -} - void tst_QString::cleanup() { QLocale::setDefault(QString("C")); diff --git a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp index 250badb231..08485e87e0 100644 --- a/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp +++ b/tests/auto/corelib/tools/qstringlist/tst_qstringlist.cpp @@ -39,29 +39,16 @@ ** ****************************************************************************/ - #include #include #include - - - - //TESTED_CLASS= //TESTED_FILES= class tst_QStringList : public QObject { Q_OBJECT - -public: - tst_QStringList(); - virtual ~tst_QStringList(); - -public slots: - void init(); - void cleanup(); private slots: void filter(); void replaceInStrings(); @@ -86,22 +73,6 @@ private slots: extern const char email[]; -tst_QStringList::tst_QStringList() -{ -} - -tst_QStringList::~tst_QStringList() -{ -} - -void tst_QStringList::init() -{ -} - -void tst_QStringList::cleanup() -{ -} - void tst_QStringList::indexOf_regExp() { QStringList list; diff --git a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp index 9dade954f8..e8f36c4840 100644 --- a/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp +++ b/tests/auto/corelib/tools/qstringmatcher/tst_qstringmatcher.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -48,7 +47,6 @@ class tst_QStringMatcher : public QObject Q_OBJECT private slots: - void qstringmatcher_data(); void qstringmatcher(); void caseSensitivity(); void indexIn_data(); @@ -64,10 +62,6 @@ class SubQStringMatcher : public QStringMatcher public: }; -void tst_QStringMatcher::qstringmatcher_data() -{ -} - void tst_QStringMatcher::qstringmatcher() { SubQStringMatcher matcher; diff --git a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp index d5284caeb2..7b0009fc6e 100644 --- a/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp +++ b/tests/auto/corelib/tools/qstringref/tst_qstringref.cpp @@ -51,18 +51,10 @@ Q_DECLARE_METATYPE(qlonglong) //TESTED_CLASS= //TESTED_FILES= - class tst_QStringRef : public QObject { Q_OBJECT - -public: - tst_QStringRef(); - virtual ~tst_QStringRef(); - - public slots: - void init(); void cleanup(); private slots: void endsWith(); @@ -167,18 +159,6 @@ static inline double nan() # define NAN (::nan()) #endif -tst_QStringRef::tst_QStringRef() -{ -} - -tst_QStringRef::~tst_QStringRef() -{ -} - -void tst_QStringRef::init() -{ -} - void tst_QStringRef::cleanup() { QLocale::setDefault(QString(QLatin1Char('C'))); diff --git a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp index 75955591c1..a649824a61 100644 --- a/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp +++ b/tests/auto/corelib/tools/qtextboundaryfinder/tst_qtextboundaryfinder.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -52,15 +51,8 @@ class tst_QTextBoundaryFinder : public QObject { Q_OBJECT - -public: - tst_QTextBoundaryFinder(); - virtual ~tst_QTextBoundaryFinder(); - - public slots: void init(); - void cleanup(); private slots: void graphemeBoundaries(); void wordBoundaries(); @@ -74,14 +66,6 @@ private slots: void toPreviousBoundary(); }; -tst_QTextBoundaryFinder::tst_QTextBoundaryFinder() -{ -} - -tst_QTextBoundaryFinder::~tst_QTextBoundaryFinder() -{ -} - void tst_QTextBoundaryFinder::init() { #ifndef Q_OS_IRIX @@ -89,10 +73,6 @@ void tst_QTextBoundaryFinder::init() #endif } -void tst_QTextBoundaryFinder::cleanup() -{ -} - void tst_QTextBoundaryFinder::graphemeBoundaries() { QFile file("data/GraphemeBreakTest.txt"); diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp index e528ead7ca..cde953efb8 100644 --- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp +++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include "qdatetime.h" @@ -49,17 +48,6 @@ class tst_QTime : public QObject { Q_OBJECT - -public: - tst_QTime(); - virtual ~tst_QTime(); - - -public slots: - void initTestCase(); - void cleanupTestCase(); - void init(); - void cleanup(); private slots: void toStringLocale(); void toString(); @@ -94,37 +82,6 @@ private slots: Q_DECLARE_METATYPE(QTime) -tst_QTime::tst_QTime() -{ -} - -tst_QTime::~tst_QTime() -{ - -} - -// initTestCase will be executed once before the first testfunction is executed. -void tst_QTime::initTestCase() -{ -} - -// cleanupTestCase will be executed once after the last testfunction is executed. -void tst_QTime::cleanupTestCase() -{ -} - -// init() will be executed immediately before each testfunction is run. -void tst_QTime::init() -{ -// TODO: Add testfunction specific initialization code here. -} - -// cleanup() will be executed immediately after each testfunction is run. -void tst_QTime::cleanup() -{ -// TODO: Add testfunction specific cleanup code here. -} - void tst_QTime::addSecs_data() { QTest::addColumn("t1"); diff --git a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp index 176688b809..f3a4f11216 100644 --- a/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp +++ b/tests/auto/corelib/tools/qtimeline/tst_qtimeline.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -47,17 +46,9 @@ //TESTED_CLASS= //TESTED_FILES= -class tst_QTimeLine : public QObject { +class tst_QTimeLine : public QObject +{ Q_OBJECT - -public: - tst_QTimeLine(); - virtual ~tst_QTimeLine(); - -public Q_SLOTS: - void init(); - void cleanup(); - private slots: void range(); void currentTime(); @@ -91,23 +82,6 @@ protected: QTimeLine * view; }; -tst_QTimeLine::tst_QTimeLine() -{ -} - -tst_QTimeLine::~tst_QTimeLine() -{ -} - -void tst_QTimeLine::init() -{ -} - -void tst_QTimeLine::cleanup() -{ -} -#include - void tst_QTimeLine::range() { #ifdef Q_OS_WINCE //On WinCE timer resolution is bad - using longer times instead diff --git a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp index 73ff971945..d10094c78e 100644 --- a/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp +++ b/tests/auto/corelib/tools/qvarlengtharray/tst_qvarlengtharray.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include #include @@ -52,11 +51,6 @@ const int N = 1; class tst_QVarLengthArray : public QObject { Q_OBJECT - -public: - tst_QVarLengthArray() {} - virtual ~tst_QVarLengthArray() {} - private slots: void append(); void removeLast(); diff --git a/tests/auto/corelib/tools/qvector/tst_qvector.cpp b/tests/auto/corelib/tools/qvector/tst_qvector.cpp index 59ff332a1e..490b836f3d 100644 --- a/tests/auto/corelib/tools/qvector/tst_qvector.cpp +++ b/tests/auto/corelib/tools/qvector/tst_qvector.cpp @@ -39,7 +39,6 @@ ** ****************************************************************************/ - #include #include @@ -49,11 +48,6 @@ class tst_QVector : public QObject { Q_OBJECT - -public: - tst_QVector() {} - virtual ~tst_QVector() {} - private slots: void constructors() const; void append() const; -- cgit v1.2.3