Skip to content

Commit

Permalink
Add a test for #7
Browse files Browse the repository at this point in the history
  • Loading branch information
kimor79 committed Jun 17, 2015
1 parent 5f16e8c commit 61d0dee
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions gollectd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

type FormatTests struct {
Expand Down Expand Up @@ -163,6 +164,17 @@ func TestPackets(t *testing.T) {
}
}

func TestPacketsShort(t *testing.T) {
var err error

require.NotPanics(t, func() {
short := []byte("ab")
_, err = Packets(short, typesDB)
})

assert.NotNil(t, err)
}

var result *[]Packet

func BenchmarkPackets(b *testing.B) {
Expand Down

0 comments on commit 61d0dee

Please sign in to comment.