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

Function testMultiParamRoundtrip

tests/runtime/map/runner.go:103–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101}
102
103func testMultiParamRoundtrip() {
104 names := test.NamesById{
105 1: "one",
106 2: "two",
107 }
108 bytes := test.BytesByName{
109 "key": {42},
110 }
111 ids, bytesOut := test.MultiParamRoundtrip(names, bytes)
112 assertEqual(len(ids), 2)
113 assertEqual(ids["one"], uint32(1))
114 assertEqual(ids["two"], uint32(2))
115 assertEqual(len(bytesOut), 1)
116 assertSliceEqual(bytesOut["key"], []uint8{42})
117}
118
119func testNestedRoundtrip() {
120 input := map[string]map[uint32]string{

Callers 1

RunFunction · 0.85

Calls 2

assertSliceEqualFunction · 0.85
assertEqualFunction · 0.70

Tested by

no test coverage detected