73c22de516
* 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.
24 lines
465 B
Plaintext
24 lines
465 B
Plaintext
logs
|
|
bin/json_process
|
|
suites/api/test_array
|
|
suites/api/test_chaos
|
|
suites/api/test_copy
|
|
suites/api/test_cpp
|
|
suites/api/test_dump
|
|
suites/api/test_dump_callback
|
|
suites/api/test_equal
|
|
suites/api/test_load
|
|
suites/api/test_load_callback
|
|
suites/api/test_loadb
|
|
suites/api/test_memory_funcs
|
|
suites/api/test_number
|
|
suites/api/test_object
|
|
suites/api/test_pack
|
|
suites/api/test_simple
|
|
suites/api/test_sprintf
|
|
suites/api/test_unpack
|
|
run-suites.log
|
|
run-suites.trs
|
|
test-suite.log
|
|
|