From a0953e7e18d319c3043fb7e2555e22ea8e5e5d7b Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 13 Mar 2024 18:20:24 +0100 Subject: [PATCH] correction for unittest --- src/time/cuc.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/time/cuc.rs b/src/time/cuc.rs index b8a6c4d..a891e5e 100644 --- a/src/time/cuc.rs +++ b/src/time/cuc.rs @@ -809,8 +809,8 @@ mod tests { #[test] fn test_basic_zero_epoch() { - // Include leap second correction for this. - let zero_cuc = TimeProviderCcsdsEpoch::new(0, LEAP_SECONDS); + // Do not include leap second corrections, which do not apply to dates before 1972. + let zero_cuc = TimeProviderCcsdsEpoch::new(0, 0); assert_eq!(zero_cuc.len_as_bytes(), 5); assert_eq!(zero_cuc.width(), zero_cuc.width_counter_pair().0); assert_eq!(zero_cuc.counter(), zero_cuc.width_counter_pair().1); @@ -823,12 +823,12 @@ mod tests { let dt = zero_cuc.date_time(); assert!(dt.is_some()); let dt = dt.unwrap(); - assert_eq!(dt.year(), 1957); - assert_eq!(dt.month(), 12); - assert_eq!(dt.day(), 31); - assert_eq!(dt.hour(), 23); - assert_eq!(dt.minute(), 59); - assert_eq!(dt.second(), 23); + assert_eq!(dt.year(), 1958); + assert_eq!(dt.month(), 1); + assert_eq!(dt.day(), 1); + assert_eq!(dt.hour(), 0); + assert_eq!(dt.minute(), 0); + assert_eq!(dt.second(), 0); } #[test]