(t *testing.T)
| 1311 | } |
| 1312 | |
| 1313 | func TestNumFloatString(t *testing.T) { |
| 1314 | var i int64 = -9007199254740993 |
| 1315 | j := fmt.Sprintf(`{"data":[ "hello", %d ]}`, i) //No quotes around value!! |
| 1316 | res := Get(j, "data.1") |
| 1317 | if res.String() != "-9007199254740993" { |
| 1318 | t.Fatalf("expected '%v', got '%v'", "-9007199254740993", res.String()) |
| 1319 | } |
| 1320 | } |
| 1321 | |
| 1322 | func TestDuplicateKeys(t *testing.T) { |
| 1323 | // this is valid json according to the JSON spec |