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

Function TestAppendStringers

internal/cbor/string_test.go:164–177  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

162}
163
164func TestAppendStringers(t *testing.T) {
165 for _, tt := range internal.EncodeStringersTests {
166 want := make([]byte, 0)
167 want = append(want, []byte(tt.Binary)...)
168
169 got := enc.AppendStringers([]byte{}, tt.In)
170 if !bytes.Equal(got, want) {
171 t.Errorf("AppendStrings(%v)\ngot: %s\nwant: %s",
172 tt,
173 hex.EncodeToString(got),
174 hex.EncodeToString(want))
175 }
176 }
177}
178
179func TestAppendBytes(t *testing.T) {
180 for _, tt := range encodeByteTests {

Callers

nothing calls this directly

Calls 1

AppendStringersMethod · 0.45

Tested by

no test coverage detected