update comments and add tests for cJSON_SetValuestring

This commit is contained in:
Alanscut
2024-04-28 18:09:25 +08:00
committed by Alan Wang
parent 5671646e97
commit 19396a49a6
2 changed files with 3 additions and 1 deletions

View File

@@ -444,6 +444,7 @@ static void cjson_functions_should_not_crash_with_null_pointers(void)
TEST_ASSERT_FALSE(cJSON_Compare(NULL, item, false));
TEST_ASSERT_NULL(cJSON_SetValuestring(NULL, "test"));
TEST_ASSERT_NULL(cJSON_SetValuestring(corruptedString, "test"));
TEST_ASSERT_NULL(cJSON_SetValuestring(item, NULL));
cJSON_Minify(NULL);
/* skipped because it is only used via a macro that checks for NULL */
/* cJSON_SetNumberHelper(NULL, 0); */