()
| 94 | } |
| 95 | |
| 96 | fn test_large_map() { |
| 97 | let mut input = NamesById::new(); |
| 98 | for i in 0..100 { |
| 99 | input.insert(i, format!("value-{i}")); |
| 100 | } |
| 101 | let result = large_roundtrip(&input); |
| 102 | assert_eq!(result.len(), 100); |
| 103 | for i in 0..100 { |
| 104 | assert_eq!( |
| 105 | result.get(&i).map(String::as_str), |
| 106 | Some(format!("value-{i}").as_str()), |
| 107 | ); |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | fn test_multi_param_roundtrip() { |
| 112 | let mut names = NamesById::new(); |