Skip to content

Commit

Permalink
More task test debugging, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 7, 2018
1 parent 7b971e2 commit 5e1184a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/src/core/testqgstaskmanager.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit 5e1184a

Please sign in to comment.