Skip to content

Commit

Permalink
types/json: migrate test-infra to testify (pingcap#26375)
Browse files Browse the repository at this point in the history
  • Loading branch information
tisonkun authored Jul 21, 2021
1 parent 9f1c6b8 commit e606342
Show file tree
Hide file tree
Showing 4 changed files with 369 additions and 291 deletions.
15 changes: 6 additions & 9 deletions types/json/binary_functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,17 @@ package json
import (
"testing"

. "github.com/pingcap/check"
"github.com/stretchr/testify/require"
)

var _ = Suite(&testJSONFuncSuite{})
func TestDecodeEscapedUnicode(t *testing.T) {
t.Parallel()

type testJSONFuncSuite struct{}

func (s *testJSONFuncSuite) TestDecodeEscapedUnicode(c *C) {
c.Parallel()
in := "597d"
r, size, err := decodeEscapedUnicode([]byte(in))
c.Assert(string(r[:]), Equals, "好\x00")
c.Assert(size, Equals, 3)
c.Assert(err, IsNil)
require.NoError(t, err)
require.Equal(t, "好\x00", string(r[:]))
require.Equal(t, 3, size)
}

func BenchmarkDecodeEscapedUnicode(b *testing.B) {
Expand Down
Loading

0 comments on commit e606342

Please sign in to comment.