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

Function TEST

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

Source from the content-addressed store, hash-verified

304};
305
306TEST(TestAsyncUtil, Visit) {
307 auto generator = util::AsyncVectorIt<TestInt>({1, 2, 3});
308 unsigned int sum = 0;
309 auto sum_future = VisitAsyncGenerator<TestInt>(generator, [&sum](TestInt item) {
310 sum += item.value;
311 return Status::OK();
312 });
313 ASSERT_TRUE(sum_future.is_finished());
314 ASSERT_EQ(6, sum);
315}
316
317TEST(TestAsyncUtil, Collect) {
318 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