()
| 178 | } |
| 179 | |
| 180 | fn test_tuple_roundtrip() { |
| 181 | let mut map = NamesById::new(); |
| 182 | map.insert(7, "seven".to_string()); |
| 183 | let (result_map, result_num) = tuple_roundtrip((&map, 42)); |
| 184 | assert_eq!(result_map.len(), 1); |
| 185 | assert_eq!(result_map.get(&7).map(String::as_str), Some("seven")); |
| 186 | assert_eq!(result_num, 42); |
| 187 | } |
| 188 | |
| 189 | fn test_single_entry_roundtrip() { |
| 190 | let mut input = NamesById::new(); |