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

Function testNestedRoundtrip

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

Source from the content-addressed store, hash-verified

117}
118
119func testNestedRoundtrip() {
120 input := map[string]map[uint32]string{
121 "group-a": {
122 1: "one",
123 2: "two",
124 },
125 "group-b": {
126 10: "ten",
127 },
128 }
129 result := test.NestedRoundtrip(input)
130 assertEqual(len(result), 2)
131 assertEqual(result["group-a"][1], "one")
132 assertEqual(result["group-a"][2], "two")
133 assertEqual(result["group-b"][10], "ten")
134}
135
136func testVariantRoundtrip() {
137 m := test.NamesById{1: "one"}

Callers 1

RunFunction · 0.85

Calls 2

NestedRoundtripMethod · 0.80
assertEqualFunction · 0.70

Tested by

no test coverage detected