| 162 | } |
| 163 | |
| 164 | void CheckBufferRanges(const std::shared_ptr<Array>& input, |
| 165 | const std::vector<ExpectedRange>& expected) { |
| 166 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<Array> result, ReferencedRanges(*input->data())); |
| 167 | std::shared_ptr<StructArray> result_struct = checked_pointer_cast<StructArray>(result); |
| 168 | ASSERT_NE(nullptr, result_struct); |
| 169 | AssertArraysEqual(*result_struct->field(1), *RangesToOffsets(expected)); |
| 170 | AssertArraysEqual(*result_struct->field(2), *RangesToLengths(expected)); |
| 171 | CheckBufferRangeStarts(result_struct->field(0), expected); |
| 172 | } |
| 173 | |
| 174 | void CheckFixedWidthStarts(const std::shared_ptr<Array>& input) { |
| 175 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<Array> result, ReferencedRanges(*input->data())); |
no test coverage detected