change tests such that they are covered by coverage reports

This commit is contained in:
Marten Seemann
2016-06-06 23:47:18 +07:00
parent c4c7b78288
commit 3963e7eb03
12 changed files with 57 additions and 72 deletions

View File

@@ -1,4 +1,4 @@
package qerr_test
package qerr
import (
"go/ast"
@@ -7,8 +7,6 @@ import (
"os"
"strconv"
"github.com/lucas-clemente/quic-go/qerr"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
@@ -28,8 +26,8 @@ var _ = Describe("error codes", func() {
valString := c.(*ast.ValueSpec).Values[0].(*ast.BasicLit).Value
val, err := strconv.Atoi(valString)
Expect(err).NotTo(HaveOccurred())
Expect(qerr.ErrorCode(val).String()).To(Equal(name))
Expect(ErrorCode(val).String()).To(Equal(name))
}
Expect(qerr.ErrorCode(0).String()).To(Equal("ErrorCode(0)"))
Expect(ErrorCode(0).String()).To(Equal("ErrorCode(0)"))
})
})