Commit Graph

14 Commits

Author SHA1 Message Date
Cory Quammen
fd06bfca79 Removed unneeded newlines from parsed comments
Newlines from comments separated by lines are retained when comments
are appended, so adding a newline between separate comments for a
node is not needed.
2014-10-09 16:33:29 -04:00
Cory Quammen
4d23492d11 Added printing of comments to *.actual test files
This enables testing of comment-handling code. Updated *.expected test
result files to account for printing of comments.
2014-10-09 16:33:29 -04:00
Christopher Dunn
09439b7bc7 Comment reading/write improvements
This patch fixes some aspects of reading and writing comments:
- Multiple C++-style comments before a Json value had extra newlines appended to them. This patch removes the addition of those newlines.
- Comments written before Json values in the StyledWriter were not indented to match the indentation level of the value. This patch adds indentation to comments.
- Fixed inconsistency in newlines following C- and C++-style comments being saved as part of the comment. All newlines at the end of a comment are now removed.
- Added an additional test of comments.

https://sourceforge.net/p/jsoncpp/patches/25/
2014-04-19 21:19:24 +00:00
Christopher Dunn
468564b3fe More eol changes. 2011-06-21 21:53:02 +00:00
Aaron Jacobs
4b819c2309 Added a few test cases that Google is using internally for patches made
in the past.
2011-05-26 06:58:14 +00:00
Aaron Jacobs
ae9ffb5443 Fixed a parsing bug in decodeNumber, updating the failing test cases to be
correct in the process. (The test cases incorrectly used exact integers instead
of scientific notation.)
2011-05-24 03:59:24 +00:00
Aaron Jacobs
e656c5fa2d Added some test cases that catch a parsing bug. 2011-05-24 03:19:50 +00:00
Baptiste Lepilleur
9c98f2277b Fixed bug #3139677: JSON [1 2 3] was incorrectly parsed as [1, 3]. Error is now correctly detected.
Modified runjsontests.py to allow test that expect failure in jsoncpp test suite.
2011-05-01 15:40:47 +00:00
Baptiste Lepilleur
402c13eb3d - added unit test and roadmap for handling of escape sequence "\/" 2010-04-27 16:37:50 +00:00
Baptiste Lepilleur
201fb2cf0d - Moved definition of Json::Int and Json::UInt to config.h which compiler detection logic to define them to 64 bits integer if JSON_NO_INT64 is not defined.
- Added Json::ArrayIndex as an unsigned int to forwards.h
- Modified Json::Value to consistently use Json::ArrayIndex.
- Added int/unsigned int constructor overload to Json::Value to avoid ambiguous constructor call.
- Modified jsontestrunner/main.cpp to use Json::valueToString for Value::asInt() conversion to string.
- Modified Json::Reader to only overflow to double when the number is too large (previous code relied on the fact that an int fitted in a double without precision loss).
- Generalized uintToString() helpers and buffer size to automatically adapt to the precision of Json::UInt.
- Added specific conversion logic for UInt to double conversion on Microsoft Visual Studio 6 which only support __int64 to double conversion (unsigned __int64 conversion is not supported)
- Added test for 64 bits parsing/writing. Notes: those will fail when compiled with JSON_NO_INT64 (more dev required to adapt).
2010-04-19 07:37:41 +00:00
Baptiste Lepilleur
7a866553bb - added a large test that cause(d?) crash with experimental JSON_VALUE_USE_INTERNAL_MAP 2010-02-21 10:44:12 +00:00
Baptiste Lepilleur
a894f775bb - fixed failing test 2010-02-19 05:09:54 +00:00
Baptiste Lepilleur
2bcfb63362 Added another failing unicode test case 2009-11-26 10:52:18 +00:00
Baptiste Lepilleur
7dec64f57e Moved jsontestrunner data from test/ to test/data. 2009-11-21 18:20:25 +00:00