some more serde tests
Some checks failed
Rust/spacepackets/pipeline/head There was a failure building this commit
Some checks failed
Rust/spacepackets/pipeline/head There was a failure building this commit
This commit is contained in:
@ -201,7 +201,7 @@ mod tests {
|
||||
|
||||
use super::*;
|
||||
#[cfg(feature = "serde")]
|
||||
use postcard::{from_bytes, to_allocvec};
|
||||
use crate::tests::generic_serde_test;
|
||||
|
||||
fn verify_state(ack_pdu: &AckPdu, expected_crc_flag: CrcFlag, expected_dir: Direction) {
|
||||
assert_eq!(ack_pdu.condition_code(), ConditionCode::NoError);
|
||||
@ -320,7 +320,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature="serde")]
|
||||
#[cfg(feature = "serde")]
|
||||
fn test_ack_pdu_serialization() {
|
||||
let pdu_conf = common_pdu_conf(CrcFlag::WithCrc, LargeFileFlag::Normal);
|
||||
let pdu_header = PduHeader::new_no_file_data(pdu_conf, 0);
|
||||
@ -329,7 +329,6 @@ mod tests {
|
||||
ConditionCode::NoError,
|
||||
TransactionStatus::Active,
|
||||
);
|
||||
let output = to_allocvec(&ack_pdu).unwrap();
|
||||
assert_eq!(from_bytes::<AckPdu>(&output).unwrap(), ack_pdu);
|
||||
generic_serde_test(ack_pdu);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user