Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Jul 3, 2024
1 parent 5fddd61 commit 4a52242
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/cfdp/lv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit 4a52242

Please sign in to comment.