summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2011-10-18 12:50:36 +1000
committerQt by Nokia <qt-info@nokia.com>2011-10-19 07:24:13 +0200
commit8f02339e76b9b21df028e29735475313760f82c6 (patch)
treeda655389e77d590196152b3ec230bc67348da880 /tests
parentae1810658b75dd0eb0247b0e951ce315c8ce4c86 (diff)
Remove DEPENDS_ON from qtestlib API.
The DEPENDS_ON macro didn't do anything and has misled many users to think that they can write test functions that depend on other test functions. Task-number: QTBUG-21851 Change-Id: Ibe65b2d5d88bb81b6a0ebbe0b220f7d409a1446c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp15
-rw-r--r--tests/auto/corelib/io/qfile/tst_qfile.cpp4
-rw-r--r--tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp4
-rw-r--r--tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp8
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp28
-rw-r--r--tests/auto/corelib/tools/qrect/tst_qrect.cpp12
-rw-r--r--tests/auto/corelib/tools/qtime/tst_qtime.cpp18
-rw-r--r--tests/auto/gui/painting/qcolor/tst_qcolor.cpp139
-rw-r--r--tests/auto/network/access/qftp/tst_qftp.cpp12
-rw-r--r--tests/auto/qabstractbutton/tst_qabstractbutton.cpp69
-rw-r--r--tests/auto/qcheckbox/tst_qcheckbox.cpp60
-rw-r--r--tests/auto/qdockwidget/tst_qdockwidget.cpp28
-rw-r--r--tests/auto/qlabel/tst_qlabel.cpp26
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp84
-rw-r--r--tests/auto/qmainwindow/tst_qmainwindow.cpp37
-rw-r--r--tests/auto/qmenu/tst_qmenu.cpp1
-rw-r--r--tests/auto/qpushbutton/tst_qpushbutton.cpp40
-rw-r--r--tests/auto/qsplitter/tst_qsplitter.cpp6
-rw-r--r--tests/auto/qtoolbar/tst_qtoolbar.cpp59
-rw-r--r--tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp6
20 files changed, 3 insertions, 653 deletions
diff --git a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp b/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
index 56c677b476..6f58bf56a2 100644
--- a/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
+++ b/tests/auto/corelib/concurrent/qthreadpool/tst_qthreadpool.cpp
@@ -77,11 +77,9 @@ private slots:
#ifndef QT_NO_EXCEPTIONS
void exceptions();
#endif
- void maxThreadCount();
void setMaxThreadCount_data();
void setMaxThreadCount();
void setMaxThreadCountStartsAndStopsThreads();
- void activeThreadCount();
void reserveThread_data();
void reserveThread();
void releaseThread_data();
@@ -368,11 +366,6 @@ void tst_QThreadPool::exceptions()
}
#endif
-void tst_QThreadPool::maxThreadCount()
-{
- DEPENDS_ON("setMaxThreadCount()");
-}
-
void tst_QThreadPool::setMaxThreadCount_data()
{
QTest::addColumn<int>("limit");
@@ -490,14 +483,6 @@ void tst_QThreadPool::setMaxThreadCountStartsAndStopsThreads()
// delete task;
}
-
-void tst_QThreadPool::activeThreadCount()
-{
- DEPENDS_ON("tryReserveThread()");
- DEPENDS_ON("reserveThread()");
- DEPENDS_ON("releaseThread()");
-}
-
void tst_QThreadPool::reserveThread_data()
{
setMaxThreadCount_data();
diff --git a/tests/auto/corelib/io/qfile/tst_qfile.cpp b/tests/auto/corelib/io/qfile/tst_qfile.cpp
index d4f99c5d74..59c90f64ec 100644
--- a/tests/auto/corelib/io/qfile/tst_qfile.cpp
+++ b/tests/auto/corelib/io/qfile/tst_qfile.cpp
@@ -651,8 +651,6 @@ void tst_QFile::seek()
void tst_QFile::setSize()
{
- DEPENDS_ON( "size" );
-
if ( QFile::exists( "createme.txt" ) )
QFile::remove( "createme.txt" );
QVERIFY( !QFile::exists( "createme.txt" ) );
@@ -1120,8 +1118,6 @@ void tst_QFile::permissions()
void tst_QFile::setPermissions()
{
- DEPENDS_ON( "permissions" ); //if that doesn't work...
-
if ( QFile::exists( "createme.txt" ) )
QFile::remove( "createme.txt" );
QVERIFY( !QFile::exists( "createme.txt" ) );
diff --git a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
index 83c67d695c..006266ca9d 100644
--- a/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
+++ b/tests/auto/corelib/kernel/qeventloop/tst_qeventloop.cpp
@@ -197,7 +197,6 @@ private slots:
void throwInExec();
#endif
void reexec();
- void exit();
void execAfterExit();
void wakeUp();
void quit();
@@ -398,9 +397,6 @@ void tst_QEventLoop::reexec()
QCOMPARE(loop.exec(), 0);
}
-void tst_QEventLoop::exit()
-{ DEPENDS_ON(exec()); }
-
void tst_QEventLoop::execAfterExit()
{
QEventLoop loop;
diff --git a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
index a2c6bf16b7..7c410db148 100644
--- a/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/corelib/thread/qsemaphore/tst_qsemaphore.cpp
@@ -64,8 +64,6 @@ private slots:
void tryAcquireWithTimeout_data();
void tryAcquireWithTimeout();
void tryAcquireWithTimeoutStarvation();
- void release();
- void available();
void producerConsumer();
};
@@ -363,12 +361,6 @@ void tst_QSemaphore::tryAcquireWithTimeoutStarvation()
QVERIFY(consumer.wait());
}
-void tst_QSemaphore::release()
-{ DEPENDS_ON("acquire"); }
-
-void tst_QSemaphore::available()
-{ DEPENDS_ON("acquire"); }
-
const char alphabet[] = "ACGTH";
const int AlphabetSize = sizeof(alphabet) - 1;
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index b2d09f2baf..f832995e75 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -79,20 +79,15 @@ private slots:
void isFinished();
void isRunning();
void setPriority();
- void priority();
void setStackSize();
- void stackSize();
void exit();
void start();
void terminate();
void quit();
- void wait();
void started();
void finished();
void terminated();
- void run();
void exec();
- void setTerminationEnabled();
void sleep();
void msleep();
void usleep();
@@ -415,9 +410,6 @@ void tst_QThread::setPriority()
QCOMPARE(thread.priority(), QThread::InheritPriority);
}
-void tst_QThread::priority()
-{ DEPENDS_ON("setPriority"); }
-
void tst_QThread::setStackSize()
{
Simple_Thread thread;
@@ -428,11 +420,6 @@ void tst_QThread::setStackSize()
QCOMPARE(thread.stackSize(), 0u);
}
-void tst_QThread::stackSize()
-{
- DEPENDS_ON("setStackSize");
-}
-
void tst_QThread::exit()
{
Exit_Thread thread;
@@ -537,12 +524,6 @@ void tst_QThread::quit()
QCOMPARE(thread2.result, 0);
}
-void tst_QThread::wait()
-{
- DEPENDS_ON("isRunning");
- DEPENDS_ON("isFinished");
-}
-
void tst_QThread::started()
{
SignalRecorder recorder;
@@ -579,14 +560,8 @@ void tst_QThread::terminated()
QVERIFY(recorder.wasActivated());
}
-void tst_QThread::run()
-{ DEPENDS_ON("wait()"); }
-
void tst_QThread::exec()
{
- DEPENDS_ON("exit()");
- DEPENDS_ON("quit()");
-
class MultipleExecThread : public QThread
{
public:
@@ -621,9 +596,6 @@ void tst_QThread::exec()
QCOMPARE(thread.res2, 2);
}
-void tst_QThread::setTerminationEnabled()
-{ DEPENDS_ON("terminate"); }
-
void tst_QThread::sleep()
{
Sleep_Thread thread;
diff --git a/tests/auto/corelib/tools/qrect/tst_qrect.cpp b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
index c84e175857..fe3be33255 100644
--- a/tests/auto/corelib/tools/qrect/tst_qrect.cpp
+++ b/tests/auto/corelib/tools/qrect/tst_qrect.cpp
@@ -126,8 +126,6 @@ private slots:
void setRight();
void setBottom_data();
void setBottom();
- void setX();
- void setY();
void newSetTopLeft_data();
void newSetTopLeft();
void newSetBottomRight_data();
@@ -1503,16 +1501,6 @@ void tst_QRect::setBottom()
QCOMPARE( r, nr );
}
-void tst_QRect::setX()
-{
- DEPENDS_ON( "setLeft" );
-}
-
-void tst_QRect::setY()
-{
- DEPENDS_ON( "setTop" );
-}
-
void tst_QRect::newSetTopLeft_data()
{
QTest::addColumn<QRect>("r");
diff --git a/tests/auto/corelib/tools/qtime/tst_qtime.cpp b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
index 746f36d6d9..e528ead7ca 100644
--- a/tests/auto/corelib/tools/qtime/tst_qtime.cpp
+++ b/tests/auto/corelib/tools/qtime/tst_qtime.cpp
@@ -69,9 +69,6 @@ private slots:
void secsTo();
void setHMS_data();
void setHMS();
- void msec();
- void second();
- void minute();
void hour_data();
void hour();
void isValid();
@@ -307,21 +304,6 @@ void tst_QTime::hour()
QCOMPARE( t1.msec(), msec );
}
-void tst_QTime::minute()
-{
- DEPENDS_ON( "hour" );
-}
-
-void tst_QTime::second()
-{
- DEPENDS_ON( "hour" );
-}
-
-void tst_QTime::msec()
-{
- DEPENDS_ON( "hour" );
-}
-
void tst_QTime::setHMS_data()
{
QTest::addColumn<int>("hour");
diff --git a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
index 72c736209b..7db941bb20 100644
--- a/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
+++ b/tests/auto/gui/painting/qcolor/tst_qcolor.cpp
@@ -75,45 +75,14 @@ private slots:
void globalColors_data();
void globalColors();
- void alpha();
- void setAlpha();
-
- void red();
- void green();
- void blue();
-
void setRed();
void setGreen();
void setBlue();
- void getRgb();
void setRgb();
-
- void rgba();
void setRgba();
-
- void rgb();
-
- void hue();
- void saturation();
- void value();
-
- void getHsv();
void setHsv();
-
- void cyan();
- void magenta();
- void yellow();
- void black();
-
- void getCmyk();
void setCmyk();
-
- void hueHsl();
- void saturationHsl();
- void lightness();
-
- void getHsl();
void setHsl();
void toRgb_data();
@@ -134,24 +103,15 @@ private slots:
void convertTo();
- void fromRgb();
- void fromHsv();
- void fromCmyk();
- void fromHsl();
-
void light();
void dark();
- void assignmentOoperator();
- void equalityOperator();
-
void specConstructor_data();
void specConstructor();
void achromaticHslHue();
#if defined(Q_WS_X11) && !defined(Q_OS_IRIX)
- void allowX11ColorNames();
void setallowX11ColorNames();
#endif
};
@@ -549,8 +509,6 @@ void tst_QColor::constructNamedColorWithSpace()
void tst_QColor::colorNames()
{
- DEPENDS_ON("setNamedColor()");
-
QStringList all = QColor::colorNames();
QCOMPARE(all.size(), rgbTblSize);
for (int i = 0; i < all.size(); ++i)
@@ -576,24 +534,6 @@ void tst_QColor::spec()
}
-void tst_QColor::alpha()
-{ DEPENDS_ON(setRgb()); }
-
-void tst_QColor::red()
-{ DEPENDS_ON(setRgb()); }
-
-void tst_QColor::green()
-{ DEPENDS_ON(setRgb()); }
-
-void tst_QColor::blue()
-{ DEPENDS_ON(setRgb()); }
-
-void tst_QColor::getRgb()
-{ DEPENDS_ON(setRgb()); }
-
-void tst_QColor::setAlpha()
-{ DEPENDS_ON(setRgb()); }
-
bool veryFuzzyCompare(double a, double b)
{
return qAbs(a - b) < 0.01;
@@ -601,8 +541,6 @@ bool veryFuzzyCompare(double a, double b)
void tst_QColor::setRed()
{
- DEPENDS_ON(setRgb());
-
QColor c = QColor(Qt::blue).toHsv();
c.setRed(127);
QCOMPARE(c.red(), 127);
@@ -618,8 +556,6 @@ void tst_QColor::setRed()
void tst_QColor::setGreen()
{
- DEPENDS_ON(setRgb());
-
QColor c = QColor(Qt::blue).toHsv();
c.setGreen(127);
QCOMPARE(c.red(), 0);
@@ -635,8 +571,6 @@ void tst_QColor::setGreen()
void tst_QColor::setBlue()
{
- DEPENDS_ON(setRgb());
-
QColor c = QColor(Qt::red).toHsv();
c.setBlue(127);
QCOMPARE(c.red(), 255);
@@ -790,9 +724,6 @@ void tst_QColor::setRgb()
}
}
-void tst_QColor::rgba()
-{ DEPENDS_ON("setRgba()"); }
-
void tst_QColor::setRgba()
{
for (int a = 0; a < 255; ++a) {
@@ -806,21 +737,6 @@ void tst_QColor::setRgba()
}
}
-void tst_QColor::rgb()
-{ DEPENDS_ON(setRgb()); }
-
-void tst_QColor::hue()
-{ DEPENDS_ON(setHsv()); }
-
-void tst_QColor::saturation()
-{ DEPENDS_ON(setHsv()); }
-
-void tst_QColor::value()
-{ DEPENDS_ON(setHsv()); }
-
-void tst_QColor::getHsv()
-{ DEPENDS_ON(setHsv()); }
-
void tst_QColor::setHsv()
{
QColor color;
@@ -922,21 +838,6 @@ void tst_QColor::setHsv()
}
}
-void tst_QColor::cyan()
-{ DEPENDS_ON(setCmyk()); }
-
-void tst_QColor::magenta()
-{ DEPENDS_ON(setCmyk()); }
-
-void tst_QColor::yellow()
-{ DEPENDS_ON(setCmyk()); }
-
-void tst_QColor::black()
-{ DEPENDS_ON(setCmyk()); }
-
-void tst_QColor::getCmyk()
-{ DEPENDS_ON(setCmyk()); }
-
void tst_QColor::setCmyk()
{
QColor color;
@@ -1062,18 +963,6 @@ void tst_QColor::setCmyk()
}
}
-void tst_QColor::hueHsl()
-{ DEPENDS_ON(setHsl()); }
-
-void tst_QColor::saturationHsl()
-{ DEPENDS_ON(setHsl()); }
-
-void tst_QColor::lightness()
-{ DEPENDS_ON(setHsl()); }
-
-void tst_QColor::getHsl()
-{ DEPENDS_ON(setHsl()); }
-
void tst_QColor::setHsl()
{
QColor color;
@@ -1403,25 +1292,8 @@ void tst_QColor::convertTo()
QColor invalid = color.convertTo(QColor::Invalid);
QVERIFY(invalid.spec() == QColor::Invalid);
-
- DEPENDS_ON(toRgb());
- DEPENDS_ON(toHsv());
- DEPENDS_ON(toCmyk());
- DEPENDS_ON(toHsl());
}
-void tst_QColor::fromRgb()
-{ DEPENDS_ON(convertTo()); }
-
-void tst_QColor::fromHsv()
-{ DEPENDS_ON(convertTo()); }
-
-void tst_QColor::fromCmyk()
-{ DEPENDS_ON(convertTo()); }
-
-void tst_QColor::fromHsl()
-{ DEPENDS_ON(convertTo()); }
-
void tst_QColor::light()
{
QColor gray(Qt::gray);
@@ -1436,12 +1308,6 @@ void tst_QColor::dark()
QVERIFY(darker.value() < gray.value());
}
-void tst_QColor::assignmentOoperator()
-{ DEPENDS_ON(convertTo()); }
-
-void tst_QColor::equalityOperator()
-{ DEPENDS_ON(convertTo()); }
-
Q_DECLARE_METATYPE(QColor::Spec);
void tst_QColor::specConstructor_data()
@@ -1471,11 +1337,6 @@ void tst_QColor::achromaticHslHue()
// This test fails on IRIX due to the gamma settings in the SGI X server.
#if defined(Q_WS_X11) && !defined(Q_OS_IRIX)
-void tst_QColor::allowX11ColorNames()
-{
- DEPENDS_ON(setallowX11ColorNames());
-}
-
void tst_QColor::setallowX11ColorNames()
{
RGBData x11RgbTbl[] = {
diff --git a/tests/auto/network/access/qftp/tst_qftp.cpp b/tests/auto/network/access/qftp/tst_qftp.cpp
index 8636d6500e..d88ce676e2 100644
--- a/tests/auto/network/access/qftp/tst_qftp.cpp
+++ b/tests/auto/network/access/qftp/tst_qftp.cpp
@@ -96,11 +96,9 @@ private slots:
void get();
void put_data();
void put();
- void remove();
void mkdir_data();
void mkdir();
void mkdir2();
- void rmdir();
void rename_data();
void rename();
@@ -857,11 +855,6 @@ void tst_QFtp::put()
QVERIFY( !fileExists( host, port, user, password, file ) );
}
-void tst_QFtp::remove()
-{
- DEPENDS_ON( "put" );
-}
-
void tst_QFtp::mkdir_data()
{
QTest::addColumn<QString>("host");
@@ -1009,11 +1002,6 @@ void tst_QFtp::mkdir2Slot(int id, bool)
ftp->mkdir("kake/test");
}
-void tst_QFtp::rmdir()
-{
- DEPENDS_ON( "mkdir" );
-}
-
void tst_QFtp::rename_data()
{
QTest::addColumn<QString>("host");
diff --git a/tests/auto/qabstractbutton/tst_qabstractbutton.cpp b/tests/auto/qabstractbutton/tst_qabstractbutton.cpp
index a435bee522..f5f60c8fd3 100644
--- a/tests/auto/qabstractbutton/tst_qabstractbutton.cpp
+++ b/tests/auto/qabstractbutton/tst_qabstractbutton.cpp
@@ -78,32 +78,18 @@ private slots:
void pressed();
void released();
- void text();
void setText();
- void icon();
void setIcon();
- void shortcut();
void setShortcut();
void animateClick();
void isCheckable();
- void isDown();
void setDown();
void isChecked();
- void autoRepeat();
- void toggle();
- void clicked();
void toggled();
- void isEnabled();
void setEnabled();
-/*
- void state();
- void group();
- void stateChanged();
-*/
-
void shortcutEvents();
void stopRepeatTimer();
@@ -246,11 +232,6 @@ void tst_QAbstractButton::onReleased()
release_count++;
}
-void tst_QAbstractButton::autoRepeat()
-{
- DEPENDS_ON(" setAutoRepeat" );
-}
-
void tst_QAbstractButton::setAutoRepeat_data()
{
QTest::addColumn<int>("mode");
@@ -401,11 +382,6 @@ void tst_QAbstractButton::setText()
#endif
}
-void tst_QAbstractButton::text()
-{
- DEPENDS_ON( "setText" );
-}
-
void tst_QAbstractButton::setIcon()
{
const char *test1_xpm[] = {
@@ -455,16 +431,6 @@ void tst_QAbstractButton::setIcon()
QCOMPARE( testWidget->width(), currentWidth );
}
-void tst_QAbstractButton::icon()
-{
- DEPENDS_ON( "setIcon" );
-}
-
-void tst_QAbstractButton::isEnabled()
-{
- DEPENDS_ON( "setEnabled" );
-}
-
void tst_QAbstractButton::setEnabled()
{
testWidget->setEnabled( FALSE );
@@ -481,12 +447,6 @@ void tst_QAbstractButton::isCheckable()
QVERIFY( !testWidget->isCheckable() );
}
-
-void tst_QAbstractButton::isDown()
-{
- DEPENDS_ON( "setDown" );
-}
-
void tst_QAbstractButton::setDown()
{
testWidget->setDown( FALSE );
@@ -523,11 +483,6 @@ void tst_QAbstractButton::isChecked()
QVERIFY( testWidget->isChecked() == testWidget->isCheckable() );
}
-void tst_QAbstractButton::toggle()
-{
- DEPENDS_ON( "toggled" );
-}
-
void tst_QAbstractButton::toggled()
{
testWidget->toggle();
@@ -541,11 +496,6 @@ void tst_QAbstractButton::toggled()
QVERIFY( click_count == 1 );
}
-void tst_QAbstractButton::shortcut()
-{
- DEPENDS_ON( "setShortcut" );
-}
-
void tst_QAbstractButton::setShortcut()
{
QKeySequence seq( Qt::Key_A );
@@ -591,25 +541,6 @@ void tst_QAbstractButton::animateClick()
QVERIFY( !testWidget->isDown() );
}
-void tst_QAbstractButton::clicked()
-{
- DEPENDS_ON( "toggled" );
-}
-
-/*
-void tst_QAbstractButton::group()
-{
-}
-
-void tst_QAbstractButton::state()
-{
-}
-
-void tst_QAbstractButton::stateChanged()
-{
-}
-*/
-
void tst_QAbstractButton::shortcutEvents()
{
MyButton button;
diff --git a/tests/auto/qcheckbox/tst_qcheckbox.cpp b/tests/auto/qcheckbox/tst_qcheckbox.cpp
index d789059ec9..33f5af4d0b 100644
--- a/tests/auto/qcheckbox/tst_qcheckbox.cpp
+++ b/tests/auto/qcheckbox/tst_qcheckbox.cpp
@@ -67,25 +67,15 @@ public slots:
void cleanup();
private slots:
- void isChecked();
void setChecked();
- void setNoChange();
void setTriState();
- void isTriState();
- void text();
void setText_data();
void setText();
void isToggleButton();
void setDown();
- void isDown();
- void isOn();
- void checkState();
- void autoRepeat();
void setAutoRepeat();
void toggle();
void pressed();
- void released();
- void clicked();
void toggled();
void stateChanged();
void foregroundRole();
@@ -169,11 +159,6 @@ void tst_QCheckBox::onToggled( bool /*on*/ )
// ***************************************************
-void tst_QCheckBox::isChecked()
-{
- DEPENDS_ON( "setChecked" );
-}
-
void tst_QCheckBox::setChecked()
{
testWidget->setChecked( TRUE );
@@ -227,21 +212,6 @@ void tst_QCheckBox::setTriState()
QVERIFY( testWidget->checkState() == Qt::Unchecked );
}
-void tst_QCheckBox::isTriState()
-{
- DEPENDS_ON( "setTriState" );
-}
-
-void tst_QCheckBox::setNoChange()
-{
- DEPENDS_ON( "setTriState" );
-}
-
-void tst_QCheckBox::text()
-{
- DEPENDS_ON( "setText" );
-}
-
void tst_QCheckBox::setText_data()
{
QTest::addColumn<QString>("s1");
@@ -277,26 +247,6 @@ void tst_QCheckBox::setDown()
QVERIFY( !testWidget->isDown() );
}
-void tst_QCheckBox::isDown()
-{
- DEPENDS_ON( "setDown" );
-}
-
-void tst_QCheckBox::isOn()
-{
- DEPENDS_ON( "setChecked" );
-}
-
-void tst_QCheckBox::checkState()
-{
- DEPENDS_ON( "setChecked" );
-}
-
-void tst_QCheckBox::autoRepeat()
-{
- DEPENDS_ON( "setAutoRepeat" );
-}
-
void tst_QCheckBox::setAutoRepeat()
{
// setAutoRepeat has no effect on toggle buttons
@@ -341,16 +291,6 @@ void tst_QCheckBox::pressed()
QVERIFY( testWidget->isChecked() );
}
-void tst_QCheckBox::released()
-{
- DEPENDS_ON( "pressed" );
-}
-
-void tst_QCheckBox::clicked()
-{
- DEPENDS_ON( "pressed" );
-}
-
void tst_QCheckBox::toggled()
{
connect(testWidget, SIGNAL(toggled(bool)), this, SLOT(onToggled(bool)));
diff --git a/tests/auto/qdockwidget/tst_qdockwidget.cpp b/tests/auto/qdockwidget/tst_qdockwidget.cpp
index 9877b3a8ec..2c1f7c0954 100644
--- a/tests/auto/qdockwidget/tst_qdockwidget.cpp
+++ b/tests/auto/qdockwidget/tst_qdockwidget.cpp
@@ -73,17 +73,10 @@ public:
private slots:
void getSetCheck();
void widget();
- void setWidget();
- void setFeatures();
void features();
void setFloating();
- void setAllowedAreas();
void allowedAreas();
- void isAreaAllowed();
void toggleViewAction();
- void featuresChanged();
- void topLevelChanged();
- void allowedAreasChanged();
void visibilityChanged();
void dockLocationChanged();
void setTitleBarWidget();
@@ -217,12 +210,6 @@ void tst_QDockWidget::widget()
}
}
-void tst_QDockWidget::setWidget()
-{ DEPENDS_ON("setWidget()"); }
-
-void tst_QDockWidget::setFeatures()
-{ DEPENDS_ON("features()"); }
-
void tst_QDockWidget::features()
{
QDockWidget dw;
@@ -394,9 +381,6 @@ void tst_QDockWidget::setFloating()
spy.clear();
}
-void tst_QDockWidget::setAllowedAreas()
-{ DEPENDS_ON("allowedAreas()"); }
-
void tst_QDockWidget::allowedAreas()
{
QDockWidget dw;
@@ -517,9 +501,6 @@ void tst_QDockWidget::allowedAreas()
QCOMPARE(spy.count(), 0);
}
-void tst_QDockWidget::isAreaAllowed()
-{ DEPENDS_ON("allowedAreas()"); }
-
void tst_QDockWidget::toggleViewAction()
{
QMainWindow mw;
@@ -671,15 +652,6 @@ void tst_QDockWidget::dockLocationChanged()
Qt::TopDockWidgetArea);
}
-void tst_QDockWidget::featuresChanged()
-{ DEPENDS_ON("features()"); }
-
-void tst_QDockWidget::topLevelChanged()
-{ DEPENDS_ON("setFloating()"); }
-
-void tst_QDockWidget::allowedAreasChanged()
-{ DEPENDS_ON("allowedAreas()"); }
-
void tst_QDockWidget::setTitleBarWidget()
{
//test the successive usage of setTitleBarWidget
diff --git a/tests/auto/qlabel/tst_qlabel.cpp b/tests/auto/qlabel/tst_qlabel.cpp
index 8f689d2454..9cab8b328d 100644
--- a/tests/auto/qlabel/tst_qlabel.cpp
+++ b/tests/auto/qlabel/tst_qlabel.cpp
@@ -87,16 +87,12 @@ public slots:
void cleanup();
private slots:
void getSetCheck();
- void text();
void setText_data();
void setText();
- void textFormat();
void setTextFormat();
- void buddy();
#ifndef Q_WS_MAC
void setBuddy();
#endif
- void setFont();
void setNum();
void clear();
void wordWrap();
@@ -202,11 +198,6 @@ void tst_QLabel::cleanup()
}
}
-void tst_QLabel::buddy()
-{
- DEPENDS_ON( "setBuddy" );
-}
-
// Set buddy doesn't make much sense on Mac OS X.
#ifndef Q_WS_MAC
void tst_QLabel::setBuddy()
@@ -233,11 +224,6 @@ void tst_QLabel::setBuddy()
}
#endif
-void tst_QLabel::text()
-{
- DEPENDS_ON( "setText" );
-}
-
void tst_QLabel::setText_data()
{
QTest::addColumn<QString>("txt");
@@ -265,12 +251,6 @@ void tst_QLabel::setText()
QCOMPARE( testWidget->text(), txt );
}
-
-void tst_QLabel::textFormat()
-{
- DEPENDS_ON( "setTextFormat" );
-}
-
void tst_QLabel::setTextFormat()
{
// lets' start with the simple stuff...
@@ -287,12 +267,6 @@ void tst_QLabel::setTextFormat()
QVERIFY( testWidget->textFormat() == Qt::AutoText );
}
-
-void tst_QLabel::setFont()
-{
- DEPENDS_ON( "setText" );
-}
-
void tst_QLabel::setNum()
{
testWidget->setText( "This is a text" );
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index 6081b504de..6e4726e5b5 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -151,11 +151,9 @@ private slots:
void redo_data();
void redo();
- void isRedoAvailable();
void undo_data();
void undo();
- void isUndoAvailable();
void undo_keypressevents_data();
void undo_keypressevents();
@@ -176,8 +174,6 @@ private slots:
void displayText_data();
void displayText();
- void setEchoMode();
- void echoMode();
void passwordEchoOnEdit();
#ifdef QT_GUI_PASSWORD_ECHO_DELAY
@@ -189,10 +185,8 @@ private slots:
void maxLength_data();
void maxLength();
- void setMaxLength();
void isReadOnly();
- void setReadOnly();
void cursorPosition();
@@ -200,7 +194,6 @@ private slots:
void cursorPositionChanged();
void selectedText();
- void hasSelectedText();
void deleteSelectedText();
void textChangedAndTextEdited();
@@ -209,9 +202,6 @@ private slots:
void returnPressed_maskvalidator();
void setValidator();
- void validator();
- void clearValidator();
-
void setValidator_QIntValidator_data();
void setValidator_QIntValidator();
@@ -222,11 +212,9 @@ private slots:
void setAlignment_data();
void setAlignment();
- void alignment();
void isModified();
void edited();
- void setEdited();
void insert();
void setSelection_data();
@@ -234,8 +222,6 @@ private slots:
#ifndef QT_NO_CLIPBOARD
void cut();
- void copy();
- void paste();
#endif
void maxLengthAndInputMask();
void returnPressedKeyEvent();
@@ -1110,11 +1096,6 @@ void tst_QLineEdit::undo()
#endif
}
-void tst_QLineEdit::isUndoAvailable()
-{
- DEPENDS_ON("undo");
-}
-
void tst_QLineEdit::redo_data()
{
QTest::addColumn<QStringList>("insertString");
@@ -1192,11 +1173,6 @@ void tst_QLineEdit::redo()
#endif
}
-void tst_QLineEdit::isRedoAvailable()
-{
- DEPENDS_ON("redo");
-}
-
void tst_QLineEdit::undo_keypressevents_data()
{
QTest::addColumn<QTestEventList>("keys");
@@ -1650,16 +1626,6 @@ void tst_QLineEdit::displayText()
QVERIFY(testWidget->echoMode() == mode);
}
-void tst_QLineEdit::setEchoMode()
-{
- DEPENDS_ON("displayText");
-}
-
-void tst_QLineEdit::echoMode()
-{
- DEPENDS_ON("displayText");
-}
-
void tst_QLineEdit::passwordEchoOnEdit()
{
QStyleOptionFrameV2 opt;
@@ -1819,11 +1785,6 @@ void tst_QLineEdit::maxLength()
QCOMPARE(testWidget->text(), expectedString);
}
-void tst_QLineEdit::setMaxLength()
-{
- DEPENDS_ON("maxLength");
-}
-
void tst_QLineEdit::isReadOnly()
{
QVERIFY(!testWidget->isReadOnly());
@@ -1851,11 +1812,6 @@ void tst_QLineEdit::isReadOnly()
QCOMPARE(testWidget->text(), QString("the quick dark brown fox"));
}
-void tst_QLineEdit::setReadOnly()
-{
- DEPENDS_ON("isReadOnly");
-}
-
static void figureOutProperKey(Qt::Key &key, Qt::KeyboardModifiers &pressState)
{
#ifdef Q_WS_MAC
@@ -2169,11 +2125,6 @@ void tst_QLineEdit::onSelectionChanged()
selection_count++;
}
-void tst_QLineEdit::hasSelectedText()
-{
- DEPENDS_ON("selectedText");
-}
-
void tst_QLineEdit::deleteSelectedText()
{
const QString text = QString::fromLatin1("bar");
@@ -2448,16 +2399,6 @@ void tst_QLineEdit::setValidator()
QVERIFY(testWidget->validator() == 0);
}
-void tst_QLineEdit::validator()
-{
- DEPENDS_ON("setValidator");
-}
-
-void tst_QLineEdit::clearValidator()
-{
- DEPENDS_ON("setValidator");
-}
-
void tst_QLineEdit::setValidator_QIntValidator_data()
{
QTest::addColumn<int>("mini");
@@ -2646,11 +2587,6 @@ void tst_QLineEdit::frame()
QVERIFY(testWidget->hasFrame());
}
-void tst_QLineEdit::alignment()
-{
- DEPENDS_ON("setAlignment");
-}
-
void tst_QLineEdit::setAlignment_data()
{
#ifndef NO_PIXMAP_TESTS
@@ -2771,15 +2707,6 @@ void tst_QLineEdit::edited()
QVERIFY(testWidget->isModified());
}
-/*
- Obsolete function but as long as we provide it, it needs to work.
-*/
-
-void tst_QLineEdit::setEdited()
-{
- DEPENDS_ON("edited");
-}
-
void tst_QLineEdit::insert()
{
testWidget->insert("This");
@@ -2937,17 +2864,8 @@ void tst_QLineEdit::cut()
testWidget->cut();
QCOMPARE(testWidget->text(), QString("Abcdefg defg hijklmno"));
}
-
-void tst_QLineEdit::copy()
-{
- DEPENDS_ON("cut");
-}
-
-void tst_QLineEdit::paste()
-{
- DEPENDS_ON("cut");
-}
#endif
+
class InputMaskValidator : public QValidator
{
public:
diff --git a/tests/auto/qmainwindow/tst_qmainwindow.cpp b/tests/auto/qmainwindow/tst_qmainwindow.cpp
index 1e8eee3273..d6a8ae793d 100644
--- a/tests/auto/qmainwindow/tst_qmainwindow.cpp
+++ b/tests/auto/qmainwindow/tst_qmainwindow.cpp
@@ -74,19 +74,13 @@ private slots:
void getSetCheck();
void constructor();
void iconSize();
- void setIconSize();
void toolButtonStyle();
- void setToolButtonStyle();
#ifndef Q_WS_WINCE_WM
void menuBar();
- void setMenuBar();
#endif
void statusBar();
- void setStatusBar();
void centralWidget();
- void setCentralWidget();
void corner();
- void setCorner();
void addToolBarBreak();
void insertToolBarBreak();
void addToolBar();
@@ -97,12 +91,9 @@ private slots:
void splitDockWidget();
void removeDockWidget();
void dockWidgetArea();
- void saveState();
void restoreState();
void restoreStateFromPreviousVersion();
void createPopupMenu();
- void iconSizeChanged();
- void toolButtonStyleChanged();
void hideBeforeLayout();
void saveRestore();
void saveRestore_data();
@@ -343,10 +334,6 @@ void tst_QMainWindow::iconSize()
}
}
-void tst_QMainWindow::setIconSize()
-{ DEPENDS_ON("iconSize()");
-}
-
void tst_QMainWindow::toolButtonStyle()
{
{
@@ -543,9 +530,6 @@ void tst_QMainWindow::toolButtonStyle()
}
}
-void tst_QMainWindow::setToolButtonStyle()
-{ DEPENDS_ON("toolButtonStyle()"); }
-
// With native menubar integration on Windows Mobile the menubar is not a child
#ifndef Q_WS_WINCE_WM
void tst_QMainWindow::menuBar()
@@ -631,9 +615,6 @@ void tst_QMainWindow::menuBar()
QVERIFY(!topRightCornerWidget);
}
}
-
-void tst_QMainWindow::setMenuBar()
-{ DEPENDS_ON("menuBar()"); }
#endif
void tst_QMainWindow::statusBar()
@@ -718,9 +699,6 @@ void tst_QMainWindow::statusBar()
}
}
-void tst_QMainWindow::setStatusBar()
-{ DEPENDS_ON("statusBar()"); }
-
void tst_QMainWindow::centralWidget()
{
{
@@ -787,9 +765,6 @@ void tst_QMainWindow::centralWidget()
}
}
-void tst_QMainWindow::setCentralWidget()
-{ DEPENDS_ON("centralwidget()"); }
-
void tst_QMainWindow::corner()
{
{
@@ -826,9 +801,6 @@ void tst_QMainWindow::corner()
}
}
-void tst_QMainWindow::setCorner()
-{ DEPENDS_ON("corner()"); }
-
void tst_QMainWindow::addToolBarBreak()
{
{
@@ -1227,9 +1199,6 @@ void tst_QMainWindow::dockWidgetArea()
}
}
-void tst_QMainWindow::saveState()
-{ DEPENDS_ON("restoreState()"); }
-
void tst_QMainWindow::restoreState()
{
QMainWindow mw;
@@ -1615,12 +1584,6 @@ void tst_QMainWindow::saveRestore()
#endif
}
-void tst_QMainWindow::iconSizeChanged()
-{ DEPENDS_ON("iconSize()"); }
-
-void tst_QMainWindow::toolButtonStyleChanged()
-{ DEPENDS_ON("toolButtonStyle()"); }
-
void tst_QMainWindow::isSeparator()
{
QMainWindow mw;
diff --git a/tests/auto/qmenu/tst_qmenu.cpp b/tests/auto/qmenu/tst_qmenu.cpp
index 41c24a9992..d115da865b 100644
--- a/tests/auto/qmenu/tst_qmenu.cpp
+++ b/tests/auto/qmenu/tst_qmenu.cpp
@@ -340,7 +340,6 @@ void tst_QMenu::keyboardNavigation_data()
void tst_QMenu::keyboardNavigation()
{
- DEPENDS_ON( "addActionsAndClear" ); //if add/clear fails...
QFETCH(int, key);
QFETCH(int, expected_action);
QFETCH(int, expected_menu);
diff --git a/tests/auto/qpushbutton/tst_qpushbutton.cpp b/tests/auto/qpushbutton/tst_qpushbutton.cpp
index fffe1c26e4..e5083553e2 100644
--- a/tests/auto/qpushbutton/tst_qpushbutton.cpp
+++ b/tests/auto/qpushbutton/tst_qpushbutton.cpp
@@ -74,23 +74,17 @@ public slots:
void cleanup();
private slots:
void getSetCheck();
- void setAutoRepeat();
+ void autoRepeat();
void pressed();
- void released();
- void text();
- void accel();
void setAccel();
void isCheckable();
- void isDown();
void setDown();
void popupCrash();
void isChecked();
- void autoRepeat();
void animateClick();
void toggle();
void clicked();
void toggled();
- void isEnabled();
void defaultAndAutoDefault();
void sizeHint_data();
void sizeHint();
@@ -204,7 +198,7 @@ void tst_QPushButton::onReleased()
release_count++;
}
-void tst_QPushButton::setAutoRepeat()
+void tst_QPushButton::autoRepeat()
{
// If this changes, this test must be completely revised.
QVERIFY( !testWidget->isCheckable() );
@@ -283,11 +277,6 @@ void tst_QPushButton::setAutoRepeat()
QVERIFY( click_count == 0 );
}
-void tst_QPushButton::autoRepeat()
-{
- DEPENDS_ON(" setAutoRepeat" );
-}
-
void tst_QPushButton::pressed()
{
QTest::keyPress( testWidget, ' ' );
@@ -314,31 +303,11 @@ void tst_QPushButton::pressed()
}
-void tst_QPushButton::released()
-{
- DEPENDS_ON( "pressed" );
-}
-
-void tst_QPushButton::text()
-{
- DEPENDS_ON( "setText" );
-}
-
-void tst_QPushButton::isEnabled()
-{
- DEPENDS_ON( "setEnabled" );
-}
-
void tst_QPushButton::isCheckable()
{
QVERIFY( !testWidget->isCheckable() );
}
-void tst_QPushButton::isDown()
-{
- DEPENDS_ON( "setDown" );
-}
-
void tst_QPushButton::setDown()
{
testWidget->setDown( FALSE );
@@ -395,11 +364,6 @@ void tst_QPushButton::toggled()
QVERIFY( click_count == 1 );
}
-void tst_QPushButton::accel()
-{
- DEPENDS_ON( "setAccel" );
-}
-
/*
If we press an accelerator key we ONLY get a pressed signal and
NOT a released or clicked signal.
diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp
index a5967e836d..836286e8ae 100644
--- a/tests/auto/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/qsplitter/tst_qsplitter.cpp
@@ -75,7 +75,6 @@ public slots:
void init();
private slots:
void getSetCheck();
- void sizes(); // bare (as in empty)
void setSizes();
void setSizes_data();
void saveAndRestoreState();
@@ -128,11 +127,6 @@ tst_QSplitter::~tst_QSplitter()
{
}
-void tst_QSplitter::sizes()
-{
- DEPENDS_ON("setSizes");
-}
-
void tst_QSplitter::initTestCase()
{
splitter = new QSplitter(Qt::Horizontal);
diff --git a/tests/auto/qtoolbar/tst_qtoolbar.cpp b/tests/auto/qtoolbar/tst_qtoolbar.cpp
index d15e753b2d..eb043aced8 100644
--- a/tests/auto/qtoolbar/tst_qtoolbar.cpp
+++ b/tests/auto/qtoolbar/tst_qtoolbar.cpp
@@ -73,14 +73,9 @@ public slots:
void slot(QAction *action);
private slots:
- void setMovable();
void isMovable();
- void setAllowedAreas();
void allowedAreas();
- void isAreaAllowed();
- void setOrientation();
void orientation();
- void clear();
void addAction();
void insertAction();
void addSeparator();
@@ -88,18 +83,10 @@ private slots:
void addWidget();
void insertWidget();
void actionGeometry();
- void actionAt();
void toggleViewAction();
void iconSize();
- void setIconSize();
void toolButtonStyle();
- void setToolButtonStyle();
void actionTriggered();
- void movableChanged();
- void allowedAreasChanged();
- void orientationChanged();
- void iconSizeChanged();
- void toolButtonStyleChanged();
void visibilityChanged();
void actionOwnership();
void widgetAction();
@@ -126,9 +113,6 @@ void tst_QToolBar::slot()
void tst_QToolBar::slot(QAction *action)
{ ::triggered = action; }
-void tst_QToolBar::setMovable()
-{ DEPENDS_ON("isMovable()"); }
-
void tst_QToolBar::isMovable()
{
#define DO_TEST \
@@ -168,9 +152,6 @@ void tst_QToolBar::isMovable()
DO_TEST;
}
-void tst_QToolBar::setAllowedAreas()
-{ DEPENDS_ON("allowedAreas()"); }
-
void tst_QToolBar::allowedAreas()
{
QToolBar tb;
@@ -291,12 +272,6 @@ void tst_QToolBar::allowedAreas()
QCOMPARE(spy.count(), 0);
}
-void tst_QToolBar::isAreaAllowed()
-{ DEPENDS_ON("allowedAreas()"); }
-
-void tst_QToolBar::setOrientation()
-{ DEPENDS_ON("orientation()"); }
-
void tst_QToolBar::orientation()
{
QToolBar tb;
@@ -350,16 +325,6 @@ void tst_QToolBar::orientation()
QCOMPARE(spy.count(), 0);
}
-void tst_QToolBar::clear()
-{
- DEPENDS_ON("addAction()");
- DEPENDS_ON("insertAction()");
- DEPENDS_ON("addSeparator()");
- DEPENDS_ON("insertSeparator()");
- DEPENDS_ON("addWidget()");
- DEPENDS_ON("insertWidget()");
-}
-
void tst_QToolBar::addAction()
{
QToolBar tb;
@@ -635,9 +600,6 @@ void tst_QToolBar::actionGeometry()
QCOMPARE(tb.actionAt(rect4.center()), &action4);
}
-void tst_QToolBar::actionAt()
-{ DEPENDS_ON("actionGeometry()"); }
-
void tst_QToolBar::toggleViewAction()
{
{
@@ -666,9 +628,6 @@ void tst_QToolBar::toggleViewAction()
}
}
-void tst_QToolBar::setIconSize()
-{ DEPENDS_ON("iconSize()"); }
-
void tst_QToolBar::iconSize()
{
{
@@ -782,9 +741,6 @@ void tst_QToolBar::iconSize()
}
}
-void tst_QToolBar::setToolButtonStyle()
-{ DEPENDS_ON("toolButtonStyle()"); }
-
void tst_QToolBar::toolButtonStyle()
{
{
@@ -982,21 +938,6 @@ void tst_QToolBar::actionTriggered()
QCOMPARE(::triggered, &action4);
}
-void tst_QToolBar::movableChanged()
-{ DEPENDS_ON("isMovable()"); }
-
-void tst_QToolBar::allowedAreasChanged()
-{ DEPENDS_ON("allowedAreas()"); }
-
-void tst_QToolBar::orientationChanged()
-{ DEPENDS_ON("orientation()"); }
-
-void tst_QToolBar::iconSizeChanged()
-{ DEPENDS_ON("iconSize()"); }
-
-void tst_QToolBar::toolButtonStyleChanged()
-{ DEPENDS_ON("toolButtonStyle()"); }
-
void tst_QToolBar::visibilityChanged()
{
QMainWindow mw;
diff --git a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
index 63f320151f..6eb2c0a767 100644
--- a/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
+++ b/tests/auto/sql/kernel/qsqlfield/tst_qsqlfield.cpp
@@ -64,7 +64,6 @@ public slots:
void cleanup();
private slots:
void getSetCheck();
- void value();
void type();
void setValue_data();
void setValue();
@@ -351,10 +350,5 @@ void tst_QSqlField::type()
QVERIFY( field3.type() == QVariant::Double );
}
-void tst_QSqlField::value()
-{
- DEPENDS_ON( "setValue" );
-}
-
QTEST_MAIN(tst_QSqlField)
#include "tst_qsqlfield.moc"