Max Bruckner
e7d0c1dc37
Tests: Test if the readme examples are working
7 years ago
Max Bruckner
77931e7fc0
cJSON_Add...ToObject: Add tests for failure conditions
7 years ago
Max Bruckner
5865faffa3
Convert cJSON_Add...ToObject macros into functions
These functions return the added object. Functions to add objects and
arrays have also been added.
7 years ago
Max Bruckner
f966409b33
Add tests for cJSON_Add...ToObject macros
7 years ago
Max Bruckner
2a087843e4
Add overrides for BUILD_SHARED_LIBS
7 years ago
Max Bruckner
eb7c681a4b
Fix tests when building as static library
7 years ago
Max Bruckner
11844dd5a6
Add cJSON_Create{Array,Object}Reference
7 years ago
Max Bruckner
eaa90a6b74
Add cJSON_CreateStringReference
7 years ago
Max Bruckner
b2afbd3c9f
cJSON_GetStringValue
7 years ago
yangfl
fa00278f66
Remove trailing space
7 years ago
Max Bruckner
d92754cd30
Add valgrind suppressions for ARMv7
7 years ago
rmallins
629c354390
Rewrite test for cJSON_ParseWithOpts() to expect non-null error
pointer in error case and change code to match new expectations.
7 years ago
rmallins
1b2236a9a6
Improve existing tests showing behaviour of Parse and ParseWithOpts functions.
7 years ago
Max Bruckner
469a437e2a
Add valgrind suppressions for ARVMv7 ArchlinuxARM
7 years ago
Max Bruckner
954d61e5e7
Fix #189 , ensure returns an invalid pointer
If realloc returns NULL, ensure didn't abort but returned
printbuffer.offset instead. If an attacker can control
printbuffer.offset and also make realloc fail at just the right moment,
this would make cJSON potentially write at an arbitrary memory address.
7 years ago
Max Bruckner
5baa77f86c
cJSON_Parse{,WithOpts}: Skip UTF-8 (Byte Order Marks)
7 years ago
Max Bruckner
45e1278acb
tests/print_number: Add test with 17 digits of precision
8 years ago
Max Bruckner
21733eb02e
tests/print_number: Use proper double literals
8 years ago
Max Bruckner
a9ce4e6bbc
Add warning -Wswitch-enum
8 years ago
Max Bruckner
4e0c119391
Add warning -Wmissing-variable-declarations
8 years ago
Max Bruckner
18ad8a8770
misc_utils_tests: call all utils function with NULL pointers
7 years ago
Max Bruckner
bdd5ff7ad6
misc_tests: Call all functions with NULL pointers
7 years ago
Max Bruckner
03ba72faec
cJSON_Compare: Fix comparison of objects
It did consider two arrays equal if one is a subset of te other one,
which is incorrect.
See #180
8 years ago
Max Bruckner
569aa060c6
cJSON_Compare: Fix comparison of arrays
It did consider two arrays equal if one is a prefix of the other one,
which is incorrect.
See #180
8 years ago
Max Bruckner
bfbd8fe0d8
tests/parse_hex4: Fix GCC 7 compiler warning ( fixes #179 )
8 years ago
Max Bruckner
9ecc96878f
fix #174 : cJSON_ReplaceItemInObject doesn't copy name
8 years ago
Max Bruckner
b537ca70a3
old_utils_tests: Remove leftover unused attribute
8 years ago
Max Bruckner
e1f6470dae
json_patch_tests.c: Use case sensitive functions
8 years ago
Max Bruckner
8b953d1202
Add cJSON_ReplaceItemViaPointer
8 years ago
Max Bruckner
c24c3e0285
Add cJSON_DetachItemViaPointer
8 years ago
Max Bruckner
28570ad095
Add test for cJSON_SetNumberHelper
8 years ago
Max Bruckner
7fe8d53c19
Use json-patch-tests to test generation of tests with cJSON_Utils
8 years ago
Max Bruckner
949c083315
Move 'hooks' parameter into buffers (parse/print)
8 years ago
Max Bruckner
c4c217f2ce
Move 'format' into printbuffer
8 years ago
Max Bruckner
79f30800ec
Move print depth into printbuffer
8 years ago
Max Bruckner
e0d3a8a265
Limit nesting depth to 1000 and make it configurable.
8 years ago
Debora Grosse
3fc9bc0648
cJSON: Fix print_number to print significant digits of doubles
8 years ago
Max Bruckner
6ccfd5d603
tests: Move most of test_utils.c to old_utils_tests
8 years ago
Max Bruckner
49ebc85e7a
Move ApplyPatch tests from test_utils.c to json.
8 years ago
Max Bruckner
ba7b48b3f3
Enable json-patch-tests tests
8 years ago
Max Bruckner
6ac896d8d2
cJSON_Compare: New function to compare json
8 years ago
Max Bruckner
bc0bb7c224
parse_with_opts: test return_parse_end
8 years ago
Max Bruckner
770e8263a5
tests for cJSON_ParseWithOpts
8 years ago
Max Bruckner
2683589d93
parser: Construct error pointer from buffer offset
8 years ago
Max Bruckner
87a204ed0b
parse_functions: Return booleans instead of pointers
8 years ago
Max Bruckner
778a0c146f
parse_string: Use parsebuffer
8 years ago
Max Bruckner
f69b109c9f
parse_number: Use parse_buffer
8 years ago
Max Bruckner
fef1c45b92
parse_object: Use parse_buffer
8 years ago
Max Bruckner
033a542532
parse_array: Use parsebuffer
8 years ago
Max Bruckner
fd0320cf54
parse_value: Use parse_buffer
8 years ago