diff options
Diffstat (limited to 'tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp')
-rw-r--r-- | tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp index 60a4d749c9..5ec32b1d02 100644 --- a/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp +++ b/tests/auto/corelib/thread/qfuturewatcher/tst_qfuturewatcher.cpp @@ -68,6 +68,7 @@ private slots: void incrementalFilterResults(); void qfutureSynchronizer(); void warnRace(); + void matchFlags(); }; void sleeper() @@ -930,5 +931,17 @@ void tst_QFutureWatcher::warnRace() future.waitForFinished(); } +void tst_QFutureWatcher::matchFlags() +{ + /* Regression test: expect a default watcher to be in the same state as a + * default future. */ + QFutureWatcher<int> watcher; + QFuture<int> future; + QCOMPARE(watcher.isStarted(), future.isStarted()); + QCOMPARE(watcher.isCanceled(), future.isCanceled()); + QCOMPARE(watcher.isFinished(), future.isFinished()); +} + + QTEST_MAIN(tst_QFutureWatcher) #include "tst_qfuturewatcher.moc" |