diff options
-rw-r--r-- | pktline/decoder.go | 2 | ||||
-rw-r--r-- | pktline/decoder_test.go | 4 | ||||
-rw-r--r-- | pktline/encoder.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/pktline/decoder.go b/pktline/decoder.go index 194a3e6..db3fd72 100644 --- a/pktline/decoder.go +++ b/pktline/decoder.go @@ -7,7 +7,7 @@ import ( ) var ( - ErrUnderflow = errors.New("unexepected string length") + ErrUnderflow = errors.New("unexpected string length (underflow)") ErrInvalidHeader = errors.New("invalid header") ErrInvalidLen = errors.New("invalid length") ) diff --git a/pktline/decoder_test.go b/pktline/decoder_test.go index a0f85ce..7899cc8 100644 --- a/pktline/decoder_test.go +++ b/pktline/decoder_test.go @@ -25,7 +25,7 @@ func (s *DecoderSuite) TestReadLineBufferUnderflow(c *C) { j := &Decoder{strings.NewReader("00e7a\n")} line, err := j.ReadLine() - c.Assert(err, ErrorMatches, "unexepected string length") + c.Assert(err, Equals, ErrUnderflow) c.Assert(line, Equals, "") } @@ -33,7 +33,7 @@ func (s *DecoderSuite) TestReadLineBufferInvalidLen(c *C) { j := &Decoder{strings.NewReader("0001foo\n")} line, err := j.ReadLine() - c.Assert(err, ErrorMatches, "invalid length") + c.Assert(err, Equals, ErrInvalidLen) c.Assert(line, Equals, "") } diff --git a/pktline/encoder.go b/pktline/encoder.go index b439c54..9c00126 100644 --- a/pktline/encoder.go +++ b/pktline/encoder.go @@ -7,7 +7,7 @@ import ( ) var ( - ErrOverflow = errors.New("unexepected string length") + ErrOverflow = errors.New("unexpected string length (overflow)") ) type Encoder struct { |