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

Function testRecordRoundtrip

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

Source from the content-addressed store, hash-verified

63}
64
65func testRecordRoundtrip() {
66 entry := test.LabeledEntry{
67 Label: "test-label",
68 Values: test.NamesById{
69 10: "ten",
70 20: "twenty",
71 },
72 }
73 result := test.RecordRoundtrip(entry)
74 assertEqual(result.Label, "test-label")
75 assertEqual(len(result.Values), 2)
76 assertEqual(result.Values[10], "ten")
77 assertEqual(result.Values[20], "twenty")
78}
79
80func testInlineRoundtrip() {
81 input := map[uint32]string{

Callers 1

RunFunction · 0.85

Calls 1

assertEqualFunction · 0.70

Tested by

no test coverage detected