stream/mts/psi/descriptor_test.go: wrote test to check ProgramInfoLen func and descriptors func

This commit is contained in:
saxon 2019-01-29 10:40:22 +10:30
parent 3aa0efc16a
commit 5aff27ac4d
2 changed files with 3 additions and 0 deletions

View File

@ -107,6 +107,8 @@ func (m *Meta) Delete(key string) error {
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 {
m.enc = m.enc[:headSize]

View File

@ -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) {
meta := NewMeta()
meta.Add(tstKey1, tstData1)