MCPcopy
hub / github.com/vmihailenco/msgpack / TestLargeString

Method TestLargeString

msgpack_test.go:68–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66}
67
68func (t *MsgpackTest) TestLargeString() {
69 N := int(1e6)
70
71 src := string(bytes.Repeat([]byte{'1'}, N))
72 t.Nil(t.enc.Encode(src))
73 var dst string
74 t.Nil(t.dec.Decode(&dst))
75 t.Equal(dst, src)
76}
77
78func (t *MsgpackTest) TestSliceOfStructs() {
79 in := []*nameStruct{{"hello"}}

Callers

nothing calls this directly

Calls 2

EncodeMethod · 0.80
DecodeMethod · 0.80

Tested by

no test coverage detected