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:
parent
9ceb3b4f6f
commit
e8f7fccf22
@ -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;
|
||||
|
@ -53,42 +53,24 @@ Q_DECLARE_METATYPE(QAbstractAnimation::State)
|
||||
class tst_QAnimationGroup : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tst_QAnimationGroup();
|
||||
virtual ~tst_QAnimationGroup();
|
||||
|
||||
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>("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;
|
||||
|
@ -51,10 +51,6 @@ Q_DECLARE_METATYPE(QAbstractAnimation::State)
|
||||
class tst_QParallelAnimationGroup : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tst_QParallelAnimationGroup();
|
||||
virtual ~tst_QParallelAnimationGroup();
|
||||
|
||||
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>("QAbstractAnimation::State");
|
||||
|
@ -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>("QAbstractAnimation::State");
|
||||
|
@ -91,13 +91,8 @@ public:
|
||||
class tst_QPropertyAnimation : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tst_QPropertyAnimation();
|
||||
virtual ~tst_QPropertyAnimation();
|
||||
|
||||
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>("QAbstractAnimation::State");
|
||||
qRegisterMetaType<QAbstractAnimation::DeletionPolicy>("QAbstractAnimation::DeletionPolicy");
|
||||
}
|
||||
|
||||
void tst_QPropertyAnimation::cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
class AnimationObject : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
@ -52,13 +52,8 @@ Q_DECLARE_METATYPE(QAbstractAnimation*)
|
||||
class tst_QSequentialAnimationGroup : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tst_QSequentialAnimationGroup();
|
||||
virtual ~tst_QSequentialAnimationGroup();
|
||||
|
||||
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>("QAbstractAnimation::State");
|
||||
qRegisterMetaType<QAbstractAnimation*>("QAbstractAnimation*");
|
||||
}
|
||||
|
||||
void tst_QSequentialAnimationGroup::cleanup()
|
||||
{
|
||||
}
|
||||
|
||||
void tst_QSequentialAnimationGroup::construction()
|
||||
{
|
||||
QSequentialAnimationGroup animationgroup;
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <qdebug.h>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
@ -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"
|
||||
|
@ -39,10 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
|
||||
#include <QBuffer>
|
||||
#include <QByteArray>
|
||||
|
||||
@ -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');
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtGui/QtGui>
|
||||
|
||||
@ -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("_");
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
@ -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");
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qplatformdefs.h>
|
||||
|
||||
@ -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",
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qfile.h>
|
||||
@ -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");
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtCore/QtCore>
|
||||
#include <QtNetwork/QtNetwork>
|
||||
#include <QtTest/QtTest>
|
||||
@ -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.
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qstandardpaths.h>
|
||||
#include <qdebug.h>
|
||||
@ -57,15 +56,10 @@
|
||||
//TESTED_CLASS=QStandardPaths
|
||||
//TESTED_FILES=qstandardpaths.cpp
|
||||
|
||||
class tst_qstandardpaths : public QObject {
|
||||
class tst_qstandardpaths : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_qstandardpaths() {
|
||||
}
|
||||
virtual ~tst_qstandardpaths() {
|
||||
}
|
||||
|
||||
private slots:
|
||||
void testDefaultLocations();
|
||||
void testCustomLocations();
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qstring.h>
|
||||
@ -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<QString>("constructorTemplate");
|
||||
|
@ -39,11 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
/*-*-encoding:latin1-*-*/
|
||||
//#include <iostream>
|
||||
//using namespace std;
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#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();
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtCore/QtCore>
|
||||
|
||||
@ -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<QVector<QString> > 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>("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
|
||||
*/
|
||||
|
@ -39,10 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
|
||||
#include <qabstracteventdispatcher.h>
|
||||
#include <qcoreapplication.h>
|
||||
#include <qcoreevent.h>
|
||||
@ -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()));
|
||||
|
@ -65,10 +65,6 @@ class tst_QItemModel : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QItemModel() {};
|
||||
virtual ~tst_QItemModel() {};
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qobject.h>
|
||||
@ -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<QVariant> 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();
|
||||
|
@ -46,10 +46,6 @@
|
||||
class tst_QMetaObjectBuilder : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tst_QMetaObjectBuilder() {}
|
||||
~tst_QMetaObjectBuilder() {}
|
||||
|
||||
private slots:
|
||||
void mocVersionCheck();
|
||||
void create();
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QMimeData>
|
||||
@ -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"
|
||||
|
@ -39,17 +39,14 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
|
||||
#include <qpointer.h>
|
||||
#include <qtimer.h>
|
||||
#include <qregexp.h>
|
||||
#include <qmetaobject.h>
|
||||
#include <qvariant.h>
|
||||
|
||||
#include <QTcpServer>
|
||||
#include <QTcpSocket>
|
||||
#include <QThread>
|
||||
@ -62,7 +59,6 @@
|
||||
#include <private/qobject_p.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <math.h>
|
||||
|
||||
//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
|
||||
|
@ -39,62 +39,21 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
|
||||
#include <qsignalmapper.h>
|
||||
#include <qspinbox.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//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
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QTest>
|
||||
#include <QtTest/QSignalSpy>
|
||||
#include <QtTest/QTestEventLoop>
|
||||
@ -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
|
||||
|
@ -39,10 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
|
||||
#include <qtimer.h>
|
||||
#include <qthread.h>
|
||||
|
||||
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QWidget>
|
||||
#include <qtranslator.h>
|
||||
@ -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)
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qvariant.h>
|
||||
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <private/qwineventnotifier_p.h>
|
||||
#include <qtimer.h>
|
||||
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qdir.h>
|
||||
#include <qpluginloader.h>
|
||||
@ -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()
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QAtomicInt>
|
||||
@ -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.");
|
||||
|
@ -39,11 +39,9 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qatomic.h>
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
//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() {}
|
||||
|
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@ -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
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@ -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
|
||||
|
@ -39,11 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qcoreapplication.h>
|
||||
|
||||
|
||||
#include <qreadwritelock.h>
|
||||
#include <qmutex.h>
|
||||
#include <qthread.h>
|
||||
@ -73,10 +70,6 @@
|
||||
class tst_QReadWriteLock : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tst_QReadWriteLock();
|
||||
virtual ~tst_QReadWriteLock();
|
||||
|
||||
|
||||
/*
|
||||
Singlethreaded tests
|
||||
@ -92,11 +85,11 @@ void writeLockLoop();
|
||||
void readWriteLockUnlockLoop();
|
||||
void tryReadLock();
|
||||
void tryWriteLock();
|
||||
|
||||
/*
|
||||
Multithreaded tests
|
||||
*/
|
||||
private slots:
|
||||
|
||||
void readLockBlockRelease();
|
||||
void writeLockBlockRelease();
|
||||
void multipleReadersBlockRelease();
|
||||
@ -118,16 +111,6 @@ void uncontendedLocks();
|
||||
void recursiveWriteLock();
|
||||
};
|
||||
|
||||
tst_QReadWriteLock::tst_QReadWriteLock()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
tst_QReadWriteLock::~tst_QReadWriteLock()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void tst_QReadWriteLock::constructDestruct()
|
||||
{
|
||||
{
|
||||
|
@ -39,10 +39,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
#include <qthread.h>
|
||||
#include <qsemaphore.h>
|
||||
@ -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:
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
@ -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<Pointer *> pointers;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
@ -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:
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <QCoreApplication>
|
||||
@ -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
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <iostream>
|
||||
@ -60,15 +59,6 @@ using namespace std;
|
||||
class tst_QAlgorithms : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QAlgorithms();
|
||||
~tst_QAlgorithms();
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
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:
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <QtCore/QBuffer>
|
||||
#include <QtCore/QDataStream>
|
||||
@ -72,15 +71,6 @@ 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();
|
||||
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
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qbytearray.h>
|
||||
@ -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>("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<QByteArray>("ba");
|
||||
|
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qchar.h>
|
||||
#include <qfile.h>
|
||||
@ -49,23 +48,13 @@
|
||||
#include <qcoreapplication.h>
|
||||
#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,18 +93,6 @@ 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)
|
||||
|
@ -50,9 +50,6 @@
|
||||
class tst_QContiguousCache : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
tst_QContiguousCache() {}
|
||||
virtual ~tst_QContiguousCache() {}
|
||||
private slots:
|
||||
void empty();
|
||||
void swap();
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qdatetime.h>
|
||||
#include <qlocale.h>
|
||||
@ -50,14 +49,6 @@
|
||||
class tst_QDate : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QDate();
|
||||
virtual ~tst_QDate();
|
||||
|
||||
public slots:
|
||||
void init();
|
||||
void cleanup();
|
||||
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<int>("year");
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#ifndef Q_OS_WINCE
|
||||
#include <time.h>
|
||||
@ -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,11 +159,6 @@ tst_QDateTime::tst_QDateTime()
|
||||
europeanTimeZone = (x1 == 631148400 && x2 == 644191200);
|
||||
}
|
||||
|
||||
tst_QDateTime::~tst_QDateTime()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void tst_QDateTime::init()
|
||||
{
|
||||
#if defined(Q_OS_WINCE)
|
||||
@ -174,11 +166,6 @@ void tst_QDateTime::init()
|
||||
#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 )
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qeasingcurve.h>
|
||||
@ -47,17 +46,9 @@
|
||||
//TESTED_CLASS=
|
||||
//TESTED_FILES=
|
||||
|
||||
class tst_QEasingCurve : public QObject {
|
||||
class tst_QEasingCurve : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QEasingCurve();
|
||||
virtual ~tst_QEasingCurve();
|
||||
|
||||
public Q_SLOTS:
|
||||
void init();
|
||||
void cleanup();
|
||||
|
||||
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 <qdebug.h>
|
||||
|
||||
void tst_QEasingCurve::type()
|
||||
{
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qline.h>
|
||||
#include <math.h>
|
||||
@ -54,10 +53,6 @@
|
||||
class tst_QLine : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QLine();
|
||||
|
||||
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()
|
||||
{
|
||||
{
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include <QtTest/QtTest>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
#include <qmap.h>
|
||||
|
||||
//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<QString, QString> StringMap;
|
||||
|
||||
class MyClass
|
||||
|
@ -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"
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qcoreapplication.h>
|
||||
@ -52,11 +51,6 @@
|
||||
class tst_QPoint : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
tst_QPoint();
|
||||
virtual ~tst_QPoint();
|
||||
|
||||
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()
|
||||
{
|
||||
{
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qrect.h>
|
||||
#include <limits.h>
|
||||
@ -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
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qregexp.h>
|
||||
|
||||
@ -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()
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qsize.h>
|
||||
|
||||
@ -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 );
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qsize.h>
|
||||
|
||||
@ -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);
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qregexp.h>
|
||||
#include <qtextcodec.h>
|
||||
@ -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"));
|
||||
|
@ -39,29 +39,16 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qregexp.h>
|
||||
#include <qstringlist.h>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//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;
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qstringmatcher.h>
|
||||
|
||||
@ -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;
|
||||
|
@ -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')));
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qtextboundaryfinder.h>
|
||||
@ -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");
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#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<QTime>("t1");
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
#include <qtimeline.h>
|
||||
@ -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 <qdebug.h>
|
||||
|
||||
void tst_QTimeLine::range()
|
||||
{
|
||||
#ifdef Q_OS_WINCE //On WinCE timer resolution is bad - using longer times instead
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qvarlengtharray.h>
|
||||
#include <qvariant.h>
|
||||
@ -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();
|
||||
|
@ -39,7 +39,6 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
#include <QtTest/QtTest>
|
||||
#include <qvector.h>
|
||||
|
||||
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user