|
|
@ -160,7 +160,7 @@ static void test_pairs() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void test_atypical() { |
|
|
|
static void test_atypical() { |
|
|
|
char *scratchpad = gpr_strdup("[[],[]]"); |
|
|
|
char *scratchpad = gpr_strdup("[[],[],[]]"); |
|
|
|
grpc_json *json = grpc_json_parse_string(scratchpad); |
|
|
|
grpc_json *json = grpc_json_parse_string(scratchpad); |
|
|
|
grpc_json *brother; |
|
|
|
grpc_json *brother; |
|
|
|
|
|
|
|
|
|
|
@ -168,7 +168,8 @@ static void test_atypical() { |
|
|
|
GPR_ASSERT(json->child); |
|
|
|
GPR_ASSERT(json->child); |
|
|
|
brother = json->child->next; |
|
|
|
brother = json->child->next; |
|
|
|
grpc_json_destroy(json->child); |
|
|
|
grpc_json_destroy(json->child); |
|
|
|
json->child = brother; |
|
|
|
GPR_ASSERT(json->child == brother); |
|
|
|
|
|
|
|
grpc_json_destroy(json->child->next); |
|
|
|
grpc_json_destroy(json); |
|
|
|
grpc_json_destroy(json); |
|
|
|
gpr_free(scratchpad); |
|
|
|
gpr_free(scratchpad); |
|
|
|
} |
|
|
|
} |
|
|
|