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

Function testBytesRoundtrip

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

Source from the content-addressed store, hash-verified

36}
37
38func testBytesRoundtrip() {
39 input := test.BytesByName{
40 "hello": []uint8("world"),
41 "bin": {0, 1, 2},
42 }
43 result := test.BytesRoundtrip(input)
44 assertSliceEqual(result["hello"], []uint8("world"))
45 assertSliceEqual(result["bin"], []uint8{0, 1, 2})
46}
47
48func testEmptyRoundtrip() {
49 input := test.NamesById{}

Callers 1

RunFunction · 0.85

Calls 1

assertSliceEqualFunction · 0.85

Tested by

no test coverage detected