| 301 | }; |
| 302 | |
| 303 | TEST(TestAsyncUtil, Visit) { |
| 304 | auto generator = util::AsyncVectorIt<TestInt>({1, 2, 3}); |
| 305 | unsigned int sum = 0; |
| 306 | auto sum_future = VisitAsyncGenerator<TestInt>(generator, [&sum](TestInt item) { |
| 307 | sum += item.value; |
| 308 | return Status::OK(); |
| 309 | }); |
| 310 | ASSERT_TRUE(sum_future.is_finished()); |
| 311 | ASSERT_EQ(6, sum); |
| 312 | } |
| 313 | |
| 314 | TEST(TestAsyncUtil, Collect) { |
| 315 | std::vector<TestInt> expected = {1, 2, 3}; |
nothing calls this directly
no test coverage detected