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

Function TestDecodeNegativeCbor2Json

internal/cbor/decoder_test.go:263–271  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

261}
262
263func TestDecodeNegativeCbor2Json(t *testing.T) {
264 for _, tc := range negativeCborTestCases {
265 buf := bytes.NewBuffer([]byte{})
266 err := Cbor2JsonManyObjects(getReader(string(tc.Binary)), buf)
267 if err == nil || err.Error() != tc.errStr {
268 t.Errorf("Expected error got:%s, want:%s", err, tc.errStr)
269 }
270 }
271}
272
273func TestBinaryFmt(t *testing.T) {
274 tests := []struct {

Callers

nothing calls this directly

Calls 3

Cbor2JsonManyObjectsFunction · 0.85
getReaderFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected