| 281 | } |
| 282 | |
| 283 | void TestNoCopyTask(std::shared_ptr<TaskGroup> task_group) { |
| 284 | auto counter = std::make_shared<uint8_t>(0); |
| 285 | CopyCountingTask task(counter); |
| 286 | task_group->Append(std::move(task)); |
| 287 | ASSERT_OK(task_group->Finish()); |
| 288 | ASSERT_EQ(0, *counter); |
| 289 | } |
| 290 | |
| 291 | void TestFinishNotSticky(std::function<std::shared_ptr<TaskGroup>()> factory) { |
| 292 | // If a task is added that runs very quickly it might decrement the task counter back |