Skip to content

Commit

Permalink
Test for bad FrameCommand values
Browse files Browse the repository at this point in the history
  • Loading branch information
dustin committed Oct 9, 2014
1 parent fbed386 commit 33b8d29
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pkt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ func TestErrorStringing(t *testing.T) {
}
}

func TestBadFrameString(t *testing.T) {
c := FrameCmd(42)
got := c.String()
want := "{FrameCommand 0x2a}"
if want != got {
t.Errorf("Wanted %q, got %q", want, got)
}
}

func benchEncoding(b *testing.B, size int) {
pkt := FramePacket{
Cmd: FrameData,
Expand Down

0 comments on commit 33b8d29

Please sign in to comment.