Improving test coverage for json.c (-->100%)

pull/4415/head
Nicolas "Pixel" Noble 9 years ago
parent 3ec713c85e
commit 8c593e2e1c
  1. 5
      test/core/json/json_test.c

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

Loading…
Cancel
Save