correction for unittest
All checks were successful
Rust/spacepackets/pipeline/pr-main This commit looks good
Rust/spacepackets/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2024-03-13 18:20:24 +01:00
parent de1dc16e60
commit a0953e7e18

View File

@ -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]