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

Function MakeAbortOnSecond

cpp/src/arrow/util/iterator_test.cc:301–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301Transformer<TestInt, TestStr> MakeAbortOnSecond() {
302 int counter = 0;
303 return [counter](TestInt next) mutable -> Result<TransformFlow<TestStr>> {
304 if (counter++ == 1) {
305 return Status::Invalid("X");
306 }
307 return TransformYield(TestStr(next));
308 };
309}
310
311TEST(TestIteratorTransform, Abort) {
312 auto original = VectorIt({1, 2, 3});

Callers 1

TESTFunction · 0.85

Calls 3

TransformYieldFunction · 0.85
TestStrClass · 0.85
InvalidFunction · 0.50

Tested by

no test coverage detected