jsoncpp/test
Tero Kinnunen 2d55c7445f
Parse large floats as infinity (#1349) (#1353)
Return 1.9.1 functionality where values too large to fit in
double are converted to positive or negative infinity.

Commit 645cd04 changed functionality so that large floats cause
parse error, while version 1.9.1 accepted them as infinite.
This is problematic because writer outputs infinity values
as `1e+9999`, which could no longer be parsed back.

Fixed also legacy Reader even though it did not parse large values
even before breaking change, due to problematic output/parse asymmetry.

`>>` operator sets value to numeric_limits::max/lowest value if
representation is too large to fit to double. [1][2] In macos
value appears to be parsed to infinity.

> | value in *val*           | description |
> |--------------------------|-------------|
> | numeric_limits::max()    | The sequence represents a value too large for the type of val |
> | numeric_limits::lowest() | The sequence represents a value too large negative for the type of val |

[1] https://www.cplusplus.com/reference/istream/istream/operator%3E%3E/
[2] https://www.cplusplus.com/reference/locale/num_get/get/

Signed-off-by: Tero Kinnunen <tero.kinnunen@vaisala.com>

Co-authored-by: Tero Kinnunen <tero.kinnunen@vaisala.com>
2021-12-14 18:00:28 -08:00
..
data Parse large floats as infinity (#1349) (#1353) 2021-12-14 18:00:28 -08:00
jsonchecker Switched CRLF to LF in repo, and added svn:eol-style native. I might have missed a few files though. Just committing what I have so far. 2011-06-21 21:18:49 +00:00
cleantests.py Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing. 2017-07-21 03:44:36 -07:00
generate_expected.py Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing. 2017-07-21 03:44:36 -07:00
pyjsontestrunner.py Remove trailing space characters (#1256) 2021-01-09 22:39:07 -06:00
runjsontests.py Cleanup test configurations 2020-04-24 12:43:17 -05:00
rununittests.py Restore BL's authorship attribution, and add "The Jsoncpp Authors" where it was missing. 2017-07-21 03:44:36 -07:00