Skip to content

Commit

Permalink
correction for unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Mar 13, 2024
1 parent de1dc16 commit a0953e7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/time/cuc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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]
Expand Down

0 comments on commit a0953e7

Please sign in to comment.