1 #![cfg(feature = "heapsize_impl")]
2 
3 extern crate heapsize;
4 extern crate linked_hash_map;
5 
6 use linked_hash_map::LinkedHashMap;
7 use heapsize::HeapSizeOf;
8 
9 #[test]
empty()10 fn empty() {
11     assert_eq!(LinkedHashMap::<String, String>::new().heap_size_of_children(), 0);
12 }
13 
14 #[test]
nonempty()15 fn nonempty() {
16     let mut map = LinkedHashMap::new();
17     map.insert("hello".to_string(), "world".to_string());
18     map.insert("hola".to_string(), "mundo".to_string());
19     map.insert("bonjour".to_string(), "monde".to_string());
20     map.remove("hello");
21 
22     assert!(map.heap_size_of_children() != 0);
23 }
24