MCPcopy Create free account
hub / github.com/segmentio/encoding / TestDecodeFixture

Function TestDecodeFixture

proto/message_test.go:126–133  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

124}
125
126func TestDecodeFixture(t *testing.T) {
127 m := loadProtobuf(t, "message.pb")
128 m = assertParse(t, m, 1, Varint, makeVarint(10))
129 m = assertParse(t, m, 2, Varint, makeVarint(20))
130 m = assertParse(t, m, 3, Varint, makeVarint(30))
131 m = assertParse(t, m, 4, Varlen, []byte("Hello World!"))
132 assertEmpty(t, m)
133}
134
135func assertParse(t *testing.T, m RawMessage, f FieldNumber, w WireType, b []byte) RawMessage {
136 t.Helper()

Callers

nothing calls this directly

Calls 4

loadProtobufFunction · 0.85
assertParseFunction · 0.85
makeVarintFunction · 0.85
assertEmptyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…