From adbd06987585be8f7948d4824117f8cbe79225e0 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Mon, 12 Apr 2021 17:15:45 +0300 Subject: [PATCH] add test file Signed-off-by: Vasiliy Tolstov --- json/codec_test.go | 18 ++++++++++++++++++ proto/codec_test.go | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 json/codec_test.go create mode 100644 proto/codec_test.go diff --git a/json/codec_test.go b/json/codec_test.go new file mode 100644 index 0000000..6f3efa0 --- /dev/null +++ b/json/codec_test.go @@ -0,0 +1,18 @@ +package json + +import ( + "bytes" + "testing" +) + +func TestReadBody(t *testing.T) { + s := &struct { + Name string + }{} + c := NewCodec() + b := bytes.NewReader(nil) + err := c.ReadBody(b, s) + if err != nil { + t.Fatal(err) + } +} diff --git a/proto/codec_test.go b/proto/codec_test.go new file mode 100644 index 0000000..c391d48 --- /dev/null +++ b/proto/codec_test.go @@ -0,0 +1,19 @@ +package proto + +import ( + "bytes" + "testing" +) + +func TestReadBody(t *testing.T) { + t.Skip("no proto generated") + s := &struct { + Name string + }{} + c := NewCodec() + b := bytes.NewReader(nil) + err := c.ReadBody(b, s) + if err != nil { + t.Fatal(err) + } +}