| 299 | } |
| 300 | |
| 301 | Transformer<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 | |
| 311 | TEST(TestIteratorTransform, Abort) { |
| 312 | auto original = VectorIt({1, 2, 3}); |
no test coverage detected