aboutsummaryrefslogtreecommitdiff
path: root/test/suites/api/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2020-09-01introduce new fixed-size key APIMaxim Zhukov1-0/+2
This commit added functions working with fixed-size strings (non null-terminated also). It's helpful for the following cases: * getting key from substring without copying to separate buffer (better perfomance) * using pure UTF-8 keys for the objets * hack: set binary structs as the keys (see test_binary_keys) added functions: * json_object_getn * json_object_setn * json_object_setn_nocheck * json_object_setn_new * json_object_setn_new_nocheck * json_object_deln * json_object_iter_key_len added iterators: * json_object_keylen_foreach * json_object_keylen_foreach_safe Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
2020-08-12sort tests by alpha orderMaxim Zhukov1-1/+1
Signed-off-by: Maxim Zhukov <mussitantesmortem@gmail.com>
2019-03-12Add runtime version checking functionsSean Bright1-1/+3
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/+2
* 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-0/+2
Fixes #392
2013-02-04Enable gcc specific flags in tests correctlyPetri Lehtinen1-1/+0
... and fix issues found.
2012-10-26Support building and testing with VPATH.Bert Wesarg1-1/+1
2012-03-22Add json_load_callback()Rogerz Zhang1-0/+1
2012-02-12Disribute the check-exports testsPetri Lehtinen1-1/+1
2011-06-30test file for new json_dump_callback functionJKL1-0/+2
2011-04-10Add json_loadb() for decoding possibly non null-terminated stringsPetri Lehtinen1-0/+2
Thanks to Jonathan Landis for the initial patch.
2011-02-17Add custom memory allocationPetri Lehtinen1-3/+5
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-1/+5
2010-06-12Remove the C++ interfacePetri Lehtinen1-3/+1
2010-05-20Merge branch '1.2'Petri Lehtinen1-0/+2
2010-05-14Zero the visited flag after encoding an empty array or objectPetri Lehtinen1-0/+2
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-21Merge branch 'c++-api'Petri Lehtinen1-1/+3
2010-01-21Distribute some missing filesPetri Lehtinen1-0/+2
2010-01-18integrate jansson.hpp into build and test suiteSean Middleditch1-1/+3
2009-12-31Add functions for shallow and deep copying JSON valuesPetri Lehtinen1-0/+2
2009-12-31Add equality test for JSON valuesPetri Lehtinen1-0/+1
2009-12-21Enhance testsPetri Lehtinen1-2/+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-0/+19