fix tests
This commit is contained in:
parent
94c378fa3b
commit
0b5a384743
@ -1493,9 +1493,9 @@ mod tests {
|
||||
assert!(res.is_err());
|
||||
let err = res.unwrap_err();
|
||||
match err {
|
||||
InvalidTimeCode(code, raw) => {
|
||||
assert_eq!(code, CcsdsTimeCodes::Cds);
|
||||
assert_eq!(raw, 0);
|
||||
InvalidTimeCode { expected, found } => {
|
||||
assert_eq!(expected, CcsdsTimeCodes::Cds);
|
||||
assert_eq!(found, 0);
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
@ -909,9 +909,9 @@ mod tests {
|
||||
let res = TimeProviderCcsdsEpoch::from_bytes(&buf);
|
||||
assert!(res.is_err());
|
||||
let err = res.unwrap_err();
|
||||
if let TimestampError::InvalidTimeCode(code, raw) = err {
|
||||
assert_eq!(code, CcsdsTimeCodes::CucCcsdsEpoch);
|
||||
assert_eq!(raw, CcsdsTimeCodes::CucAgencyEpoch as u8);
|
||||
if let TimestampError::InvalidTimeCode { expected, found } = err {
|
||||
assert_eq!(expected, CcsdsTimeCodes::CucCcsdsEpoch);
|
||||
assert_eq!(found, CcsdsTimeCodes::CucAgencyEpoch as u8);
|
||||
} else {
|
||||
panic!("unexpected error: {}", err);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user