mirror of
https://github.com/json-c/json-c.git
synced 2026-03-29 18:09:07 +08:00
The split of json_object into type-specific sub-structures is now functionally complete.
Remove all of the temporary defines, structures, old compat fuctions, extra fields, etc... that were needed during the conversion to a split set of json_object_* structures.
This commit is contained in:
@@ -56,12 +56,12 @@ int main(int argc, char **argv)
|
||||
#define MID "A MID STRING"
|
||||
// 12345678901234567890123456789012....
|
||||
#define HUGE "A string longer than 32 chars as to check non local buf codepath"
|
||||
tmp = json_object_new_string(SHORT);
|
||||
assert(strcmp(json_object_get_string(tmp), SHORT) == 0);
|
||||
assert(strcmp(json_object_to_json_string(tmp), "\"" SHORT "\"") == 0);
|
||||
json_object_set_string(tmp, MID);
|
||||
tmp = json_object_new_string(MID);
|
||||
assert(strcmp(json_object_get_string(tmp), MID) == 0);
|
||||
assert(strcmp(json_object_to_json_string(tmp), "\"" MID "\"") == 0);
|
||||
json_object_set_string(tmp, SHORT);
|
||||
assert(strcmp(json_object_get_string(tmp), SHORT) == 0);
|
||||
assert(strcmp(json_object_to_json_string(tmp), "\"" SHORT "\"") == 0);
|
||||
json_object_set_string(tmp, HUGE);
|
||||
assert(strcmp(json_object_get_string(tmp), HUGE) == 0);
|
||||
assert(strcmp(json_object_to_json_string(tmp), "\"" HUGE "\"") == 0);
|
||||
|
||||
Reference in New Issue
Block a user