| 266 | ::testing::Values(false, true)); |
| 267 | |
| 268 | TEST(SerialExecutor, AsyncGenerator) { |
| 269 | std::vector<TestInt> values{1, 2, 3, 4, 5}; |
| 270 | auto source = util::SlowdownABit(util::AsyncVectorIt(values)); |
| 271 | Iterator<TestInt> iter = |
| 272 | SerialExecutor::IterateGenerator<TestInt>([&source](Executor* executor) { |
| 273 | return MakeMappedGenerator(source, [executor](const TestInt& ti) { |
| 274 | return DeferNotOk(executor->Submit([ti] { return ti; })); |
| 275 | }); |
| 276 | }); |
| 277 | ASSERT_OK_AND_ASSIGN(auto vec, iter.ToVector()); |
| 278 | ASSERT_EQ(vec, values); |
| 279 | } |
| 280 | |
| 281 | TEST(SerialExecutor, AsyncGeneratorWithFollowUp) { |
| 282 | // Sometimes a task will generate follow-up tasks. These should be run |
nothing calls this directly
no test coverage detected