Fix unwrap for proper json format

This commit is contained in:
Ethan Frey
2017-05-16 17:01:15 +02:00
parent f16f711992
commit ee200d998f
3 changed files with 6 additions and 7 deletions
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
data "github.com/tendermint/go-wire/data"
wire "github.com/tendermint/go-wire"
data "github.com/tendermint/go-wire/data"
)
type byter interface {
@@ -58,7 +58,7 @@ func checkWireJSON(t *testing.T, in interface{}, reader interface{}, typ byte) {
var err error
js := wire.JSONBytes(in)
btyp := fmt.Sprintf("[%d,", typ)
assert.True(t, strings.HasPrefix(string(js), btyp), string(js))
assert.True(t, strings.HasPrefix(string(js), btyp), string(js), btyp)
wire.ReadJSON(reader, js, &err)
require.Nil(t, err, "%+v", err)