From 150ff3b8e5b7e4a3106cf050a8463364b5add667 Mon Sep 17 00:00:00 2001 From: Son Ho Date: Mon, 7 Feb 2022 13:44:04 +0100 Subject: Make minor modifications to the tests --- examples/misc/src/hashmap.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'examples/misc') diff --git a/examples/misc/src/hashmap.rs b/examples/misc/src/hashmap.rs index 47a1b150..e26ca582 100644 --- a/examples/misc/src/hashmap.rs +++ b/examples/misc/src/hashmap.rs @@ -173,6 +173,7 @@ fn test1() { hm.insert(0, 42); hm.insert(128, 18); hm.insert(1024, 138); + hm.insert(1056, 256); assert!(*hm.get(&128).unwrap() == 18); let x = hm.get_mut(&1024).unwrap(); *x = 56; @@ -180,4 +181,7 @@ fn test1() { assert!(hm.get(&10).is_none()); let x = hm.remove(&1024).unwrap(); assert!(x == 56); + assert!(*hm.get(&0).unwrap() == 42); + assert!(*hm.get(&128).unwrap() == 18); + assert!(*hm.get(&1056).unwrap() == 256); } -- cgit v1.2.3