From 0953e4a89c2a39fff47a2b977abf36d9533a1b65 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Fri, 19 May 2023 17:21:09 +0200 Subject: [PATCH] Also report correct ordinal in `test_date_bounds` --- src/naive/date.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/naive/date.rs b/src/naive/date.rs index 20866b7b..700958e1 100644 --- a/src/naive/date.rs +++ b/src/naive/date.rs @@ -2405,13 +2405,14 @@ mod tests { let calculated_max = NaiveDate::from_ymd_opt(MAX_YEAR, 12, 31).unwrap(); assert!( NaiveDate::MIN == calculated_min, - "`NaiveDate::MIN` should have a year flag {:?}", + "`NaiveDate::MIN` should have year flag {:?}", calculated_min.of().flags() ); assert!( NaiveDate::MAX == calculated_max, - "`NaiveDate::MAX` should have a year flag {:?}", - calculated_max.of().flags() + "`NaiveDate::MAX` should have year flag {:?} and ordinal {}", + calculated_max.of().flags(), + calculated_max.of().ordinal() ); // let's also check that the entire range do not exceed 2^44 seconds