Skip to content

Commit

Permalink
test: add test for avc SliceType strings
Browse files Browse the repository at this point in the history
  • Loading branch information
tobbee committed Nov 10, 2024
1 parent f95983d commit 2db322d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions avc/slice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,27 @@ func TestSliceTypeParser(t *testing.T) {
}
}

func TestSliceTypeStrings(t *testing.T) {
cases := []struct {
sliceType SliceType
want string
}{
{SLICE_P, "P"},
{SLICE_B, "B"},
{SLICE_I, "I"},
{SLICE_SP, "SP"},
{SLICE_SI, "SI"},
{SliceType(12), ""},
}
for _, c := range cases {
got := c.sliceType.String()
if got != c.want {
t.Errorf("got %s want %s", got, c.want)
}
}

}

func TestParseSliceHeader_BlackFrame(t *testing.T) {
wantedHdr := SliceHeader{
SliceType: 7,
Expand Down

0 comments on commit 2db322d

Please sign in to comment.