diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2011-12-30 15:51:05 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-03 02:57:12 +0100 |
commit | fda36df6babf20bcfd04a54a1336a9c26e72a8ef (patch) | |
tree | 0c09018e6db15ea40e156b38854e224e62e9130f /tests/auto/corelib/thread | |
parent | 39f3ee8a5dd499cf86f95e7fc9200eb3226b16be (diff) |
Use true and false in preference to TRUE and FALSE in tests.
Use the C++ boolean constants true and false instead of the C macros
TRUE and FALSE (which are actually integers), and use QVERIFY instead of
QCOMPARE for verifying simple boolean expressions.
Change-Id: Ie76dfcab6722df6b93b3fa62b0f3437901482932
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Diffstat (limited to 'tests/auto/corelib/thread')
-rw-r--r-- | tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp index 4ffde9fcb8..4237b41e57 100644 --- a/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp +++ b/tests/auto/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp @@ -443,7 +443,7 @@ void tst_QWaitCondition::wakeOne() for (x = 0; x < ThreadCount; ++x) { thread[x].mutex = &mutex; thread[x].cond = &cond; - thread_exited[x] = FALSE; + thread_exited[x] = false; thread[x].start(); // wait for thread to start QVERIFY(thread[x].started.wait(&mutex, 1000)); @@ -468,7 +468,7 @@ void tst_QWaitCondition::wakeOne() if (thread_exited[y]) continue; if (thread[y].wait(exited > 0 ? 10 : 1000)) { - thread_exited[y] = TRUE; + thread_exited[y] = true; ++exited; } } @@ -487,7 +487,7 @@ void tst_QWaitCondition::wakeOne() for (x = 0; x < ThreadCount; ++x) { rwthread[x].readWriteLock = &readWriteLock; rwthread[x].cond = &cond; - thread_exited[x] = FALSE; + thread_exited[x] = false; rwthread[x].start(); // wait for thread to start QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000)); @@ -512,7 +512,7 @@ void tst_QWaitCondition::wakeOne() if (thread_exited[y]) continue; if (rwthread[y].wait(exited > 0 ? 10 : 1000)) { - thread_exited[y] = TRUE; + thread_exited[y] = true; ++exited; } } @@ -537,7 +537,7 @@ void tst_QWaitCondition::wakeOne() for (x = 0; x < ThreadCount; ++x) { thread[x].mutex = &mutex; thread[x].cond = &cond; - thread_exited[x] = FALSE; + thread_exited[x] = false; thread[x].start(); // wait for thread to start QVERIFY(thread[x].started.wait(&mutex, 1000)); @@ -564,7 +564,7 @@ void tst_QWaitCondition::wakeOne() if (thread_exited[y]) continue; if (thread[y].wait(exited > 0 ? 10 : 1000)) { - thread_exited[y] = TRUE; + thread_exited[y] = true; ++exited; } } @@ -583,7 +583,7 @@ void tst_QWaitCondition::wakeOne() for (x = 0; x < ThreadCount; ++x) { rwthread[x].readWriteLock = &readWriteLock; rwthread[x].cond = &cond; - thread_exited[x] = FALSE; + thread_exited[x] = false; rwthread[x].start(); // wait for thread to start QVERIFY(rwthread[x].started.wait(&readWriteLock, 1000)); @@ -610,7 +610,7 @@ void tst_QWaitCondition::wakeOne() if (thread_exited[y]) continue; if (rwthread[y].wait(exited > 0 ? 10 : 1000)) { - thread_exited[y] = TRUE; + thread_exited[y] = true; ++exited; } } |