Test get_latest_ikm_empty on an empty IKM list

This commit is contained in:
Rodolphe Bréard 2024-02-15 19:02:39 +01:00
parent 5cd3969b5b
commit 3b91abb1c1

View file

@ -286,6 +286,14 @@ mod tests {
assert_eq!(latest_ikm.id, 3); assert_eq!(latest_ikm.id, 3);
} }
#[test]
#[cfg(feature = "encryption")]
fn get_latest_ikm_empty() {
let mut lst = InputKeyMaterialList::new();
let res = lst.get_latest_ikm();
assert!(res.is_err());
}
#[test] #[test]
#[cfg(feature = "encryption")] #[cfg(feature = "encryption")]
fn get_ikm_by_id() { fn get_ikm_by_id() {