jansson/test/suites/api
Corey Farrell 73c22de516 Improve test coverage.
* 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-15 10:12:31 -05:00
..
check-exports check-exports test: Filter out symbols that start with an underscore 2013-02-05 12:48:38 +02:00
Makefile.am Improve test coverage. 2018-02-15 10:12:31 -05:00
run Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_array.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_chaos.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_copy.c Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_dump_callback.c Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_dump.c Add JSON_EMBED encoding flag 2017-02-27 15:09:03 -05:00
test_equal.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_load_callback.c Document and tweak json_load_callback() 2012-03-26 21:53:21 +03:00
test_load.c Use a more specific error code for premature end of input 2017-12-20 18:27:04 +01:00
test_loadb.c Update copyrights for 2016 2016-09-18 14:17:03 +03:00
test_memory_funcs.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_number.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_object.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_pack.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_simple.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_sprintf.c Improve test coverage. 2018-02-15 10:12:31 -05:00
test_unpack.c Use last byte of error text as numeric error code 2017-10-03 11:42:07 +02:00
util.h Use last byte of error text as numeric error code 2017-10-03 11:42:07 +02:00