summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/io
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/corelib/io')
-rw-r--r--tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp9
-rw-r--r--tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp21
-rw-r--r--tests/auto/corelib/io/qdir/tst_qdir.cpp13
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp23
-rw-r--r--tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp13
-rw-r--r--tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp25
-rw-r--r--tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp12
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp30
-rw-r--r--tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp22
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp26
10 files changed, 9 insertions, 185 deletions
diff --git a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
index 0306323b5a..832d7ee063 100644
--- a/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
+++ b/tests/auto/corelib/io/qbuffer/tst_qbuffer.cpp
@@ -39,10 +39,8 @@
**
****************************************************************************/
-
#include <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');
diff --git a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
index 2745d985a4..dde965b13a 100644
--- a/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
+++ b/tests/auto/corelib/io/qdatastream/tst_qdatastream.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <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("_");
diff --git a/tests/auto/corelib/io/qdir/tst_qdir.cpp b/tests/auto/corelib/io/qdir/tst_qdir.cpp
index 07d2afd29c..b66a7dac6a 100644
--- a/tests/auto/corelib/io/qdir/tst_qdir.cpp
+++ b/tests/auto/corelib/io/qdir/tst_qdir.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <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");
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index 0501ff5a44..a398140061 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <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",
diff --git a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
index 5a43bca2c4..4fa32b0ef6 100644
--- a/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
+++ b/tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <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");
diff --git a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
index b087c8fda0..84431b2f9e 100644
--- a/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <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.
diff --git a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
index 5c2bb0bb69..b7169dc57b 100644
--- a/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
+++ b/tests/auto/corelib/io/qstandardpaths/tst_qstandardpaths.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <QtTest/QtTest>
#include <qstandardpaths.h>
#include <qdebug.h>
@@ -57,14 +56,9 @@
//TESTED_CLASS=QStandardPaths
//TESTED_FILES=qstandardpaths.cpp
-class tst_qstandardpaths : public QObject {
- Q_OBJECT
-
-public:
- tst_qstandardpaths() {
- }
- virtual ~tst_qstandardpaths() {
- }
+class tst_qstandardpaths : public QObject
+{
+ Q_OBJECT
private slots:
void testDefaultLocations();
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index f2d2b0a1c8..b2b0f57240 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <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");
diff --git a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
index 5ab71de9d1..4a814799da 100644
--- a/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
+++ b/tests/auto/corelib/io/qtextstream/tst_qtextstream.cpp
@@ -39,11 +39,6 @@
**
****************************************************************************/
-
-/*-*-encoding:latin1-*-*/
-//#include <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();
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index caa626d97a..8fcc076905 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -39,7 +39,6 @@
**
****************************************************************************/
-
#include <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;