Merge pull request 'added small defmt test' (#88) from added-small-defmt-test into main
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
Reviewed-on: #88
This commit is contained in:
commit
5f37978c56
14
src/lib.rs
14
src/lib.rs
@ -894,6 +894,8 @@ pub mod zc {
|
||||
pub(crate) mod tests {
|
||||
use std::collections::HashSet;
|
||||
|
||||
#[allow(unused_imports)]
|
||||
use crate::ByteConversionError;
|
||||
#[cfg(feature = "serde")]
|
||||
use crate::CcsdsPrimaryHeader;
|
||||
use crate::{
|
||||
@ -1267,4 +1269,16 @@ pub(crate) mod tests {
|
||||
let sp_header = SpHeader::new_from_apid_checked(0x03).unwrap();
|
||||
assert_eq!(sp_header.apid(), 0x03);
|
||||
}
|
||||
|
||||
#[cfg(feature = "defmt")]
|
||||
fn is_defmt_format<T: defmt::Format>(_t: T) {}
|
||||
|
||||
#[test]
|
||||
#[cfg(feature = "defmt")]
|
||||
fn test_defmt_format() {
|
||||
is_defmt_format(ByteConversionError::ToSliceTooSmall {
|
||||
found: 1,
|
||||
expected: 2,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user