From fc67f3e6e0b41635bdf93b45ca09b8ac54672bb6 Mon Sep 17 00:00:00 2001 From: Paul Dicker Date: Mon, 17 Apr 2023 14:42:44 +0200 Subject: [PATCH] Remove obsolete test --- src/datetime/tests.rs | 35 ----------------------------------- 1 file changed, 35 deletions(-) diff --git a/src/datetime/tests.rs b/src/datetime/tests.rs index 88fcd80dec..1fddd62ec1 100644 --- a/src/datetime/tests.rs +++ b/src/datetime/tests.rs @@ -1499,41 +1499,6 @@ fn test_core_duration_max() { utc_dt += Duration::MAX; } -#[test] -#[cfg(all(target_os = "windows", feature = "clock"))] -fn test_from_naive_date_time_windows() { - let min_year = NaiveDate::from_ymd_opt(1601, 1, 3).unwrap().and_hms_opt(0, 0, 0).unwrap(); - - let max_year = NaiveDate::from_ymd_opt(30827, 12, 29).unwrap().and_hms_opt(23, 59, 59).unwrap(); - - let too_low_year = - NaiveDate::from_ymd_opt(1600, 12, 29).unwrap().and_hms_opt(23, 59, 59).unwrap(); - - let too_high_year = NaiveDate::from_ymd_opt(30829, 1, 3).unwrap().and_hms_opt(0, 0, 0).unwrap(); - - let _ = Local.from_utc_datetime(&min_year); - let _ = Local.from_utc_datetime(&max_year); - - let _ = Local.from_local_datetime(&min_year); - let _ = Local.from_local_datetime(&max_year); - - let local_too_low = Local.from_local_datetime(&too_low_year); - let local_too_high = Local.from_local_datetime(&too_high_year); - - assert_eq!(local_too_low, LocalResult::None); - assert_eq!(local_too_high, LocalResult::None); - - let err = std::panic::catch_unwind(|| { - Local.from_utc_datetime(&too_low_year); - }); - assert!(err.is_err()); - - let err = std::panic::catch_unwind(|| { - Local.from_utc_datetime(&too_high_year); - }); - assert!(err.is_err()); -} - #[test] #[cfg(feature = "clock")] fn test_datetime_local_from_preserves_offset() {