1
0
mirror of https://github.com/json-iterator/go.git synced 2024-11-30 08:36:43 +02:00
json-iterator/misc_tests
Ivan Boyarkin 6821bec9fa
jsoniter: Fix errors during reading integers from chunked io.Reader (#477)
This commit fixes bug in Iterator.assertInteger method if the next
conditions are met:
- Iterator reads data from `io.Reader`,
- expected value is `0` (zero)
- `Iterator.tail == Iterator.head + 1`
- `Iterator.tail < len(Iterator.buf)`
- value in the buffer after `Iterator.tail` is presented from the previous read and has '.' character.

Typical error which user cal see is:
- assertInteger: can not decode float as int, error found in #X byte of ...

Regression test added for checking the correct behaviour.

Fixes #476
2020-08-06 09:14:08 +08:00
..
jsoniter_array_test.go Don't marshal empty byte or uint8 slice as null 2019-06-03 16:19:17 +05:30
jsoniter_bool_test.go gofmt 2018-02-24 22:04:41 +08:00
jsoniter_float_test.go fix #365, return error for +inf -inf and NaN 2019-05-23 13:57:43 +08:00
jsoniter_int_test.go jsoniter: Fix errors during reading integers from chunked io.Reader (#477) 2020-08-06 09:14:08 +08:00
jsoniter_interface_test.go remove redundant dereferencing expressions 2018-09-13 21:51:59 +03:00
jsoniter_iterator_test.go gofmt 2018-02-24 22:04:41 +08:00
jsoniter_map_test.go Fixes #405 - Encode nil map into null 2019-09-19 13:11:30 +01:00
jsoniter_nested_test.go Limit nesting depth 2019-10-08 11:17:01 -04:00
jsoniter_null_test.go gofmt 2018-02-24 22:04:41 +08:00
jsoniter_object_test.go add more testcase 2020-01-16 17:17:18 +08:00
jsoniter_raw_message_test.go fix issue #469 2020-07-21 17:07:23 +08:00