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

Function test_tuple_roundtrip

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

Source from the content-addressed store, hash-verified

178}
179
180fn 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
189fn test_single_entry_roundtrip() {
190 let mut input = NamesById::new();

Callers 1

runMethod · 0.70

Calls 3

newFunction · 0.85
insertMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected