| 172 | } |
| 173 | |
| 174 | void CheckFixedWidthStarts(const std::shared_ptr<Array>& input) { |
| 175 | ASSERT_OK_AND_ASSIGN(std::shared_ptr<Array> result, ReferencedRanges(*input->data())); |
| 176 | uint64_t expected_values_start = |
| 177 | reinterpret_cast<uint64_t>(input->data()->buffers[1]->data()); |
| 178 | uint64_t expected_validity_start = |
| 179 | reinterpret_cast<uint64_t>(input->null_bitmap_data()); |
| 180 | std::shared_ptr<StructArray> result_struct = checked_pointer_cast<StructArray>(result); |
| 181 | const uint64_t* raw_starts = |
| 182 | checked_pointer_cast<UInt64Array>(result_struct->field(0))->raw_values(); |
| 183 | ASSERT_EQ(expected_validity_start, raw_starts[0]); |
| 184 | ASSERT_EQ(expected_values_start, raw_starts[1]); |
| 185 | } |
| 186 | |
| 187 | TEST(ByteRanges, StartValue) { |
| 188 | std::shared_ptr<Array> bool_arr = ArrayFromJSON( |
no test coverage detected