summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSon Ho2022-02-07 13:44:04 +0100
committerSon Ho2022-02-07 13:44:04 +0100
commit150ff3b8e5b7e4a3106cf050a8463364b5add667 (patch)
treefed5049e8482ba5a8384b3dd8fd41ea2f6b3d3a4
parentb9e35316426f09d07810f4f7eff3ca2dddd1d264 (diff)
Make minor modifications to the tests
-rw-r--r--examples/misc/src/hashmap.rs4
1 files changed, 4 insertions, 0 deletions
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);
}