MCPcopy
hub / github.com/rs/zerolog / TestAppendBytes

Function TestAppendBytes

internal/json/bytes_test.go:12–19  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

10var enc = Encoder{}
11
12func TestAppendBytes(t *testing.T) {
13 for _, tt := range internal.EncodeStringTests {
14 b := enc.AppendBytes([]byte{}, []byte(tt.In))
15 if got, want := string(b), tt.Out; got != want {
16 t.Errorf("appendBytes(%q) = %#q, want %#q", tt.In, got, want)
17 }
18 }
19}
20
21func TestAppendHex(t *testing.T) {
22 for _, tt := range internal.EncodeHexTests {

Callers

nothing calls this directly

Calls 1

AppendBytesMethod · 0.65

Tested by

no test coverage detected