update to latest micro, optimize flatten
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -28,7 +28,7 @@ func TestFrameFlatten(t *testing.T) {
|
||||
Name: &codec.Frame{Data: []byte("test")},
|
||||
}
|
||||
|
||||
buf, err := NewCodec().Marshal(s)
|
||||
buf, err := NewCodec(codec.Flatten(true)).Marshal(s)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func TestStructByTag(t *testing.T) {
|
||||
|
||||
val := &Str{Name: []string{"first", "second"}}
|
||||
|
||||
c := NewCodec()
|
||||
c := NewCodec(codec.Flatten(true))
|
||||
buf, err := c.Marshal(val)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -60,15 +60,3 @@ func TestStructByTag(t *testing.T) {
|
||||
t.Fatalf("invalid unmarshal: %v", nval)
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user