codewarnab opened a new pull request, #12270:
URL: https://github.com/apache/arrow-rs/pull/12270
# Which issue does this PR close?
- Closes #11033.
# Rationale for this change
This is the last step of #11033: `arrow-cast/src/cast/mod.rs` no longer has
an inline `mod tests`.
# What changes are included in this PR?
- The remaining temporal cast tests (timestamp / date / time / timezone; 67
tests) move from `cast/mod.rs` into the existing `tests/cast/date_time.rs`
integration suite.
- The duplicate `assert_cast!` macro and
`assert_temporal_overflow_is_safe` helper are dropped; `date_time.rs` already
defines identical ones.
- The private `time_unit_multiple` helper is mirrored in the test file,
the same way `tests/cast/interval.rs` does it.
- `test_cast_outside_supported_range_for_nanoseconds` called the private
`cast_string_to_timestamp`. It now goes through the public `cast_with_options`
to `Timestamp(Nanosecond, None)`, which hits the same code path, and asserts
the same error message.
- `test_is_infallible_numeric_cast` uses crate-private items
(`NumericNative`, `is_infallible_numeric_cast`), so it moves into a
`#[cfg(test)]` module in `cast/numeric.rs`, next to the code it tests.
The total test count is unchanged (97 before, 96 + 1 after). No production
code changes.
# Are these changes tested?
Yes. `cargo test -p arrow-cast` passes. `cargo clippy -p arrow-cast
--all-targets --all-features -D warnings`, `cargo fmt --check` and `typos` are
clean.
# Are there any user-facing changes?
No.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]