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

Function test_inline_roundtrip

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

Source from the content-addressed store, hash-verified

84}
85
86fn test_inline_roundtrip() {
87 let mut input = wit_bindgen::rt::Map::new();
88 input.insert(1, "one".to_string());
89 input.insert(2, "two".to_string());
90 let result = inline_roundtrip(&input);
91 assert_eq!(result.len(), 2);
92 assert_eq!(result.get("one"), Some(&1));
93 assert_eq!(result.get("two"), Some(&2));
94}
95
96fn test_large_map() {
97 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