Skip to content

Commit cef1588

Browse files
authored
Update binary_as_string_codec_test.go
update jsoniter TestBinaryAsStringCodec test case
1 parent 21af30c commit cef1588

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

extra/binary_as_string_codec_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ func TestBinaryAsStringCodec(t *testing.T) {
2222
})
2323
t.Run("non safe set", func(t *testing.T) {
2424
should := require.New(t)
25-
output, err := jsoniter.Marshal([]byte{1, 2, 3, 15})
25+
output, err := jsoniter.Marshal([]byte{1, 2, 3, 15, 17})
2626
should.NoError(err)
27-
should.Equal(`"\\x01\\x02\\x03\\x0f"`, string(output))
27+
should.Equal(`"\\x01\\x02\\x03\\x0f\\x11"`, string(output))
2828
var val []byte
2929
should.NoError(jsoniter.Unmarshal(output, &val))
30-
should.Equal([]byte{1, 2, 3, 15}, val)
30+
should.Equal([]byte{1, 2, 3, 15, 17}, val)
3131
})
3232
}

0 commit comments

Comments
 (0)