| 993 | void AssertScheduled(const std::vector<int>& ids) { AssertIds(ids, false); } |
| 994 | |
| 995 | void AssertIds(const std::vector<int>& ids, bool should_be_synchronous) { |
| 996 | for (auto id : ids) { |
| 997 | ASSERT_EQ(should_be_synchronous, callbacks_run_synchronously.find(id) != |
| 998 | callbacks_run_synchronously.end()); |
| 999 | } |
| 1000 | } |
| 1001 | |
| 1002 | std::function<void(const Status&)> callback(int id) { |
| 1003 | return [this, id](const Status&) { callbacks_run_synchronously.insert(id); }; |