func TestAllHeadersLoadable(t *testing.T) { assert := assert.On(t) noopAuth, err := CreatePacketHeader((*noop.Config)(nil)) assert.Error(err).IsNil() assert.Int(noopAuth.Size()).Equals(0) srtp, err := CreatePacketHeader((*srtp.Config)(nil)) assert.Error(err).IsNil() assert.Int(srtp.Size()).Equals(4) utp, err := CreatePacketHeader((*utp.Config)(nil)) assert.Error(err).IsNil() assert.Int(utp.Size()).Equals(4) }
func TestAllHeadersLoadable(t *testing.T) { assert := assert.On(t) noopAuth, err := CreatePacketHeader(serial.GetMessageType(new(noop.Config)), nil) assert.Error(err).IsNil() assert.Int(noopAuth.Size()).Equals(0) srtp, err := CreatePacketHeader(serial.GetMessageType(new(srtp.Config)), nil) assert.Error(err).IsNil() assert.Int(srtp.Size()).Equals(4) utp, err := CreatePacketHeader(serial.GetMessageType(new(utp.Config)), nil) assert.Error(err).IsNil() assert.Int(utp.Size()).Equals(4) }