forked from mirror/go-json
Modify section of comment out
This commit is contained in:
parent
24cc1b77b2
commit
aa0422c239
|
@ -376,25 +376,26 @@ var tokenStreamCases = []tokenStreamCase{
|
||||||
map[string]interface{}{"a": float64(1)},
|
map[string]interface{}{"a": float64(1)},
|
||||||
}},
|
}},
|
||||||
json.Delim('}')}},
|
json.Delim('}')}},
|
||||||
{json: ` [{"a": 1} {"a": 2}] `, expTokens: []interface{}{
|
/*
|
||||||
json.Delim('['),
|
{json: ` [{"a": 1} {"a": 2}] `, expTokens: []interface{}{
|
||||||
decodeThis{map[string]interface{}{"a": float64(1)}},
|
json.Delim('['),
|
||||||
decodeThis{json.NewSyntaxError("expected comma after array element", 11)},
|
decodeThis{map[string]interface{}{"a": float64(1)}},
|
||||||
}},
|
decodeThis{json.NewSyntaxError("expected comma after array element", 11)},
|
||||||
{json: `{ "` + strings.Repeat("a", 513) + `" 1 }`, expTokens: []interface{}{
|
}},
|
||||||
json.Delim('{'), strings.Repeat("a", 513),
|
{json: `{ "` + strings.Repeat("a", 513) + `" 1 }`, expTokens: []interface{}{
|
||||||
decodeThis{json.NewSyntaxError("expected colon after object key", 518)},
|
json.Delim('{'), strings.Repeat("a", 513),
|
||||||
}},
|
decodeThis{json.NewSyntaxError("expected colon after object key", 518)},
|
||||||
{json: `{ "\a" }`, expTokens: []interface{}{
|
}},
|
||||||
json.Delim('{'),
|
{json: `{ "\a" }`, expTokens: []interface{}{
|
||||||
json.NewSyntaxError("invalid character 'a' in string escape code", 3),
|
json.Delim('{'),
|
||||||
}},
|
json.NewSyntaxError("invalid character 'a' in string escape code", 3),
|
||||||
{json: ` \a`, expTokens: []interface{}{
|
}},
|
||||||
json.NewSyntaxError("invalid character '\\\\' looking for beginning of value", 1),
|
{json: ` \a`, expTokens: []interface{}{
|
||||||
}},
|
json.NewSyntaxError("invalid character '\\\\' looking for beginning of value", 1),
|
||||||
|
}},
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
func TestDecodeInStream(t *testing.T) {
|
func TestDecodeInStream(t *testing.T) {
|
||||||
for ci, tcase := range tokenStreamCases {
|
for ci, tcase := range tokenStreamCases {
|
||||||
|
|
||||||
|
@ -429,7 +430,6 @@ func TestDecodeInStream(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
// Test from golang.org/issue/11893
|
// Test from golang.org/issue/11893
|
||||||
func TestHTTPDecoding(t *testing.T) {
|
func TestHTTPDecoding(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue