correction for unittest

This commit is contained in:
Robin Müller 2024-03-13 18:20:24 +01:00
parent aacdd9f364
commit aae246dca6
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -828,8 +828,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);
@ -842,12 +842,12 @@ mod tests {
let dt = zero_cuc.chrono_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]