| 88 | } |
| 89 | |
| 90 | TEST(Utils, Time32ToTimeStampArray) { |
| 91 | std::vector<int32_t> input_data = {14896, 17820}; |
| 92 | |
| 93 | const auto seconds_from_epoch = GetTodayTimeFromEpoch(); |
| 94 | std::vector<int64_t> expected_data; |
| 95 | expected_data.reserve(2); |
| 96 | |
| 97 | for (const auto& item : input_data) { |
| 98 | expected_data.emplace_back(item + seconds_from_epoch * 1000); |
| 99 | } |
| 100 | |
| 101 | std::shared_ptr<Array> expected; |
| 102 | auto timestamp_field = field("timestamp_field", timestamp(TimeUnit::MILLI)); |
| 103 | ArrayFromVector<TimestampType, int64_t>(timestamp_field->type(), expected_data, |
| 104 | &expected); |
| 105 | |
| 106 | TestTime32ArrayConversion(input_data, expected, CDataType_TIMESTAMP, Type::TIMESTAMP); |
| 107 | } |
| 108 | |
| 109 | TEST(Utils, Time64ToTimeStampArray) { |
| 110 | std::vector<int64_t> input_data = {1579489200000, 1646881200000}; |
nothing calls this directly
no test coverage detected