improve utils tests to 100% coverage

This commit is contained in:
Lucas Clemente
2016-05-28 08:12:04 +02:00
parent a4773eb5ff
commit 576253ba71
5 changed files with 56 additions and 19 deletions

View File

@@ -2,6 +2,7 @@ package utils
import (
"bytes"
"io"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
@@ -66,6 +67,11 @@ var _ = Describe("float16", func() {
}
})
It("errors on eof", func() {
_, err := ReadUfloat16(&bytes.Buffer{})
Expect(err).To(MatchError(io.EOF))
})
It("writes", func() {
testcases := []struct {
decoded uint64