Test Results — cJSON Qualification ==================================== .. note:: Test results are populated by the CI build pipeline running the full cJSON Unity test suite. Detailed evidence (JUnit XML, coverage, complexity, sanitizer logs) is included in each release shipment. .. need:: The cJSON test suite verifies parsing, printing, and utility functions. Results are captured in JUnit XML format. :id: TEST_REPORT_MAIN :status: active :tags: test-report :links: VER_CJSON_TEST_SUITE Test Suite ----------- The cJSON v1.7.19 Unity test suite comprises 21 test executables (18 core + 3 cJSON_Utils) covering: - **Parsing**: valid/invalid JSON, numbers (hex, decimal), strings (escape sequences, Unicode), arrays, objects, values, with and without parse options - **Printing**: formatted and unformatted output for all JSON types - **Manipulation**: object/array add, compare, minify - **Utilities**: JSON Patch, JSON Pointer, merge, sort, pointer find - **Edge cases**: deep nesting, large numbers, empty objects/arrays, NULL-pointer safety All tests pass under standard (``-O2``) and ASan+UBSan instrumented builds with ``-Werror -Wall -Wextra -Wconversion`` — zero compiler warnings. Test results (JUnit XML) are generated by the CI pipeline and included in the release shipment under ``reports/test_results.xml``. The sanitizer output is in ``verification/asan_report.txt``. Coverage -------- Statement and branch coverage are measured via ``gcov`` / ``gcovr`` from a coverage-instrumented build running the full test suite. The coverage report is generated by the CI pipeline and included in the release shipment under ``reports/coverage_report.txt``. Static Analysis --------------- Complexity analysis (McCabe cyclomatic complexity) is performed via ``lizard``. Static analysis is performed via ``cppcheck``. Results are included in the release shipment under ``reports/complexity_report.txt`` and ``verification/cppcheck_report.xml`` respectively. .. note:: ``parse_string`` (CCN 18) exceeds the McCabe 15 threshold. This is a UTF-8 string parser implementing a deterministic state machine for escape sequence handling. Each branch corresponds to a distinct escape sequence and is separately tested. Splitting would introduce interface complexity without reducing logical complexity. See ``VER_CJSON_COMPLEXITY``.