MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / test_large_map

Function test_large_map

tests/runtime/map/runner.rs:96–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94}
95
96fn 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
111fn test_multi_param_roundtrip() {
112 let mut names = NamesById::new();

Callers 1

runMethod · 0.85

Calls 2

newFunction · 0.85
insertMethod · 0.45

Tested by

no test coverage detected