MCPcopy Create free account
hub / github.com/apache/arrow / TEST

Function TEST

cpp/src/arrow/util/async_generator_test.cc:303–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

301};
302
303TEST(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
314TEST(TestAsyncUtil, Collect) {
315 std::vector<TestInt> expected = {1, 2, 3};

Callers

nothing calls this directly

Calls 15

AsyncVectorItFunction · 0.85
CollectAsyncGeneratorFunction · 0.85
to_stringFunction · 0.85
MakeMappedGeneratorFunction · 0.85
SleepABitAsyncFunction · 0.85
TestStrClass · 0.85
MakeTransferredGeneratorFunction · 0.85
GetCpuThreadPoolFunction · 0.85
BusyWaitFunction · 0.85
MakeVectorGeneratorFunction · 0.85
RangeVectorFunction · 0.85

Tested by

no test coverage detected