| 23 | |
| 24 | template <typename CType> |
| 25 | void CheckStep(const Array& result, CType start, CType step, int64_t length) { |
| 26 | using ArrowType = typename CTypeTraits<CType>::ArrowType; |
| 27 | |
| 28 | ASSERT_OK(result.ValidateFull()); |
| 29 | ASSERT_EQ(result.type_id(), TypeTraits<ArrowType>::type_singleton()->id()); |
| 30 | ASSERT_EQ(result.length(), length); |
| 31 | ASSERT_EQ(result.null_bitmap(), nullptr); |
| 32 | auto data = result.data()->GetValues<CType>(1); |
| 33 | CType current = start; |
| 34 | for (int64_t i = 0; i < length; ++i) { |
| 35 | ASSERT_EQ(data[i], current); |
| 36 | current += step; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | TEST(StepTest, Default) { |
| 41 | for (auto length : {0, 1, 1024}) { |
no test coverage detected