You've already forked json-iterator
mirror of
https://github.com/json-iterator/go.git
synced 2025-06-15 22:50:24 +02:00
Formated, doced. Also fixed few minor bugs.
This commit is contained in:
@ -1,16 +1,16 @@
|
||||
package jsoniter
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"reflect"
|
||||
"fmt"
|
||||
"reflect"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_read_map(t *testing.T) {
|
||||
iter := ParseString(`{"hello": "world"}`)
|
||||
m := map[string]string{"1": "2"}
|
||||
iter.Read(&m)
|
||||
copy(iter.buf, []byte{0,0,0,0,0,0})
|
||||
copy(iter.buf, []byte{0, 0, 0, 0, 0, 0})
|
||||
if !reflect.DeepEqual(map[string]string{"1": "2", "hello": "world"}, m) {
|
||||
fmt.Println(iter.Error)
|
||||
t.Fatal(m)
|
||||
|
Reference in New Issue
Block a user