Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
More task test debugging, fixes
- Loading branch information
Showing
with
4 additions
and
3 deletions.
-
+4
−3
tests/src/core/testqgstaskmanager.cpp
|
@@ -711,20 +711,21 @@ void TestQgsTaskManager::taskId() |
|
|
|
|
|
//create manager with some tasks |
|
|
QgsTaskManager manager; |
|
|
TestTask *task = new TestTask(); |
|
|
TestTask *task2 = new TestTask(); |
|
|
TestTask *task = new TestTask( QStringLiteral( "task_id_1" ) ); |
|
|
TestTask *task2 = new TestTask( QStringLiteral( "task_id_2" ) ); |
|
|
manager.addTask( task ); |
|
|
manager.addTask( task2 ); |
|
|
|
|
|
//also a task not in the manager |
|
|
TestTask *task3 = new TestTask(); |
|
|
TestTask *task3 = new TestTask( QStringLiteral( "task_id_3" ) ); |
|
|
|
|
|
QCOMPARE( manager.taskId( nullptr ), -1L ); |
|
|
QCOMPARE( manager.taskId( task ), 1L ); |
|
|
QCOMPARE( manager.taskId( task2 ), 2L ); |
|
|
QCOMPARE( manager.taskId( task3 ), -1L ); |
|
|
|
|
|
delete task3; |
|
|
flushEvents(); |
|
|
} |
|
|
|
|
|
void TestQgsTaskManager::waitForFinished() |
|
|