aboutsummaryrefslogtreecommitdiffstats
path: root/pktline/encoder_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2015-10-23 12:05:02 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2015-10-23 12:05:02 +0200
commit214e1dca024fb6da5ed65564d2de734df5dc2127 (patch)
tree0c2805a0676006690a8053ae8ccee388ccfc83fe /pktline/encoder_test.go
parent70923099e61fa33f0bc5256d2f938fa44c4df10e (diff)
downloadgo-git-214e1dca024fb6da5ed65564d2de734df5dc2127.tar.gz
format/pktline: review and improving coverage
Diffstat (limited to 'pktline/encoder_test.go')
-rw-r--r--pktline/encoder_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/pktline/encoder_test.go b/pktline/encoder_test.go
deleted file mode 100644
index 091ad1c..0000000
--- a/pktline/encoder_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package pktline
-
-import (
- "io/ioutil"
-
- . "gopkg.in/check.v1"
-)
-
-type EncoderSuite struct{}
-
-var _ = Suite(&EncoderSuite{})
-
-func (s *EncoderSuite) TestEncode(c *C) {
- line, err := Encode([]byte("a\n"))
- c.Assert(err, IsNil)
- c.Assert(string(line), Equals, "0006a\n")
-}
-
-func (s *EncoderSuite) TestEncodeFromString(c *C) {
- line, err := EncodeFromString("a\n")
- c.Assert(err, IsNil)
- c.Assert(string(line), Equals, "0006a\n")
-}
-
-func (s *EncoderSuite) TestEncoder(c *C) {
- e := NewEncoder()
- e.AddLine("a")
- e.AddFlush()
- e.AddLine("b")
-
- r := e.GetReader()
- a, _ := ioutil.ReadAll(r)
- c.Assert(string(a), Equals, "0006a\n00000006b\n")
-}