File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ func tokenEnd(data []byte) int {
3131 }
3232 }
3333
34- return - 1
34+ return len ( data )
3535}
3636
3737// Find position of next character which is not whitespace
Original file line number Diff line number Diff line change @@ -39,6 +39,38 @@ type GetTest struct {
3939}
4040
4141var getTests = []GetTest {
42+ // Trivial tests
43+ GetTest {
44+ desc : "read string" ,
45+ json : `""` ,
46+ isFound : true ,
47+ data : `` ,
48+ },
49+ GetTest {
50+ desc : "read number" ,
51+ json : `0` ,
52+ isFound : true ,
53+ data : `0` ,
54+ },
55+ GetTest {
56+ desc : "read object" ,
57+ json : `{}` ,
58+ isFound : true ,
59+ data : `{}` ,
60+ },
61+ GetTest {
62+ desc : "read array" ,
63+ json : `[]` ,
64+ isFound : true ,
65+ data : `[]` ,
66+ },
67+ GetTest {
68+ desc : "read boolean" ,
69+ json : `true` ,
70+ isFound : true ,
71+ data : `true` ,
72+ },
73+
4274 // Found key tests
4375 GetTest {
4476 desc : "handling multiple nested keys with same name" ,
You can’t perform that action at this time.
0 commit comments