| 71 | } |
| 72 | |
| 73 | void CheckError(const PivotLongerNodeOptions& options, const std::string& message) { |
| 74 | std::shared_ptr<Table> input = gen::Gen({gen::Step(), gen::Random(boolean())}) |
| 75 | ->FailOnError() |
| 76 | ->Table(/*rows_per_chunk=*/1, /*num_chunks=*/1); |
| 77 | |
| 78 | Declaration plan = Declaration::Sequence({ |
| 79 | {"table_source", TableSourceNodeOptions(std::move(input))}, |
| 80 | {"pivot_longer", options}, |
| 81 | }); |
| 82 | |
| 83 | ASSERT_THAT(DeclarationToStatus(std::move(plan)), |
| 84 | Raises(StatusCode::Invalid, testing::HasSubstr(message))); |
| 85 | } |
| 86 | |
| 87 | TEST(PivotLongerNode, Error) { |
| 88 | PivotLongerNodeOptions options; |
no test coverage detected