aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-12-10 18:09:45 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-12-10 18:09:45 -0800
commit9b315a14d3639a737612d1eda392ef10234de387 (patch)
tree57bca4812be0b6b11de0fd9fe31ae6e7ce84fd63 /test/core
parentbfb6c5715e80ba8897376183b9b829307f8da53d (diff)
parent8c593e2e1c4a657191db162a62c66025d67a3f0a (diff)
Merge pull request #4415 from nicolasnoble/json-coverage-1
Improving test coverage for json.c (-->100%)
Diffstat (limited to 'test/core')
-rw-r--r--test/core/json/json_test.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/core/json/json_test.c b/test/core/json/json_test.c
index 15019913da..f16494edf6 100644
--- a/test/core/json/json_test.c
+++ b/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);
}