start adding tests
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 2023-06-12 15:52:10 +02:00
parent 99dbf9dc85
commit d9028d21da
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -436,7 +436,8 @@ impl<'first_name, 'second_name> FilestoreRequestTlv<'first_name, 'second_name> {
#[cfg(test)]
mod tests {
use crate::cfdp::tlv::{Tlv, TlvType, TlvTypeField};
use crate::cfdp::lv::Lv;
use crate::cfdp::tlv::{FilestoreRequestTlv, Tlv, TlvType, TlvTypeField};
use crate::cfdp::TlvLvError;
use crate::util::{UbfU8, UnsignedEnum};
@ -560,4 +561,12 @@ mod tests {
assert_eq!(tlv.len_value(), 1);
assert_eq!(tlv.len_full(), 3);
}
#[test]
fn test_fs_request_basic() {
let first_name = Lv::new_from_str("hello.txt").unwrap();
let fs_request = FilestoreRequestTlv::new_create_file(first_name);
assert!(fs_request.is_ok());
let fs_request = fs_request.unwrap();
}
}