diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-10-18 12:50:36 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-19 07:24:13 +0200 |
commit | 8f02339e76b9b21df028e29735475313760f82c6 (patch) | |
tree | da655389e77d590196152b3ec230bc67348da880 /tests/auto/corelib | |
parent | ae1810658b75dd0eb0247b0e951ce315c8ce4c86 (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/auto/corelib')
7 files changed, 0 insertions, 89 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"); |