fix CI
This commit is contained in:
parent
5fddd61134
commit
4a5224274f
@ -178,9 +178,10 @@ impl<'data> Lv<'data> {
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod tests {
|
||||
use alloc::string::ToString;
|
||||
|
||||
use super::*;
|
||||
|
||||
use crate::cfdp::TlvLvError;
|
||||
use crate::ByteConversionError;
|
||||
use std::string::String;
|
||||
|
||||
@ -271,15 +272,11 @@ pub mod tests {
|
||||
let lv = Lv::new(&data_big);
|
||||
assert!(lv.is_err());
|
||||
let error = lv.unwrap_err();
|
||||
if let TlvLvDataTooLarge(size) = error {
|
||||
assert_eq!(size, u8::MAX as usize + 1);
|
||||
assert_eq!(
|
||||
error.to_string(),
|
||||
"data with size 256 larger than allowed 255 bytes"
|
||||
);
|
||||
} else {
|
||||
panic!("invalid exception {:?}", error)
|
||||
}
|
||||
assert_eq!(error.0, u8::MAX as usize + 1);
|
||||
assert_eq!(
|
||||
error.to_string(),
|
||||
"data with size 256 larger than allowed 255 bytes"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user