mirror of https://bitbucket.org/ausocean/av.git
stream/mts/psi/descriptor_test.go: wrote test to check ProgramInfoLen func and descriptors func
This commit is contained in:
parent
3aa0efc16a
commit
5aff27ac4d
|
@ -107,6 +107,8 @@ func (m *Meta) Delete(key string) error {
|
||||||
return errKeyAbsent
|
return errKeyAbsent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Encode takes the meta data map and encods into a byte slice with header
|
||||||
|
// describing the version, length of data and data in TSV format.
|
||||||
func (m *Meta) Encode() []byte {
|
func (m *Meta) Encode() []byte {
|
||||||
m.enc = m.enc[:headSize]
|
m.enc = m.enc[:headSize]
|
||||||
|
|
||||||
|
|
|
@ -126,6 +126,7 @@ func TestDeleteAbsentKey(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TestEncode checks that we're getting the correct byte slice from Meta.Encode().
|
||||||
func TestEncode(t *testing.T) {
|
func TestEncode(t *testing.T) {
|
||||||
meta := NewMeta()
|
meta := NewMeta()
|
||||||
meta.Add(tstKey1, tstData1)
|
meta.Add(tstKey1, tstData1)
|
||||||
|
|
Loading…
Reference in New Issue