test_json_file()#
test_json_file() compares the JSON content of a file with the expected JSON structure and validates log results.
Prototype
int test_json_file(
const char *file
);
Parameters
Key |
Type |
Description |
|---|---|---|
|
|
Path to the JSON file to be tested. |
Return Value
Returns 0 if the JSON content matches the expected structure and logs are as expected, otherwise returns -1.
Notes
Uses match_record() to compare the JSON structures.
Calls check_log_result() to validate log messages.
If verbose mode is enabled, additional debug information is printed.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples