]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
Merge pull request #453 from Alanscut/add-return-value
authorAlan Wang <wp_scut@163.com>
Thu, 2 Apr 2020 11:41:56 +0000 (19:41 +0800)
committerGitHub <noreply@github.com>
Thu, 2 Apr 2020 11:41:56 +0000 (19:41 +0800)
add return value for  cJSON_AddItemTo... and cJSON_ReplaceItemxxx

1  2 
cJSON.c
cJSON.h
tests/misc_tests.c

diff --cc cJSON.c
Simple merge
diff --cc cJSON.h
Simple merge
index 54ae48020168ec80b7c0919556793cbd3d063b24,714c44db0042df7ac8dbce3b5ccb5b00c6a9d699..3bf0a1cc15a16f89da4f5493116c8a4e893f77a1
@@@ -657,9 -625,9 +675,10 @@@ int CJSON_CDECL main(void
      RUN_TEST(cjson_create_string_reference_should_create_a_string_reference);
      RUN_TEST(cjson_create_object_reference_should_create_an_object_reference);
      RUN_TEST(cjson_create_array_reference_should_create_an_array_reference);
+     RUN_TEST(cjson_add_item_to_object_or_array_should_not_add_itself);
      RUN_TEST(cjson_add_item_to_object_should_not_use_after_free_when_string_is_aliased);
      RUN_TEST(cjson_delete_item_from_array_should_not_broken_list_structure);
 +    RUN_TEST(cjson_set_valuestring_to_object_should_not_leak_memory);
  
      return UNITY_END();
  }