Also report correct ordinal in test_date_bounds

This commit is contained in:
Paul Dicker 2023-05-19 17:21:09 +02:00 committed by Paul Dicker
parent b18e663a27
commit 0953e4a89c

View File

@ -2405,13 +2405,14 @@ mod tests {
let calculated_max = NaiveDate::from_ymd_opt(MAX_YEAR, 12, 31).unwrap(); let calculated_max = NaiveDate::from_ymd_opt(MAX_YEAR, 12, 31).unwrap();
assert!( assert!(
NaiveDate::MIN == calculated_min, NaiveDate::MIN == calculated_min,
"`NaiveDate::MIN` should have a year flag {:?}", "`NaiveDate::MIN` should have year flag {:?}",
calculated_min.of().flags() calculated_min.of().flags()
); );
assert!( assert!(
NaiveDate::MAX == calculated_max, NaiveDate::MAX == calculated_max,
"`NaiveDate::MAX` should have a year flag {:?}", "`NaiveDate::MAX` should have year flag {:?} and ordinal {}",
calculated_max.of().flags() calculated_max.of().flags(),
calculated_max.of().ordinal()
); );
// let's also check that the entire range do not exceed 2^44 seconds // let's also check that the entire range do not exceed 2^44 seconds