From 3b91abb1c15308e806806de6a36435f1b53c0b6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Thu, 15 Feb 2024 19:02:39 +0100 Subject: [PATCH] Test get_latest_ikm_empty on an empty IKM list --- src/ikm.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/ikm.rs b/src/ikm.rs index 0f368d5..946c85e 100644 --- a/src/ikm.rs +++ b/src/ikm.rs @@ -286,6 +286,14 @@ mod tests { 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] #[cfg(feature = "encryption")] fn get_ikm_by_id() {