diff options
author | 2015-12-11 02:20:06 +0100 | |
---|---|---|
committer | 2015-12-11 02:20:06 +0100 | |
commit | 8c593e2e1c4a657191db162a62c66025d67a3f0a (patch) | |
tree | 4c13aabce6e26098e0485196e9d0c0bc54440d9b /test/core/json | |
parent | 3ec713c85e8679e05cfdd4efad4f9c9533c9ee1b (diff) |
Improving test coverage for json.c (-->100%)
Diffstat (limited to 'test/core/json')
-rw-r--r-- | test/core/json/json_test.c | 5 |
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); } |