Eric Haszlakiewicz
49c3721a5a
Unset NDEBUG so assert() is enabled in all tests. One more fix there when building with -DCMAKE_BUILD_TYPE=release.
3 years ago
Eric Haszlakiewicz
6ba1adf8ef
Include the tests and apps directories at the _end_, since order in the
cmake rules matters, and fix compile warnings now that we're building
those sources with all the regular flags.
3 years ago
Björn Esser
dd040ba446
tests: Fix test_double_serializer without thread-local storage.
5 years ago
dota17
8b162c4b89
clang-format the files
5 years ago
chenguoping
424b315ce0
pointer types discards qualifiers
5 years ago
chenguoping
1446572997
add testcases of object and token
5 years ago
Eric Haszlakiewicz
25aedddcdf
Fix memory leaks in test_double_serializer, and make sure all tests return 0 at the end of main().
5 years ago
Eric Haszlakiewicz
b1ad748842
Extend test_double_serializer to check NaN and Infinity handling.
5 years ago
Eric Haszlakiewicz
68abf12afa
Issue #498 : Fix a memory leak bug introduced in test_double_serializer in 485f2a02
by adding a json_object_put call.
6 years ago
Pierce Lopez
634900d270
tests: appease -Wwrite-strings
6 years ago
Eric Haszlakiewicz
485f2a02c7
Issue #486 : append a missing ".0" to negative double values too.
6 years ago
Eric Haszlakiewicz
d5da847f51
PR#394: don't always append the ".0" if the double value rounds to zero because some custom formats *will* include it (e.g. %.2f).
Also try to accomodate formats to explicitly exclude the decimal (e.g. %.0f).
7 years ago
Eric Haszlakiewicz
1a94c70336
Add a json_c_set_serialization_double_format() function to set the *library-wide* format for how doubles are written to a serialized JSON output.
8 years ago
Matthias Schiffer
c2b004ba0e
Make default double serializer ignore userdata again
The user might want to use the userdata for something different, so the
serializer should ignore it by default.
Explicitly setting the serializer to json_object_double_to_json_string will
still make it interpret the userdata as a format string.
9 years ago