aboutsummaryrefslogtreecommitdiff
path: root/test/.gitignore
AgeCommit message (Collapse)AuthorFilesLines
2024-03-21Refactor tests to work better with CMakePetri Lehtinen1-0/+1
2019-10-21Run clang-format with make checkPetri Lehtinen1-4/+0
2019-03-12Add runtime version checking functionsSean Bright1-0/+1
This patch adds two new exported functions: * `jansson_version_str` - Returns a human-readable version number * `jansson_version_cmp` - Returns an integer less than, equal to, or greater than zero if the runtime version of Jansson is found, respectively, to be less than, to match, or be greater than the provided major, minor, and micro.
2018-02-15Improve test coverage.Corey Farrell1-0/+1
* Test equality of different length strings. * Add tab to json_pack whitespace test. * Test json_sprintf with empty result and invalid UTF. * Test json_get_alloc_funcs with NULL arguments. * Test invalid arguments. * Add test_chaos to test allocation failure code paths. * Remove redundant json_is_string checks from json_string_equal and json_string_copy. Both functions are static and can only be called with a json string. Fixes to issues found by test_chaos: * Fix crash on OOM in pack_unpack.c:read_string(). * Unconditionally free string in string_create upon allocation failure. Update load.c:parse_value() to reflect this. This resolves a leak on allocation failure for pack_unpack.c:pack_string() and value.c:json_sprintf(). Although not visible from CodeCoverage these changes significantly increase branch coverage. Especially in src/value.c where we previously covered 67.4% of branches and now cover 96.3% of branches.
2018-02-09Add json_sprintf and json_vsprintfjson_sprintfPetri Lehtinen1-1/+2
Fixes #392
2016-09-07Added test files to .gitignoreYuriy Romanenko1-0/+4
2012-03-25Ignore the binary test_load_callbackRogerz1-0/+1
2011-06-30test file for new json_dump_callback functionJKL1-0/+1
2011-04-10Add json_loadb() for decoding possibly non null-terminated stringsPetri Lehtinen1-0/+1
Thanks to Jonathan Landis for the initial patch.
2011-02-17Add custom memory allocationPetri Lehtinen1-3/+4
Thanks to Basile Starynkevitch for the suggestion and initial patch. Thanks to Jonathan Landis and Deron Meranda for showing how this can be utilized for implementing secure memory operations.
2010-10-26Adds json_pack / json_unpack variadic functions.Graeme Smecher1-0/+2
2010-05-20Merge branch '1.2'Petri Lehtinen1-0/+1
2010-05-14Zero the visited flag after encoding an empty array or objectPetri Lehtinen1-0/+1
Encoding an empty array or object worked, but encoding it again (possibly after adding some items) failed, because the visited flag (used for detecting circular references) wasn't zeroed.
2010-01-18integrate jansson.hpp into build and test suiteSean Middleditch1-0/+1
2009-12-31Add functions for shallow and deep copying JSON valuesPetri Lehtinen1-0/+1
2009-12-31Add equality test for JSON valuesPetri Lehtinen1-0/+1
2009-12-21Enhance testsPetri Lehtinen1-1/+0
* Now that JSON_SORT_KEYS is implemented, take it into use with the valid and valid-strip suites. This is to ensure that the tests remain valid even if the string hash function is changed in the future. * Remove test_dump API test. Instead, implement the same tests more elegantly in the encoding-flags suite.
2009-12-16Refactor the test systemPetri Lehtinen1-10/+8
2009-11-04Merge branch '1.1'Petri Lehtinen1-0/+1
Conflicts: test/.gitignore test/testprogs/Makefile.am
2009-11-04dump: Revise whitespace usagePetri Lehtinen1-0/+1
- Never append newline to output - By default, add spaces between array and object items for more readable output - Introduce the flag JSON_COMPACT to not add the aforementioned spaces
2009-10-27json_load_file: Initialize the error struct properlyPetri Lehtinen1-0/+1
Failing to do this has the effect that the error message is not returned when the input file cannot be opened (e.g. if it doesn't exist). Thanks to Martin Vopatek for reporting.
2009-09-07test/.gitignore: Add testprogs/test_simplePetri Lehtinen1-0/+1
2009-08-24Add test for numbersPetri Lehtinen1-0/+1
2009-08-23Expand value test coveragePetri Lehtinen1-0/+2
2009-07-28Rename json_{load,dump} to json_{load,dump}_filePetri Lehtinen1-1/+1
2009-07-28Enhance test systemPetri Lehtinen1-0/+1
- Tests are now named - Testlogs are preserved between runs - Tests can be run through Valgrind Memcheck tool
2009-07-13Get rid of json_dumpfd and json_loadfdPetri Lehtinen1-1/+0
fdopen() makes supporting separate API for file descriptors useless. Supporting fd's also makes Jansson less portable.
2009-07-09Add some testsPetri Lehtinen1-0/+4