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

Function TestDecodeInteger

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

Source from the content-addressed store, hash-verified

11)
12
13func TestDecodeInteger(t *testing.T) {
14 for _, tc := range internal.IntegerTestCases {
15 gotv := decodeInteger(getReader(tc.Binary))
16 if gotv != int64(tc.Val) {
17 t.Errorf("decodeInteger(0x%s)=0x%d, want: 0x%d",
18 hex.EncodeToString([]byte(tc.Binary)), gotv, tc.Val)
19 }
20 }
21}
22
23func TestDecodeString(t *testing.T) {
24 for _, tt := range encodeStringTests {

Callers

nothing calls this directly

Calls 2

decodeIntegerFunction · 0.85
getReaderFunction · 0.85

Tested by

no test coverage detected