Coverage Update #47
@ -1141,6 +1141,22 @@ mod tests {
|
|||||||
assert!(fs_msg_empty.is_empty());
|
assert!(fs_msg_empty.is_empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_fs_response_deserialization() {
|
||||||
|
let lv_0 = Lv::new_from_str(TLV_TEST_STR_0).unwrap();
|
||||||
|
let response = FilestoreResponseTlv::new_no_filestore_message(
|
||||||
|
FilestoreActionCode::CreateFile,
|
||||||
|
0b0001,
|
||||||
|
lv_0,
|
||||||
|
None,
|
||||||
|
)
|
||||||
|
.expect("creating response failed");
|
||||||
|
let mut buf: [u8; 32] = [0; 32];
|
||||||
|
response.write_to_bytes(&mut buf).unwrap();
|
||||||
|
let response_read_back = FilestoreResponseTlv::from_bytes(&buf).unwrap();
|
||||||
|
assert_eq!(response_read_back, response);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_entity_it_tlv_to_tlv() {
|
fn test_entity_it_tlv_to_tlv() {
|
||||||
let entity_id = UbfU16::new(0x0102);
|
let entity_id = UbfU16::new(0x0102);
|
||||||
|
Loading…
Reference in New Issue
Block a user