MCPcopy Create free account
hub / github.com/pion/rtcp / TestEncode

Function TestEncode

extended_report_test.go:225–235  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

223}
224
225func TestEncode(t *testing.T) {
226 expected := encodedPacket()
227 packet := testPacket()
228 rawPacket, err := packet.Marshal()
229 assert.NoError(t, err)
230 assert.Equal(t, len(expected), len(rawPacket), "Encoded message length does not match expected length")
231
232 for i := range rawPacket {
233 assert.Equalf(t, expected[i], rawPacket[i], "Byte %d of encoded packet does not match", i)
234 }
235}
236
237func TestDecode(t *testing.T) {
238 encoded := encodedPacket()

Callers

nothing calls this directly

Calls 3

encodedPacketFunction · 0.85
testPacketFunction · 0.85
MarshalMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…