ChaiScript/unittests/json_4.chai
Glen Fraser 561c5bc981 Handle negative numbers in JSONParse::parse_number
- fix issue #334, where negative numbers loaded from JSON were being
  parsed as 0.
- add unit tests to cover these cases.
2017-03-14 12:01:51 +01:00

3 lines
82 B
ChaiScript

assert_equal(from_json("1.234"), 1.234)
assert_equal(from_json("-1.234"), -1.234)