1
0
mirror of https://github.com/json-iterator/go.git synced 2025-06-15 22:50:24 +02:00

#53 extract out config

This commit is contained in:
Tao Wen
2017-06-13 16:58:53 +08:00
parent 788918b85d
commit acddcf5bbf
33 changed files with 328 additions and 300 deletions

View File

@ -7,7 +7,7 @@ import (
)
func Test_read_by_one(t *testing.T) {
iter := Parse(bytes.NewBufferString("abc"), 1)
iter := Parse(DEFAULT_CONFIG, bytes.NewBufferString("abc"), 1)
b := iter.readByte()
if iter.Error != nil {
t.Fatal(iter.Error)
@ -34,7 +34,7 @@ func Test_read_by_one(t *testing.T) {
}
func Test_read_by_two(t *testing.T) {
iter := Parse(bytes.NewBufferString("abc"), 2)
iter := Parse(DEFAULT_CONFIG, bytes.NewBufferString("abc"), 2)
b := iter.readByte()
if iter.Error != nil {
t.Fatal(iter.Error)
@ -67,7 +67,7 @@ func Test_read_by_two(t *testing.T) {
}
func Test_read_until_eof(t *testing.T) {
iter := Parse(bytes.NewBufferString("abc"), 2)
iter := Parse(DEFAULT_CONFIG, bytes.NewBufferString("abc"), 2)
iter.readByte()
iter.readByte()
b := iter.readByte()