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