Cleanup corelib autotests

Remove redundant empty constructors, destructors and test functions.

Change-Id: Idb51368895e67ec3fc0345a9a5d33d77730c051b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
This commit is contained in:
Jason McDonald 2011-11-07 15:33:49 +10:00 committed by Qt by Nokia
parent 9ceb3b4f6f
commit e8f7fccf22
74 changed files with 62 additions and 1398 deletions

View File

@ -47,14 +47,6 @@
class tst_QAbstractAnimation : public QObject class tst_QAbstractAnimation : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QAbstractAnimation() {};
virtual ~tst_QAbstractAnimation() {};
public Q_SLOTS:
void init();
void cleanup();
private slots: private slots:
void construction(); void construction();
void destruction(); void destruction();
@ -87,14 +79,6 @@ public:
virtual void updateCurrentTime(int) {} virtual void updateCurrentTime(int) {}
}; };
void tst_QAbstractAnimation::init()
{
}
void tst_QAbstractAnimation::cleanup()
{
}
void tst_QAbstractAnimation::construction() void tst_QAbstractAnimation::construction()
{ {
TestableQAbstractAnimation anim; TestableQAbstractAnimation anim;

View File

@ -53,42 +53,24 @@ Q_DECLARE_METATYPE(QAbstractAnimation::State)
class tst_QAnimationGroup : public QObject class tst_QAnimationGroup : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QAnimationGroup();
virtual ~tst_QAnimationGroup();
public Q_SLOTS: public Q_SLOTS:
void init(); void init();
void cleanup();
private slots: private slots:
void construction(); void construction();
void emptyGroup(); void emptyGroup();
void setCurrentTime(); void setCurrentTime();
void statesAndSignals();
void setParentAutoAdd(); void setParentAutoAdd();
void beginNestedGroup(); void beginNestedGroup();
void addChildTwice(); void addChildTwice();
void loopWithoutStartValue(); void loopWithoutStartValue();
}; };
tst_QAnimationGroup::tst_QAnimationGroup()
{
}
tst_QAnimationGroup::~tst_QAnimationGroup()
{
}
void tst_QAnimationGroup::init() void tst_QAnimationGroup::init()
{ {
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State"); qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");
} }
void tst_QAnimationGroup::cleanup()
{
}
void tst_QAnimationGroup::construction() void tst_QAnimationGroup::construction()
{ {
QSequentialAnimationGroup animationgroup; QSequentialAnimationGroup animationgroup;
@ -310,10 +292,6 @@ void tst_QAnimationGroup::setCurrentTime()
QCOMPARE(sequence->currentAnimation(), a2_s_o1); QCOMPARE(sequence->currentAnimation(), a2_s_o1);
} }
void tst_QAnimationGroup::statesAndSignals()
{
}
void tst_QAnimationGroup::setParentAutoAdd() void tst_QAnimationGroup::setParentAutoAdd()
{ {
QParallelAnimationGroup group; QParallelAnimationGroup group;

View File

@ -51,10 +51,6 @@ Q_DECLARE_METATYPE(QAbstractAnimation::State)
class tst_QParallelAnimationGroup : public QObject class tst_QParallelAnimationGroup : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QParallelAnimationGroup();
virtual ~tst_QParallelAnimationGroup();
public Q_SLOTS: public Q_SLOTS:
void initTestCase(); void initTestCase();
@ -79,14 +75,6 @@ private slots:
void QTBUG8910_crashWhenRemovingUncontrolledAnimation(); void QTBUG8910_crashWhenRemovingUncontrolledAnimation();
}; };
tst_QParallelAnimationGroup::tst_QParallelAnimationGroup()
{
}
tst_QParallelAnimationGroup::~tst_QParallelAnimationGroup()
{
}
void tst_QParallelAnimationGroup::initTestCase() void tst_QParallelAnimationGroup::initTestCase()
{ {
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State"); qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");

View File

@ -88,10 +88,6 @@ public:
class tst_QPauseAnimation : public QObject class tst_QPauseAnimation : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QPauseAnimation();
virtual ~tst_QPauseAnimation();
public Q_SLOTS: public Q_SLOTS:
void initTestCase(); void initTestCase();
@ -108,14 +104,6 @@ private slots:
void zeroDuration(); void zeroDuration();
}; };
tst_QPauseAnimation::tst_QPauseAnimation()
{
}
tst_QPauseAnimation::~tst_QPauseAnimation()
{
}
void tst_QPauseAnimation::initTestCase() void tst_QPauseAnimation::initTestCase()
{ {
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State"); qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");

View File

@ -91,13 +91,8 @@ public:
class tst_QPropertyAnimation : public QObject class tst_QPropertyAnimation : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QPropertyAnimation();
virtual ~tst_QPropertyAnimation();
public Q_SLOTS: public Q_SLOTS:
void init(); void initTestCase();
void cleanup();
private slots: private slots:
void construction(); void construction();
@ -133,24 +128,12 @@ private slots:
void zeroLoopCount(); void zeroLoopCount();
}; };
tst_QPropertyAnimation::tst_QPropertyAnimation() void tst_QPropertyAnimation::initTestCase()
{
}
tst_QPropertyAnimation::~tst_QPropertyAnimation()
{
}
void tst_QPropertyAnimation::init()
{ {
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State"); qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");
qRegisterMetaType<QAbstractAnimation::DeletionPolicy>("QAbstractAnimation::DeletionPolicy"); qRegisterMetaType<QAbstractAnimation::DeletionPolicy>("QAbstractAnimation::DeletionPolicy");
} }
void tst_QPropertyAnimation::cleanup()
{
}
class AnimationObject : public QObject class AnimationObject : public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -52,13 +52,8 @@ Q_DECLARE_METATYPE(QAbstractAnimation*)
class tst_QSequentialAnimationGroup : public QObject class tst_QSequentialAnimationGroup : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QSequentialAnimationGroup();
virtual ~tst_QSequentialAnimationGroup();
public Q_SLOTS: public Q_SLOTS:
void init(); void initTestCase();
void cleanup();
private slots: private slots:
void construction(); void construction();
@ -89,24 +84,12 @@ private slots:
void pauseResume(); void pauseResume();
}; };
tst_QSequentialAnimationGroup::tst_QSequentialAnimationGroup() void tst_QSequentialAnimationGroup::initTestCase()
{
}
tst_QSequentialAnimationGroup::~tst_QSequentialAnimationGroup()
{
}
void tst_QSequentialAnimationGroup::init()
{ {
qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State"); qRegisterMetaType<QAbstractAnimation::State>("QAbstractAnimation::State");
qRegisterMetaType<QAbstractAnimation*>("QAbstractAnimation*"); qRegisterMetaType<QAbstractAnimation*>("QAbstractAnimation*");
} }
void tst_QSequentialAnimationGroup::cleanup()
{
}
void tst_QSequentialAnimationGroup::construction() void tst_QSequentialAnimationGroup::construction()
{ {
QSequentialAnimationGroup animationgroup; QSequentialAnimationGroup animationgroup;

View File

@ -46,15 +46,6 @@
class tst_QVariantAnimation : public QObject class tst_QVariantAnimation : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QVariantAnimation() {}
virtual ~tst_QVariantAnimation() {}
public slots:
void init();
void cleanup();
private slots: private slots:
void construction(); void construction();
void destruction(); void destruction();
@ -74,14 +65,6 @@ public:
void updateCurrentValue(const QVariant&) {} void updateCurrentValue(const QVariant&) {}
}; };
void tst_QVariantAnimation::init()
{
}
void tst_QVariantAnimation::cleanup()
{
}
void tst_QVariantAnimation::construction() void tst_QVariantAnimation::construction()
{ {
TestableQVariantAnimation anim; TestableQVariantAnimation anim;

View File

@ -74,7 +74,6 @@ private slots:
void flagF7808080() const; void flagF7808080() const;
void flagEFBFBF() const; void flagEFBFBF() const;
void decode0D() const; void decode0D() const;
void codecForIndex() const;
void aliasForUTF16() const; void aliasForUTF16() const;
void mibForTSCII() const; void mibForTSCII() const;
@ -455,7 +454,6 @@ void tst_QTextCodec::flagF7808080() const
input[2] = char(0x80); input[2] = char(0x80);
input[3] = char(0x80); input[3] = char(0x80);
QTextCodec *const codec = QTextCodec::codecForMib(106); // UTF-8 QTextCodec *const codec = QTextCodec::codecForMib(106); // UTF-8
QVERIFY(codec); QVERIFY(codec);
@ -508,10 +506,6 @@ void tst_QTextCodec::decode0D() const
QCOMPARE(QString::fromUtf8(input.constData()).toUtf8(), input); QCOMPARE(QString::fromUtf8(input.constData()).toUtf8(), input);
} }
void tst_QTextCodec::codecForIndex() const
{
}
void tst_QTextCodec::aliasForUTF16() const void tst_QTextCodec::aliasForUTF16() const
{ {
QVERIFY(QTextCodec::codecForName("UTF-16")->aliases().isEmpty()); QVERIFY(QTextCodec::codecForName("UTF-16")->aliases().isEmpty());

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <qdebug.h> #include <qdebug.h>
#include <QtTest/QtTest> #include <QtTest/QtTest>
@ -51,14 +50,8 @@
class tst_QGetPutEnv : public QObject class tst_QGetPutEnv : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QGetPutEnv();
virtual ~tst_QGetPutEnv();
private slots: private slots:
void getSetCheck(); void getSetCheck();
private:
}; };
void tst_QGetPutEnv::getSetCheck() void tst_QGetPutEnv::getSetCheck()
@ -72,13 +65,5 @@ void tst_QGetPutEnv::getSetCheck()
qputenv(varName,QByteArray()); qputenv(varName,QByteArray());
} }
tst_QGetPutEnv::tst_QGetPutEnv()
{
}
tst_QGetPutEnv::~tst_QGetPutEnv()
{
}
QTEST_MAIN(tst_QGetPutEnv) QTEST_MAIN(tst_QGetPutEnv)
#include "tst_qgetputenv.moc" #include "tst_qgetputenv.moc"

View File

@ -39,10 +39,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QBuffer> #include <QBuffer>
#include <QByteArray> #include <QByteArray>
@ -52,9 +50,6 @@
class tst_QBuffer : public QObject class tst_QBuffer : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QBuffer();
private slots: private slots:
void open(); void open();
void getSetCheck(); void getSetCheck();
@ -101,10 +96,6 @@ void tst_QBuffer::getSetCheck()
QCOMPARE(QByteArray(), obj1.data()); QCOMPARE(QByteArray(), obj1.data());
} }
tst_QBuffer::tst_QBuffer()
{
}
void tst_QBuffer::open() void tst_QBuffer::open()
{ {
QByteArray data(10, 'f'); QByteArray data(10, 'f');

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QtGui/QtGui> #include <QtGui/QtGui>
@ -54,14 +53,10 @@ class tst_QDataStream : public QObject
Q_OBJECT Q_OBJECT
public: public:
tst_QDataStream();
virtual ~tst_QDataStream();
void stream_data(int noOfElements); void stream_data(int noOfElements);
public slots: public slots:
void init(); void cleanupTestCase();
void cleanup();
private slots: private slots:
void getSetCheck(); void getSetCheck();
@ -296,23 +291,11 @@ void tst_QDataStream::getSetCheck()
QCOMPARE(QDataStream::ReadCorruptData, obj1.status()); QCOMPARE(QDataStream::ReadCorruptData, obj1.status());
} }
tst_QDataStream::tst_QDataStream() void tst_QDataStream::cleanupTestCase()
{
}
tst_QDataStream::~tst_QDataStream()
{ {
QFile::remove(QLatin1String("qdatastream.out")); QFile::remove(QLatin1String("qdatastream.out"));
} }
void tst_QDataStream::init()
{
}
void tst_QDataStream::cleanup()
{
}
static int dataIndex(const QString &tag) static int dataIndex(const QString &tag)
{ {
int pos = tag.lastIndexOf("_"); int pos = tag.lastIndexOf("_");

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
@ -72,10 +71,6 @@ class tst_QDir : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QDir();
virtual ~tst_QDir();
private slots: private slots:
void getSetCheck(); void getSetCheck();
void construction(); void construction();
@ -213,14 +208,6 @@ void tst_QDir::getSetCheck()
QCOMPARE(QDir::SortFlags(QDir::NoSort), obj1.sorting()); QCOMPARE(QDir::SortFlags(QDir::NoSort), obj1.sorting());
} }
tst_QDir::tst_QDir()
{
}
tst_QDir::~tst_QDir()
{
}
void tst_QDir::construction() void tst_QDir::construction()
{ {
QFileInfo myFileInfo("/machine/share/dir1/file1"); QFileInfo myFileInfo("/machine/share/dir1/file1");

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qplatformdefs.h> #include <qplatformdefs.h>
@ -101,15 +100,9 @@ class tst_QFile : public QObject
{ {
Q_OBJECT Q_OBJECT
public: private slots:
tst_QFile();
virtual ~tst_QFile();
public slots:
void init(); void init();
void cleanup(); void cleanup();
private slots:
void initTestCase(); void initTestCase();
void cleanupTestCase(); void cleanupTestCase();
void exists(); void exists();
@ -325,28 +318,14 @@ private:
FILE *stream_; FILE *stream_;
}; };
tst_QFile::tst_QFile()
{
}
tst_QFile::~tst_QFile()
{
}
void tst_QFile::init() void tst_QFile::init()
{ {
// TODO: Add initialization code here.
// This will be executed immediately before each test is run.
fd_ = -1; fd_ = -1;
stream_ = 0; stream_ = 0;
} }
void tst_QFile::cleanup() void tst_QFile::cleanup()
{ {
// TODO: Add cleanup code here.
// This will be executed immediately after each test is run.
// for copyFallback() // for copyFallback()
if (QFile::exists("file-copy-destination.txt")) { if (QFile::exists("file-copy-destination.txt")) {
QFile::setPermissions("file-copy-destination.txt", QFile::setPermissions("file-copy-destination.txt",

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qfile.h> #include <qfile.h>
@ -79,11 +78,9 @@ class tst_QFileInfo : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QFileInfo();
~tst_QFileInfo();
private slots: private slots:
void cleanupTestCase();
void getSetCheck(); void getSetCheck();
void copy(); void copy();
@ -196,11 +193,7 @@ private slots:
void invalidState(); void invalidState();
}; };
tst_QFileInfo::tst_QFileInfo() void tst_QFileInfo::cleanupTestCase()
{
}
tst_QFileInfo::~tst_QFileInfo()
{ {
QFile::remove("brokenlink.lnk"); QFile::remove("brokenlink.lnk");
QFile::remove("link.lnk"); QFile::remove("link.lnk");

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtCore/QtCore> #include <QtCore/QtCore>
#include <QtNetwork/QtNetwork> #include <QtNetwork/QtNetwork>
#include <QtTest/QtTest> #include <QtTest/QtTest>
@ -53,14 +52,6 @@ class tst_QIODevice : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QIODevice();
virtual ~tst_QIODevice();
public slots:
void init();
void cleanup();
private slots: private slots:
void getSetCheck(); void getSetCheck();
#if !defined(Q_OS_WINCE) || !defined(WINCE_EMULATOR_TEST) #if !defined(Q_OS_WINCE) || !defined(WINCE_EMULATOR_TEST)
@ -100,22 +91,6 @@ void tst_QIODevice::getSetCheck()
QCOMPARE(QIODevice::OpenMode(QIODevice::ReadWrite), obj1->openMode()); 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. // Networking tests in a WinCE emulator are unstable.

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qstandardpaths.h> #include <qstandardpaths.h>
#include <qdebug.h> #include <qdebug.h>
@ -57,15 +56,10 @@
//TESTED_CLASS=QStandardPaths //TESTED_CLASS=QStandardPaths
//TESTED_FILES=qstandardpaths.cpp //TESTED_FILES=qstandardpaths.cpp
class tst_qstandardpaths : public QObject { class tst_qstandardpaths : public QObject
{
Q_OBJECT Q_OBJECT
public:
tst_qstandardpaths() {
}
virtual ~tst_qstandardpaths() {
}
private slots: private slots:
void testDefaultLocations(); void testDefaultLocations();
void testCustomLocations(); void testCustomLocations();

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
#include <qstring.h> #include <qstring.h>
@ -65,13 +64,7 @@
class tst_QTemporaryFile : public QObject class tst_QTemporaryFile : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QTemporaryFile();
virtual ~tst_QTemporaryFile();
public slots: public slots:
void init();
void cleanup();
void initTestCase(); void initTestCase();
void cleanupTestCase(); void cleanupTestCase();
@ -100,8 +93,6 @@ private slots:
void QTBUG_4796_data(); void QTBUG_4796_data();
void QTBUG_4796(); void QTBUG_4796();
public:
}; };
void tst_QTemporaryFile::initTestCase() void tst_QTemporaryFile::initTestCase()
@ -137,27 +128,6 @@ void tst_QTemporaryFile::getSetCheck()
QCOMPARE(true, obj1.autoRemove()); 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() void tst_QTemporaryFile::fileTemplate_data()
{ {
QTest::addColumn<QString>("constructorTemplate"); QTest::addColumn<QString>("constructorTemplate");

View File

@ -39,11 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
/*-*-encoding:latin1-*-*/
//#include <iostream>
//using namespace std;
#include <QtTest/QtTest> #include <QtTest/QtTest>
#ifdef Q_OS_UNIX #ifdef Q_OS_UNIX
@ -80,12 +75,7 @@ class tst_QTextStream : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QTextStream();
virtual ~tst_QTextStream();
public slots: public slots:
void init();
void cleanup(); void cleanup();
private slots: private slots:
@ -376,18 +366,6 @@ void tst_QTextStream::getSetCheck()
QCOMPARE(INT_MAX, obj1.realNumberPrecision()); QCOMPARE(INT_MAX, obj1.realNumberPrecision());
} }
tst_QTextStream::tst_QTextStream()
{
}
tst_QTextStream::~tst_QTextStream()
{
}
void tst_QTextStream::init()
{
}
void tst_QTextStream::cleanup() void tst_QTextStream::cleanup()
{ {
QCoreApplication::instance()->processEvents(); QCoreApplication::instance()->processEvents();

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QtCore/QDebug> #include <QtCore/QDebug>
@ -80,14 +79,6 @@ class tst_QUrl : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QUrl();
virtual ~tst_QUrl();
public slots:
void init();
void cleanup();
private slots: private slots:
void effectiveTLDs_data(); void effectiveTLDs_data();
void effectiveTLDs(); void effectiveTLDs();
@ -246,23 +237,6 @@ void tst_QUrl::getSetCheck()
QCOMPARE(QUrl::idnWhitelist(), original); QCOMPARE(QUrl::idnWhitelist(), original);
} }
tst_QUrl::tst_QUrl()
{
}
tst_QUrl::~tst_QUrl()
{
}
void tst_QUrl::init()
{
}
void tst_QUrl::cleanup()
{
}
void tst_QUrl::constructing() void tst_QUrl::constructing()
{ {
QUrl url; QUrl url;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QtCore/QtCore> #include <QtCore/QtCore>
@ -53,21 +52,15 @@
Q_DECLARE_METATYPE(QModelIndex) 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 class tst_QAbstractItemModel : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QAbstractItemModel();
virtual ~tst_QAbstractItemModel();
public slots: public slots:
void initTestCase(); void initTestCase();
void cleanupTestCase();
void init(); void init();
void cleanup();
private slots: private slots:
void index(); void index();
@ -116,17 +109,15 @@ private slots:
void testReset(); void testReset();
private: private:
DynamicTreeModel *m_model; DynamicTreeModel *m_model;
}; };
/*! /*!
Test model that impliments the pure vitual functions and anything else that is Test model that impliments the pure vitual functions and anything else that is
needed. 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 class QtTestModel: public QAbstractItemModel
{ {
@ -153,8 +144,8 @@ public:
}; };
QtTestModel::QtTestModel(int rows, int columns, QObject *parent) 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); table.resize(rows);
for (int r = 0; r < rows; ++r) { for (int r = 0; r < rows; ++r) {
table[r].resize(columns); table[r].resize(columns);
@ -164,14 +155,17 @@ QtTestModel::QtTestModel(int rows, int columns, QObject *parent)
} }
QtTestModel::QtTestModel(const QVector<QVector<QString> > tbl, QObject *parent) QtTestModel::QtTestModel(const QVector<QVector<QString> > tbl, QObject *parent)
: QAbstractItemModel(parent), wrongIndex(false) { : QAbstractItemModel(parent), wrongIndex(false)
{
table = tbl; table = tbl;
rCount = tbl.count(); rCount = tbl.count();
cCount = tbl.at(0).count(); cCount = tbl.at(0).count();
} }
QModelIndex QtTestModel::index(int row, int column, const QModelIndex &parent) const 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(); } QModelIndex QtTestModel::parent(const QModelIndex &) const { return QModelIndex(); }
int QtTestModel::rowCount(const QModelIndex &parent) const { return parent.isValid() ? 0 : rCount; } int QtTestModel::rowCount(const QModelIndex &parent) const { return parent.isValid() ? 0 : rCount; }
@ -251,14 +245,6 @@ void QtTestModel::reset()
QAbstractItemModel::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. * 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. * Therefore, we must initialize it globally.
@ -269,11 +255,6 @@ void tst_QAbstractItemModel::initTestCase()
qRegisterMetaType<QModelIndex>("QModelIndex"); qRegisterMetaType<QModelIndex>("QModelIndex");
} }
void tst_QAbstractItemModel::cleanupTestCase()
{
}
void tst_QAbstractItemModel::init() void tst_QAbstractItemModel::init()
{ {
m_model = new DynamicTreeModel(this); m_model = new DynamicTreeModel(this);
@ -292,11 +273,6 @@ void tst_QAbstractItemModel::init()
insertCommand->doCommand(); insertCommand->doCommand();
} }
void tst_QAbstractItemModel::cleanup()
{
}
/* /*
tests tests
*/ */

View File

@ -39,10 +39,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qabstracteventdispatcher.h> #include <qabstracteventdispatcher.h>
#include <qcoreapplication.h> #include <qcoreapplication.h>
#include <qcoreevent.h> #include <qcoreevent.h>
@ -183,12 +181,6 @@ public slots:
class tst_QEventLoop : public QObject class tst_QEventLoop : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QEventLoop();
~tst_QEventLoop();
public slots:
void init();
void cleanup();
private slots: private slots:
// This test *must* run first. See the definition for why. // This test *must* run first. See the definition for why.
void processEvents(); void processEvents();
@ -211,18 +203,6 @@ protected:
void customEvent(QEvent *e); void customEvent(QEvent *e);
}; };
tst_QEventLoop::tst_QEventLoop()
{ }
tst_QEventLoop::~tst_QEventLoop()
{ }
void tst_QEventLoop::init()
{ }
void tst_QEventLoop::cleanup()
{ }
void tst_QEventLoop::processEvents() void tst_QEventLoop::processEvents()
{ {
QSignalSpy spy1(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock())); QSignalSpy spy1(QAbstractEventDispatcher::instance(), SIGNAL(aboutToBlock()));

View File

@ -65,10 +65,6 @@ class tst_QItemModel : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QItemModel() {};
virtual ~tst_QItemModel() {};
public slots: public slots:
void init(); void init();
void cleanup(); void cleanup();

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qobject.h> #include <qobject.h>
@ -119,9 +118,6 @@ class tst_QMetaObject : public QObject
public: public:
enum EnumType { EnumType1 }; enum EnumType { EnumType1 };
tst_QMetaObject();
~tst_QMetaObject();
void setValue(EnumType) {} void setValue(EnumType) {}
EnumType getValue() const { return EnumType1; } EnumType getValue() const { return EnumType1; }
@ -151,11 +147,6 @@ public:
QList<QVariant> value4; QList<QVariant> value4;
QVariantList value5; QVariantList value5;
public slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
private slots: private slots:
void connectSlotsByName(); void connectSlotsByName();
void invokeMetaMember(); void invokeMetaMember();
@ -188,32 +179,6 @@ signals:
void value7Changed(const QString &); 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() void tst_QMetaObject::stdSet()
{ {
const QMetaObject *mo = metaObject(); const QMetaObject *mo = metaObject();

View File

@ -46,10 +46,6 @@
class tst_QMetaObjectBuilder : public QObject class tst_QMetaObjectBuilder : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QMetaObjectBuilder() {}
~tst_QMetaObjectBuilder() {}
private slots: private slots:
void mocVersionCheck(); void mocVersionCheck();
void create(); void create();

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QMimeData> #include <QMimeData>
@ -47,11 +46,6 @@
class tst_QMimeData : public QObject class tst_QMimeData : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QMimeData()
{
}
private slots: private slots:
void clear() const; void clear() const;
void colorData() const; void colorData() const;
@ -338,6 +332,5 @@ void tst_QMimeData::setUrls() const
QVERIFY(mimeData.hasUrls() == false); QVERIFY(mimeData.hasUrls() == false);
} }
QTEST_MAIN(tst_QMimeData) QTEST_MAIN(tst_QMimeData)
#include "tst_qmimedata.moc" #include "tst_qmimedata.moc"

View File

@ -39,17 +39,14 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
#include <qpointer.h> #include <qpointer.h>
#include <qtimer.h> #include <qtimer.h>
#include <qregexp.h> #include <qregexp.h>
#include <qmetaobject.h> #include <qmetaobject.h>
#include <qvariant.h> #include <qvariant.h>
#include <QTcpServer> #include <QTcpServer>
#include <QTcpSocket> #include <QTcpSocket>
#include <QThread> #include <QThread>
@ -62,7 +59,6 @@
#include <private/qobject_p.h> #include <private/qobject_p.h>
#endif #endif
#include <math.h> #include <math.h>
//TESTED_CLASS= //TESTED_CLASS=
@ -71,17 +67,6 @@
class tst_QObject : public QObject class tst_QObject : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QObject();
virtual ~tst_QObject();
public slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
private slots: private slots:
void disconnect(); void disconnect();
void connectByName(); void connectByName();
@ -136,35 +121,8 @@ private slots:
void disconnectNotSignalMetaMethod(); void disconnectNotSignalMetaMethod();
void autoConnectionBehavior(); void autoConnectionBehavior();
void baseDestroyed(); 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 class SenderObject : public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -39,62 +39,21 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qsignalmapper.h> #include <qsignalmapper.h>
#include <qspinbox.h> #include <qspinbox.h>
//TESTED_CLASS= //TESTED_CLASS=
//TESTED_FILES= //TESTED_FILES=
class tst_QSignalMapper : public QObject class tst_QSignalMapper : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QSignalMapper();
virtual ~tst_QSignalMapper();
public slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
private slots: private slots:
void mapped(); 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 class QtTestObject : public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QTest> #include <QtTest/QTest>
#include <QtTest/QSignalSpy> #include <QtTest/QSignalSpy>
#include <QtTest/QTestEventLoop> #include <QtTest/QTestEventLoop>
@ -65,10 +64,6 @@
class tst_QSocketNotifier : public QObject class tst_QSocketNotifier : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QSocketNotifier();
~tst_QSocketNotifier();
private slots: private slots:
void unexpectedDisconnection(); void unexpectedDisconnection();
void mixingWithTimers(); void mixingWithTimers();
@ -77,13 +72,6 @@ private slots:
#endif #endif
}; };
tst_QSocketNotifier::tst_QSocketNotifier()
{ }
tst_QSocketNotifier::~tst_QSocketNotifier()
{
}
class UnexpectedDisconnectTester : public QObject class UnexpectedDisconnectTester : public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -39,10 +39,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qtimer.h> #include <qtimer.h>
#include <qthread.h> #include <qthread.h>
@ -56,17 +54,6 @@
class tst_QTimer : public QObject class tst_QTimer : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QTimer();
virtual ~tst_QTimer();
public slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
private slots: private slots:
void zeroTimer(); void zeroTimer();
void singleShotTimeout(); void singleShotTimeout();
@ -110,30 +97,6 @@ void TimerHelper::timeout()
++count; ++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() void tst_QTimer::zeroTimer()
{ {
TimerHelper helper; TimerHelper helper;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QWidget> #include <QWidget>
#include <qtranslator.h> #include <qtranslator.h>
@ -54,15 +53,8 @@ class tst_QTranslator : public QWidget
public: public:
tst_QTranslator(); tst_QTranslator();
virtual ~tst_QTranslator();
public slots:
void init();
void cleanup();
protected: protected:
bool event(QEvent *event); bool event(QEvent *event);
private slots: private slots:
void load(); void load();
void load2(); void load2();
@ -77,7 +69,6 @@ private:
int languageChangeEventCounter; int languageChangeEventCounter;
}; };
tst_QTranslator::tst_QTranslator() tst_QTranslator::tst_QTranslator()
: languageChangeEventCounter(0) : languageChangeEventCounter(0)
{ {
@ -85,18 +76,6 @@ tst_QTranslator::tst_QTranslator()
hide(); hide();
} }
tst_QTranslator::~tst_QTranslator()
{
}
void tst_QTranslator::init()
{
}
void tst_QTranslator::cleanup()
{
}
bool tst_QTranslator::event(QEvent *event) bool tst_QTranslator::event(QEvent *event)
{ {
if (event->type() == QEvent::LanguageChange) if (event->type() == QEvent::LanguageChange)

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qvariant.h> #include <qvariant.h>
@ -90,9 +89,6 @@ class tst_QVariant : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QVariant();
private slots: private slots:
void constructor(); void constructor();
void copy_constructor(); void copy_constructor();
@ -275,10 +271,6 @@ Q_DECLARE_METATYPE(QVariant)
const qlonglong intMax1 = (qlonglong)INT_MAX + 1; const qlonglong intMax1 = (qlonglong)INT_MAX + 1;
const qulonglong uintMax1 = (qulonglong)UINT_MAX + 1; const qulonglong uintMax1 = (qulonglong)UINT_MAX + 1;
tst_QVariant::tst_QVariant()
{
}
void tst_QVariant::constructor() void tst_QVariant::constructor()
{ {
QVariant variant; QVariant variant;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <private/qwineventnotifier_p.h> #include <private/qwineventnotifier_p.h>
#include <qtimer.h> #include <qtimer.h>
@ -51,20 +50,10 @@ class tst_QWinEventNotifier : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QWinEventNotifier();
~tst_QWinEventNotifier();
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
protected slots: protected slots:
void simple_activated(); void simple_activated();
void simple_timerSet(); void simple_timerSet();
private slots: private slots:
void simple(); void simple();
private: private:
@ -72,26 +61,6 @@ private:
bool simpleActivated; 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() void tst_QWinEventNotifier::simple_activated()
{ {
simpleActivated = true; simpleActivated = true;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qdir.h> #include <qdir.h>
#include <qpluginloader.h> #include <qpluginloader.h>
@ -107,11 +106,6 @@ QT_FORWARD_DECLARE_CLASS(QPluginLoader)
class tst_QPluginLoader : public QObject class tst_QPluginLoader : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QPluginLoader();
virtual ~tst_QPluginLoader();
private slots: private slots:
void errorString(); void errorString();
void loadHints(); void loadHints();
@ -121,15 +115,6 @@ private slots:
void loadGarbage(); void loadGarbage();
}; };
tst_QPluginLoader::tst_QPluginLoader()
{
}
tst_QPluginLoader::~tst_QPluginLoader()
{
}
//#define SHOW_ERRORS 1 //#define SHOW_ERRORS 1
void tst_QPluginLoader::errorString() void tst_QPluginLoader::errorString()

View File

@ -68,7 +68,6 @@ class tst_QState : public QObject
public: public:
tst_QState(); tst_QState();
virtual ~tst_QState();
private slots: private slots:
void assignProperty(); void assignProperty();
@ -84,10 +83,6 @@ tst_QState::tst_QState() : functionCalled(false)
{ {
} }
tst_QState::~tst_QState()
{
}
class TestClass: public QObject class TestClass: public QObject
{ {
Q_OBJECT Q_OBJECT

View File

@ -108,14 +108,7 @@ Q_SIGNALS:
class tst_QStateMachine : public QObject class tst_QStateMachine : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QStateMachine();
virtual ~tst_QStateMachine();
private slots: private slots:
void init();
void cleanup();
void rootState(); void rootState();
void machineWithParent(); void machineWithParent();
void addAndRemoveState(); void addAndRemoveState();
@ -217,14 +210,6 @@ private slots:
void stopInEventTest(); void stopInEventTest();
}; };
tst_QStateMachine::tst_QStateMachine()
{
}
tst_QStateMachine::~tst_QStateMachine()
{
}
class TestState : public QState class TestState : public QState
{ {
public: public:
@ -260,14 +245,6 @@ protected:
} }
}; };
void tst_QStateMachine::init()
{
}
void tst_QStateMachine::cleanup()
{
}
class EventTransition : public QAbstractTransition class EventTransition : public QAbstractTransition
{ {
public: public:

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QAtomicInt> #include <QAtomicInt>
@ -54,10 +53,6 @@ class tst_QAtomicInt : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QAtomicInt();
~tst_QAtomicInt();
private slots: private slots:
void warningFree(); void warningFree();
@ -108,12 +103,6 @@ private:
static void warningFreeHelper(); static void warningFreeHelper();
}; };
tst_QAtomicInt::tst_QAtomicInt()
{ }
tst_QAtomicInt::~tst_QAtomicInt()
{ }
void tst_QAtomicInt::warningFreeHelper() void tst_QAtomicInt::warningFreeHelper()
{ {
qFatal("This code is bogus, and shouldn't be run. We're looking for compiler warnings only."); qFatal("This code is bogus, and shouldn't be run. We're looking for compiler warnings only.");

View File

@ -39,11 +39,9 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qatomic.h> #include <qatomic.h>
#include <limits.h> #include <limits.h>
//TESTED_CLASS= //TESTED_CLASS=
@ -52,11 +50,6 @@
class tst_QAtomicPointer : public QObject class tst_QAtomicPointer : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QAtomicPointer();
~tst_QAtomicPointer();
private slots: private slots:
void warningFree(); void warningFree();
@ -85,12 +78,6 @@ private:
static void warningFreeHelper(); static void warningFreeHelper();
}; };
tst_QAtomicPointer::tst_QAtomicPointer()
{ }
tst_QAtomicPointer::~tst_QAtomicPointer()
{ }
struct WFHC struct WFHC
{ {
void bar() {} void bar() {}

View File

@ -54,11 +54,6 @@
class tst_QMutex : public QObject class tst_QMutex : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QMutex();
virtual ~tst_QMutex();
private slots: private slots:
void tryLock(); void tryLock();
void lock_unlock_locked_tryLock(); void lock_unlock_locked_tryLock();
@ -70,15 +65,6 @@ private slots:
static const int iterations = 100; static const int iterations = 100;
tst_QMutex::tst_QMutex()
{
}
tst_QMutex::~tst_QMutex()
{
}
QAtomicInt lockCount(0); QAtomicInt lockCount(0);
QMutex normalMutex, recursiveMutex(QMutex::Recursive); QMutex normalMutex, recursiveMutex(QMutex::Recursive);
QSemaphore testsTurn; QSemaphore testsTurn;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QCoreApplication> #include <QCoreApplication>
@ -73,9 +72,6 @@ class tst_QMutexLocker : public QObject
Q_OBJECT Q_OBJECT
public: public:
tst_QMutexLocker();
~tst_QMutexLocker();
tst_QMutexLockerThread *thread; tst_QMutexLockerThread *thread;
void waitForThread() void waitForThread()
@ -93,14 +89,6 @@ private slots:
void lockerStateTest(); void lockerStateTest();
}; };
tst_QMutexLocker::tst_QMutexLocker()
{
}
tst_QMutexLocker::~tst_QMutexLocker()
{
}
void tst_QMutexLocker::scopeTest() void tst_QMutexLocker::scopeTest()
{ {
class ScopeTestThread : public tst_QMutexLockerThread class ScopeTestThread : public tst_QMutexLockerThread

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QCoreApplication> #include <QCoreApplication>
@ -68,9 +67,6 @@ class tst_QReadLocker : public QObject
Q_OBJECT Q_OBJECT
public: public:
tst_QReadLocker();
~tst_QReadLocker();
tst_QReadLockerThread *thread; tst_QReadLockerThread *thread;
void waitForThread() void waitForThread()
@ -88,14 +84,6 @@ private slots:
void lockerStateTest(); void lockerStateTest();
}; };
tst_QReadLocker::tst_QReadLocker()
{
}
tst_QReadLocker::~tst_QReadLocker()
{
}
void tst_QReadLocker::scopeTest() void tst_QReadLocker::scopeTest()
{ {
class ScopeTestThread : public tst_QReadLockerThread class ScopeTestThread : public tst_QReadLockerThread

View File

@ -39,11 +39,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
#include <qreadwritelock.h> #include <qreadwritelock.h>
#include <qmutex.h> #include <qmutex.h>
#include <qthread.h> #include <qthread.h>
@ -73,10 +70,6 @@
class tst_QReadWriteLock : public QObject class tst_QReadWriteLock : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QReadWriteLock();
virtual ~tst_QReadWriteLock();
/* /*
Singlethreaded tests Singlethreaded tests
@ -92,11 +85,11 @@ void writeLockLoop();
void readWriteLockUnlockLoop(); void readWriteLockUnlockLoop();
void tryReadLock(); void tryReadLock();
void tryWriteLock(); void tryWriteLock();
/* /*
Multithreaded tests Multithreaded tests
*/ */
private slots: private slots:
void readLockBlockRelease(); void readLockBlockRelease();
void writeLockBlockRelease(); void writeLockBlockRelease();
void multipleReadersBlockRelease(); void multipleReadersBlockRelease();
@ -118,16 +111,6 @@ void uncontendedLocks();
void recursiveWriteLock(); void recursiveWriteLock();
}; };
tst_QReadWriteLock::tst_QReadWriteLock()
{
}
tst_QReadWriteLock::~tst_QReadWriteLock()
{
}
void tst_QReadWriteLock::constructDestruct() void tst_QReadWriteLock::constructDestruct()
{ {
{ {

View File

@ -39,10 +39,8 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
#include <qthread.h> #include <qthread.h>
#include <qsemaphore.h> #include <qsemaphore.h>
@ -53,11 +51,6 @@
class tst_QSemaphore : public QObject class tst_QSemaphore : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QSemaphore();
~tst_QSemaphore();
private slots: private slots:
void acquire(); void acquire();
void tryAcquire(); void tryAcquire();
@ -69,12 +62,6 @@ private slots:
static QSemaphore *semaphore = 0; static QSemaphore *semaphore = 0;
tst_QSemaphore::tst_QSemaphore()
{ }
tst_QSemaphore::~tst_QSemaphore()
{ }
class ThreadOne : public QThread class ThreadOne : public QThread
{ {
public: public:

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
@ -67,11 +66,6 @@
class tst_QThread : public QObject class tst_QThread : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QThread();
virtual ~tst_QThread();
private slots: private slots:
void currentThreadId(); void currentThreadId();
void currentThread(); void currentThread();
@ -272,16 +266,6 @@ public:
} }
}; };
tst_QThread::tst_QThread()
{
}
tst_QThread::~tst_QThread()
{
}
void tst_QThread::currentThreadId() void tst_QThread::currentThreadId()
{ {
Current_Thread thread; Current_Thread thread;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
@ -64,10 +63,6 @@
class tst_QThreadStorage : public QObject class tst_QThreadStorage : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QThreadStorage();
private slots: private slots:
void hasLocalData(); void hasLocalData();
void localData(); void localData();
@ -91,10 +86,6 @@ public:
}; };
int Pointer::count = 0; int Pointer::count = 0;
tst_QThreadStorage::tst_QThreadStorage()
{ }
void tst_QThreadStorage::hasLocalData() void tst_QThreadStorage::hasLocalData()
{ {
QThreadStorage<Pointer *> pointers; QThreadStorage<Pointer *> pointers;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
@ -55,10 +54,6 @@
class tst_QWaitCondition : public QObject class tst_QWaitCondition : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QWaitCondition();
private slots: private slots:
void wait_QMutex(); void wait_QMutex();
void wait_QReadWriteLock(); void wait_QReadWriteLock();
@ -76,11 +71,6 @@ static const int ThreadCount = 4;
static const int ThreadCount = 10; static const int ThreadCount = 10;
#endif #endif
tst_QWaitCondition::tst_QWaitCondition()
{
}
class wait_QMutex_Thread_1 : public QThread class wait_QMutex_Thread_1 : public QThread
{ {
public: public:

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QCoreApplication> #include <QCoreApplication>
@ -68,9 +67,6 @@ class tst_QWriteLocker : public QObject
Q_OBJECT Q_OBJECT
public: public:
tst_QWriteLocker();
~tst_QWriteLocker();
tst_QWriteLockerThread *thread; tst_QWriteLockerThread *thread;
void waitForThread() void waitForThread()
@ -88,14 +84,6 @@ private slots:
void lockerStateTest(); void lockerStateTest();
}; };
tst_QWriteLocker::tst_QWriteLocker()
{
}
tst_QWriteLocker::~tst_QWriteLocker()
{
}
void tst_QWriteLocker::scopeTest() void tst_QWriteLocker::scopeTest()
{ {
class ScopeTestThread : public tst_QWriteLockerThread class ScopeTestThread : public tst_QWriteLockerThread

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <iostream> #include <iostream>
@ -60,15 +59,6 @@ using namespace std;
class tst_QAlgorithms : public QObject class tst_QAlgorithms : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QAlgorithms();
~tst_QAlgorithms();
public slots:
void init();
void cleanup();
private slots: private slots:
void test_qLowerBound_data(); void test_qLowerBound_data();
void test_qLowerBound(); void test_qLowerBound();
@ -96,23 +86,6 @@ private:
#endif #endif
}; };
tst_QAlgorithms::tst_QAlgorithms()
{
}
tst_QAlgorithms::~tst_QAlgorithms()
{
}
void tst_QAlgorithms::init()
{
}
void tst_QAlgorithms::cleanup()
{
}
class TestInt class TestInt
{ {
public: public:

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QtCore/QBuffer> #include <QtCore/QBuffer>
#include <QtCore/QDataStream> #include <QtCore/QDataStream>
@ -72,15 +71,6 @@ static QBitArray QStringToQBitArray(const QString &str)
class tst_QBitArray : public QObject class tst_QBitArray : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QBitArray();
virtual ~tst_QBitArray();
public slots:
void init();
void cleanup();
private slots: private slots:
void size_data(); void size_data();
void size(); void size();
@ -115,27 +105,6 @@ private slots:
Q_DECLARE_METATYPE(QBitArray) 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() void tst_QBitArray::size_data()
{ {
//create the testtable instance and define the elements //create the testtable instance and define the elements

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qbytearray.h> #include <qbytearray.h>
@ -59,13 +58,6 @@ class tst_QByteArray : public QObject
public: public:
tst_QByteArray(); tst_QByteArray();
virtual ~tst_QByteArray();
public slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
private slots: private slots:
void swap(); void swap();
void qCompress_data(); void qCompress_data();
@ -154,26 +146,6 @@ tst_QByteArray::tst_QByteArray()
qRegisterMetaType<qulonglong>("qulonglong"); qRegisterMetaType<qulonglong>("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() void tst_QByteArray::qCompress_data()
{ {
QTest::addColumn<QByteArray>("ba"); QTest::addColumn<QByteArray>("ba");

View File

@ -49,11 +49,6 @@
class tst_QCache : public QObject class tst_QCache : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QCache();
virtual ~tst_QCache();
public slots: public slots:
void initTestCase(); void initTestCase();
void cleanupTestCase(); void cleanupTestCase();
@ -82,14 +77,6 @@ struct Foo {
int Foo::count = 0; int Foo::count = 0;
tst_QCache::tst_QCache()
{
}
tst_QCache::~tst_QCache()
{
}
void tst_QCache::initTestCase() void tst_QCache::initTestCase()
{ {
Foo::count = 0; Foo::count = 0;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qchar.h> #include <qchar.h>
#include <qfile.h> #include <qfile.h>
@ -49,23 +48,13 @@
#include <qcoreapplication.h> #include <qcoreapplication.h>
#endif #endif
//TESTED_CLASS= //TESTED_CLASS=
//TESTED_FILES= //TESTED_FILES=
class tst_QChar : public QObject class tst_QChar : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QChar();
~tst_QChar();
public slots: public slots:
void initTestCase();
void cleanupTestCase();
void init(); void init();
void cleanup(); void cleanup();
private slots: private slots:
@ -104,18 +93,6 @@ private:
#endif #endif
}; };
tst_QChar::tst_QChar()
{}
tst_QChar::~tst_QChar()
{ }
void tst_QChar::initTestCase()
{ }
void tst_QChar::cleanupTestCase()
{ }
void tst_QChar::init() void tst_QChar::init()
{ {
#if defined(Q_OS_WINCE) #if defined(Q_OS_WINCE)

View File

@ -50,9 +50,6 @@
class tst_QContiguousCache : public QObject class tst_QContiguousCache : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QContiguousCache() {}
virtual ~tst_QContiguousCache() {}
private slots: private slots:
void empty(); void empty();
void swap(); void swap();

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qdatetime.h> #include <qdatetime.h>
#include <qlocale.h> #include <qlocale.h>
@ -50,14 +49,6 @@
class tst_QDate : public QObject class tst_QDate : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QDate();
virtual ~tst_QDate();
public slots:
void init();
void cleanup();
private slots: private slots:
void toString(); void toString();
void isValid_data(); void isValid_data();
@ -104,27 +95,6 @@ private slots:
Q_DECLARE_METATYPE(QDate) 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() void tst_QDate::isValid_data()
{ {
QTest::addColumn<int>("year"); QTest::addColumn<int>("year");

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#ifndef Q_OS_WINCE #ifndef Q_OS_WINCE
#include <time.h> #include <time.h>
@ -61,13 +60,11 @@ class tst_QDateTime : public QObject
public: public:
tst_QDateTime(); tst_QDateTime();
virtual ~tst_QDateTime();
static QString str( int y, int month, int d, int h, int min, int s ); static QString str( int y, int month, int d, int h, int min, int s );
static QDateTime dt( const QString& str ); static QDateTime dt( const QString& str );
public slots: public slots:
void init(); void init();
void cleanup();
private slots: private slots:
void ctor(); void ctor();
void operator_eq(); void operator_eq();
@ -162,11 +159,6 @@ tst_QDateTime::tst_QDateTime()
europeanTimeZone = (x1 == 631148400 && x2 == 644191200); europeanTimeZone = (x1 == 631148400 && x2 == 644191200);
} }
tst_QDateTime::~tst_QDateTime()
{
}
void tst_QDateTime::init() void tst_QDateTime::init()
{ {
#if defined(Q_OS_WINCE) #if defined(Q_OS_WINCE)
@ -174,11 +166,6 @@ void tst_QDateTime::init()
#elif defined(Q_OS_WIN) #elif defined(Q_OS_WIN)
SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT)); SetThreadLocale(MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), SORT_DEFAULT));
#endif #endif
}
void tst_QDateTime::cleanup()
{
} }
QString tst_QDateTime::str( int y, int month, int d, int h, int min, int s ) QString tst_QDateTime::str( int y, int month, int d, int h, int min, int s )

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qeasingcurve.h> #include <qeasingcurve.h>
@ -47,17 +46,9 @@
//TESTED_CLASS= //TESTED_CLASS=
//TESTED_FILES= //TESTED_FILES=
class tst_QEasingCurve : public QObject { class tst_QEasingCurve : public QObject
{
Q_OBJECT Q_OBJECT
public:
tst_QEasingCurve();
virtual ~tst_QEasingCurve();
public Q_SLOTS:
void init();
void cleanup();
private slots: private slots:
void type(); void type();
void propertyDefaults(); void propertyDefaults();
@ -67,27 +58,8 @@ private slots:
void operators(); void operators();
void properties(); void properties();
void metaTypes(); void metaTypes();
protected:
}; };
tst_QEasingCurve::tst_QEasingCurve()
{
}
tst_QEasingCurve::~tst_QEasingCurve()
{
}
void tst_QEasingCurve::init()
{
}
void tst_QEasingCurve::cleanup()
{
}
#include <qdebug.h>
void tst_QEasingCurve::type() void tst_QEasingCurve::type()
{ {
{ {

View File

@ -50,11 +50,6 @@
class tst_QHash : public QObject class tst_QHash : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QHash();
virtual ~tst_QHash() {}
private slots: private slots:
void insert1(); void insert1();
void erase(); void erase();
@ -92,9 +87,6 @@ struct Foo {
int data[8]; int data[8];
}; };
tst_QHash::tst_QHash()
{}
int Foo::count = 0; int Foo::count = 0;
//copied from tst_QMap.cpp //copied from tst_QMap.cpp

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qline.h> #include <qline.h>
#include <math.h> #include <math.h>
@ -54,10 +53,6 @@
class tst_QLine : public QObject class tst_QLine : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QLine();
private slots: private slots:
void testIntersection(); void testIntersection();
void testIntersection_data(); void testIntersection_data();
@ -90,11 +85,6 @@ private slots:
const qreal epsilon = sizeof(qreal) == sizeof(double) ? 1e-8 : 1e-4; const qreal epsilon = sizeof(qreal) == sizeof(double) ? 1e-8 : 1e-4;
tst_QLine::tst_QLine()
{
}
void tst_QLine::testSet() void tst_QLine::testSet()
{ {
{ {

View File

@ -44,7 +44,6 @@
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <QDebug> #include <QDebug>
#include <qmap.h> #include <qmap.h>
//TESTED_CLASS= //TESTED_CLASS=
@ -53,10 +52,6 @@
class tst_QMap : public QObject class tst_QMap : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QMap();
public slots: public slots:
void init(); void init();
private slots: private slots:
@ -84,10 +79,6 @@ private slots:
void const_shared_null(); void const_shared_null();
}; };
tst_QMap::tst_QMap()
{
}
typedef QMap<QString, QString> StringMap; typedef QMap<QString, QString> StringMap;
class MyClass class MyClass

View File

@ -50,15 +50,6 @@ Q_DECLARE_METATYPE(QMargins)
class tst_QMargins : public QObject class tst_QMargins : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QMargins();
virtual ~tst_QMargins();
public slots:
void init();
void cleanup();
private slots: private slots:
void getSetCheck(); void getSetCheck();
void dataStreamCheck(); 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) QTEST_APPLESS_MAIN(tst_QMargins)
#include "tst_qmargins.moc" #include "tst_qmargins.moc"

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qcoreapplication.h> #include <qcoreapplication.h>
@ -52,11 +51,6 @@
class tst_QPoint : public QObject class tst_QPoint : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QPoint();
virtual ~tst_QPoint();
private slots: private slots:
void getSetCheck(); void getSetCheck();
void division(); void division();
@ -64,16 +58,6 @@ private slots:
void manhattanLength(); void manhattanLength();
}; };
tst_QPoint::tst_QPoint()
{
}
tst_QPoint::~tst_QPoint()
{
}
void tst_QPoint::manhattanLength() void tst_QPoint::manhattanLength()
{ {
{ {

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qrect.h> #include <qrect.h>
#include <limits.h> #include <limits.h>
@ -72,17 +71,10 @@ public:
NegXQPoint, NegYQPoint, RandomQPoint NegXQPoint, NegYQPoint, RandomQPoint
}; };
tst_QRect();
virtual ~tst_QRect();
static QRect getQRectCase( QRectCases c ); static QRect getQRectCase( QRectCases c );
static int getIntCase( IntCases i ); static int getIntCase( IntCases i );
static QPoint getQPointCase( QPointCases p ); static QPoint getQPointCase( QPointCases p );
public slots:
void init();
void cleanup();
private slots: private slots:
void isNull_data(); void isNull_data();
void isNull(); void isNull();
@ -215,23 +207,6 @@ private slots:
#define LARGE 1000000000 #define LARGE 1000000000
static bool isLarge(int x) { return x > LARGE || x < -LARGE; } 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 ) QRect tst_QRect::getQRectCase( QRectCases c )
{ {
// Should return the best variety of possible QRects, if a // Should return the best variety of possible QRects, if a

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qregexp.h> #include <qregexp.h>
@ -51,15 +50,6 @@ const int N = 1;
class tst_QRegExp : public QObject class tst_QRegExp : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QRegExp();
virtual ~tst_QRegExp();
public slots:
void init();
void cleanup();
private slots: private slots:
void getSetCheck(); void getSetCheck();
void indexIn_data(); void indexIn_data();
@ -125,14 +115,6 @@ void tst_QRegExp::getSetCheck()
extern const char email[]; extern const char email[];
tst_QRegExp::tst_QRegExp()
{
}
tst_QRegExp::~tst_QRegExp()
{
}
void tst_QRegExp::lastIndexIn_data() void tst_QRegExp::lastIndexIn_data()
{ {
indexIn_data(); indexIn_data();
@ -518,15 +500,6 @@ void tst_QRegExp::indexIn_addMoreRows(const QByteArray &stri)
<< QStringList(); << QStringList();
} }
void tst_QRegExp::init()
{
}
void tst_QRegExp::cleanup()
{
}
/* /*
void tst_QRegExp::isEmpty() void tst_QRegExp::isEmpty()
{ {

View File

@ -46,13 +46,6 @@
class tst_QRingBuffer : public QObject class tst_QRingBuffer : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QRingBuffer();
virtual ~tst_QRingBuffer();
public slots:
void initTestCase();
void cleanupTestCase();
private slots: private slots:
void readPointerAtPositionWriteRead(); void readPointerAtPositionWriteRead();
void readPointerAtPositionEmptyRead(); void readPointerAtPositionEmptyRead();
@ -63,22 +56,6 @@ private slots:
void sizeWhenReserved(); void sizeWhenReserved();
}; };
tst_QRingBuffer::tst_QRingBuffer()
{
}
tst_QRingBuffer::~tst_QRingBuffer()
{
}
void tst_QRingBuffer::initTestCase()
{
}
void tst_QRingBuffer::cleanupTestCase()
{
}
void tst_QRingBuffer::sizeWhenReserved() void tst_QRingBuffer::sizeWhenReserved()
{ {
QRingBuffer ringBuffer; QRingBuffer ringBuffer;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qsize.h> #include <qsize.h>
@ -51,15 +50,6 @@ Q_DECLARE_METATYPE(QSize)
class tst_QSize : public QObject class tst_QSize : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QSize();
virtual ~tst_QSize();
public slots:
void init();
void cleanup();
private slots: private slots:
void getSetCheck(); void getSetCheck();
void scale(); void scale();
@ -112,23 +102,6 @@ void tst_QSize::getSetCheck()
QCOMPARE(1.1, obj2.height()); 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() void tst_QSize::scale()
{ {
QSize t1( 10, 12 ); QSize t1( 10, 12 );

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qsize.h> #include <qsize.h>
@ -48,17 +47,9 @@ Q_DECLARE_METATYPE(QSizeF)
//TESTED_CLASS= //TESTED_CLASS=
//TESTED_FILES=corelib/tools/qsize.h corelib/tools/qsize.cpp //TESTED_FILES=corelib/tools/qsize.h corelib/tools/qsize.cpp
class tst_QSizeF : public QObject { class tst_QSizeF : public QObject
{
Q_OBJECT Q_OBJECT
public:
tst_QSizeF();
virtual ~tst_QSizeF();
public slots:
void init();
void cleanup();
private slots: private slots:
void scale(); void scale();
@ -72,18 +63,6 @@ private slots:
void transpose(); void transpose();
}; };
tst_QSizeF::tst_QSizeF() {
}
tst_QSizeF::~tst_QSizeF() {
}
void tst_QSizeF::init() {
}
void tst_QSizeF::cleanup() {
}
void tst_QSizeF::scale() { void tst_QSizeF::scale() {
QSizeF t1(10.4, 12.8); QSizeF t1(10.4, 12.8);
t1.scale(60.6, 60.6, Qt::IgnoreAspectRatio); t1.scale(60.6, 60.6, Qt::IgnoreAspectRatio);

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qregexp.h> #include <qregexp.h>
#include <qtextcodec.h> #include <qtextcodec.h>
@ -67,11 +66,7 @@ class tst_QString : public QObject
public: public:
tst_QString(); tst_QString();
virtual ~tst_QString();
public slots: public slots:
void init();
void cleanup(); void cleanup();
private slots: private slots:
#if !defined(Q_CC_HPACC) && !defined(QT_NO_STL) #if !defined(Q_CC_HPACC) && !defined(QT_NO_STL)
@ -319,14 +314,6 @@ tst_QString::tst_QString()
QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO 8859-1")); QTextCodec::setCodecForLocale(QTextCodec::codecForName("ISO 8859-1"));
} }
tst_QString::~tst_QString()
{
}
void tst_QString::init()
{
}
void tst_QString::cleanup() void tst_QString::cleanup()
{ {
QLocale::setDefault(QString("C")); QLocale::setDefault(QString("C"));

View File

@ -39,29 +39,16 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qregexp.h> #include <qregexp.h>
#include <qstringlist.h> #include <qstringlist.h>
//TESTED_CLASS= //TESTED_CLASS=
//TESTED_FILES= //TESTED_FILES=
class tst_QStringList : public QObject class tst_QStringList : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QStringList();
virtual ~tst_QStringList();
public slots:
void init();
void cleanup();
private slots: private slots:
void filter(); void filter();
void replaceInStrings(); void replaceInStrings();
@ -86,22 +73,6 @@ private slots:
extern const char email[]; 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() void tst_QStringList::indexOf_regExp()
{ {
QStringList list; QStringList list;

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qstringmatcher.h> #include <qstringmatcher.h>
@ -48,7 +47,6 @@ class tst_QStringMatcher : public QObject
Q_OBJECT Q_OBJECT
private slots: private slots:
void qstringmatcher_data();
void qstringmatcher(); void qstringmatcher();
void caseSensitivity(); void caseSensitivity();
void indexIn_data(); void indexIn_data();
@ -64,10 +62,6 @@ class SubQStringMatcher : public QStringMatcher
public: public:
}; };
void tst_QStringMatcher::qstringmatcher_data()
{
}
void tst_QStringMatcher::qstringmatcher() void tst_QStringMatcher::qstringmatcher()
{ {
SubQStringMatcher matcher; SubQStringMatcher matcher;

View File

@ -51,18 +51,10 @@ Q_DECLARE_METATYPE(qlonglong)
//TESTED_CLASS= //TESTED_CLASS=
//TESTED_FILES= //TESTED_FILES=
class tst_QStringRef : public QObject class tst_QStringRef : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QStringRef();
virtual ~tst_QStringRef();
public slots: public slots:
void init();
void cleanup(); void cleanup();
private slots: private slots:
void endsWith(); void endsWith();
@ -167,18 +159,6 @@ static inline double nan()
# define NAN (::nan()) # define NAN (::nan())
#endif #endif
tst_QStringRef::tst_QStringRef()
{
}
tst_QStringRef::~tst_QStringRef()
{
}
void tst_QStringRef::init()
{
}
void tst_QStringRef::cleanup() void tst_QStringRef::cleanup()
{ {
QLocale::setDefault(QString(QLatin1Char('C'))); QLocale::setDefault(QString(QLatin1Char('C')));

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qtextboundaryfinder.h> #include <qtextboundaryfinder.h>
@ -52,15 +51,8 @@
class tst_QTextBoundaryFinder : public QObject class tst_QTextBoundaryFinder : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QTextBoundaryFinder();
virtual ~tst_QTextBoundaryFinder();
public slots: public slots:
void init(); void init();
void cleanup();
private slots: private slots:
void graphemeBoundaries(); void graphemeBoundaries();
void wordBoundaries(); void wordBoundaries();
@ -74,14 +66,6 @@ private slots:
void toPreviousBoundary(); void toPreviousBoundary();
}; };
tst_QTextBoundaryFinder::tst_QTextBoundaryFinder()
{
}
tst_QTextBoundaryFinder::~tst_QTextBoundaryFinder()
{
}
void tst_QTextBoundaryFinder::init() void tst_QTextBoundaryFinder::init()
{ {
#ifndef Q_OS_IRIX #ifndef Q_OS_IRIX
@ -89,10 +73,6 @@ void tst_QTextBoundaryFinder::init()
#endif #endif
} }
void tst_QTextBoundaryFinder::cleanup()
{
}
void tst_QTextBoundaryFinder::graphemeBoundaries() void tst_QTextBoundaryFinder::graphemeBoundaries()
{ {
QFile file("data/GraphemeBreakTest.txt"); QFile file("data/GraphemeBreakTest.txt");

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include "qdatetime.h" #include "qdatetime.h"
@ -49,17 +48,6 @@
class tst_QTime : public QObject class tst_QTime : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QTime();
virtual ~tst_QTime();
public slots:
void initTestCase();
void cleanupTestCase();
void init();
void cleanup();
private slots: private slots:
void toStringLocale(); void toStringLocale();
void toString(); void toString();
@ -94,37 +82,6 @@ private slots:
Q_DECLARE_METATYPE(QTime) 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() void tst_QTime::addSecs_data()
{ {
QTest::addColumn<QTime>("t1"); QTest::addColumn<QTime>("t1");

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qtimeline.h> #include <qtimeline.h>
@ -47,17 +46,9 @@
//TESTED_CLASS= //TESTED_CLASS=
//TESTED_FILES= //TESTED_FILES=
class tst_QTimeLine : public QObject { class tst_QTimeLine : public QObject
{
Q_OBJECT Q_OBJECT
public:
tst_QTimeLine();
virtual ~tst_QTimeLine();
public Q_SLOTS:
void init();
void cleanup();
private slots: private slots:
void range(); void range();
void currentTime(); void currentTime();
@ -91,23 +82,6 @@ protected:
QTimeLine * view; QTimeLine * view;
}; };
tst_QTimeLine::tst_QTimeLine()
{
}
tst_QTimeLine::~tst_QTimeLine()
{
}
void tst_QTimeLine::init()
{
}
void tst_QTimeLine::cleanup()
{
}
#include <qdebug.h>
void tst_QTimeLine::range() void tst_QTimeLine::range()
{ {
#ifdef Q_OS_WINCE //On WinCE timer resolution is bad - using longer times instead #ifdef Q_OS_WINCE //On WinCE timer resolution is bad - using longer times instead

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qvarlengtharray.h> #include <qvarlengtharray.h>
#include <qvariant.h> #include <qvariant.h>
@ -52,11 +51,6 @@ const int N = 1;
class tst_QVarLengthArray : public QObject class tst_QVarLengthArray : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QVarLengthArray() {}
virtual ~tst_QVarLengthArray() {}
private slots: private slots:
void append(); void append();
void removeLast(); void removeLast();

View File

@ -39,7 +39,6 @@
** **
****************************************************************************/ ****************************************************************************/
#include <QtTest/QtTest> #include <QtTest/QtTest>
#include <qvector.h> #include <qvector.h>
@ -49,11 +48,6 @@
class tst_QVector : public QObject class tst_QVector : public QObject
{ {
Q_OBJECT Q_OBJECT
public:
tst_QVector() {}
virtual ~tst_QVector() {}
private slots: private slots:
void constructors() const; void constructors() const;
void append() const; void append() const;