Lines Matching refs:valuestring
376 free(corruptedString->valuestring);
377 corruptedString->valuestring = NULL;
513 TEST_ASSERT_TRUE(cJSON_GetStringValue(string) == string->valuestring);
539 TEST_ASSERT_TRUE(string_reference->valuestring == string);
654 const char *stringvalue = "valuestring could be changed safely";
656 const char *short_valuestring = "shorter valuestring";
657 const char *long_valuestring = "new valuestring which much longer than previous should be changed safely";
666 ptr1 = item1->valuestring;
669 TEST_ASSERT_EQUAL_PTR_MESSAGE(ptr1, return_value, "new valuestring shorter than old should not reallocate memory");
670 TEST_ASSERT_EQUAL_STRING(short_valuestring, cJSON_GetObjectItem(root, "one")->valuestring);
672 /* we needn't to free the original valuestring manually */
673 ptr1 = item1->valuestring;
676 TEST_ASSERT_NOT_EQUAL_MESSAGE(ptr1, return_value, "new valuestring longer than old should reallocate memory")
677 TEST_ASSERT_EQUAL_STRING(long_valuestring, cJSON_GetObjectItem(root, "one")->valuestring);
680 TEST_ASSERT_NULL_MESSAGE(return_value, "valuestring of reference object should not be changed");
681 TEST_ASSERT_EQUAL_STRING(reference_valuestring, cJSON_GetObjectItem(root, "two")->valuestring);