1
0
mirror of https://github.com/json-iterator/go.git synced 2024-11-27 08:30:57 +02:00

add array to int

This commit is contained in:
Xargin 2017-07-04 00:29:11 +08:00
parent 402c6c79e2
commit d8dbf14af4

View File

@ -26,6 +26,10 @@ var intConvertMap = map[string]int{
`"123true"`: 123,
`"1.2332e6"`: 1,
`""`: 0,
"+": 0,
"-": 0,
"[]": 0,
"[1,2]": 1,
}
func Test_read_any_to_int(t *testing.T) {
@ -67,6 +71,10 @@ var uintConvertMap = map[string]int{
`"123true"`: 123,
`"1.2332e6"`: 1,
`""`: 0,
"+": 0,
"-": 0,
"[]": 0,
"[1,2]": 1,
// TODO need to solve
//"-1.1": 1,
//"-321.1": 321,