diff options
author | Mark D. Roth <roth@google.com> | 2016-05-12 10:11:58 -0700 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-05-12 10:11:58 -0700 |
commit | de788e71bca954559990d7db9ea53faef100d643 (patch) | |
tree | c1dfd8637567d4eb23912f22eab1f63eae69a496 /test/core/transport/chttp2 | |
parent | ff10e6d80ea1e7dcb53d0aa63181a0157cf8a6a5 (diff) |
Fixed hpack_parser_test and hpack_table_test.
Diffstat (limited to 'test/core/transport/chttp2')
-rw-r--r-- | test/core/transport/chttp2/hpack_parser_test.c | 3 | ||||
-rw-r--r-- | test/core/transport/chttp2/hpack_table_test.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/test/core/transport/chttp2/hpack_parser_test.c b/test/core/transport/chttp2/hpack_parser_test.c index 51bf48dc09..97501b77d5 100644 --- a/test/core/transport/chttp2/hpack_parser_test.c +++ b/test/core/transport/chttp2/hpack_parser_test.c @@ -76,7 +76,8 @@ static void test_vector(grpc_chttp2_hpack_parser *parser, for (i = 0; i < nslices; i++) { GPR_ASSERT(grpc_chttp2_hpack_parser_parse( - parser, GPR_SLICE_START_PTR(slices[i]), GPR_SLICE_END_PTR(slices[i]))); + parser, GPR_SLICE_START_PTR(slices[i]), GPR_SLICE_END_PTR(slices[i])) + == GRPC_ERROR_NONE); } for (i = 0; i < nslices; i++) { diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 73e59f1536..98e486c69c 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -144,7 +144,7 @@ static void test_many_additions(void) { gpr_asprintf(&key, "K:%d", i); gpr_asprintf(&value, "VALUE:%d", i); elem = grpc_mdelem_from_strings(key, value); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem) == GRPC_ERROR_NONE); GRPC_MDELEM_UNREF(elem); assert_index(&tbl, 1 + GRPC_CHTTP2_LAST_STATIC_ENTRY, key, value); gpr_free(key); @@ -181,13 +181,13 @@ static void test_find(void) { grpc_chttp2_hptbl_init(&tbl); elem = grpc_mdelem_from_strings("abc", "xyz"); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem) == GRPC_ERROR_NONE); GRPC_MDELEM_UNREF(elem); elem = grpc_mdelem_from_strings("abc", "123"); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem) == GRPC_ERROR_NONE); GRPC_MDELEM_UNREF(elem); elem = grpc_mdelem_from_strings("x", "1"); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem) == GRPC_ERROR_NONE); GRPC_MDELEM_UNREF(elem); r = find_simple(&tbl, "abc", "123"); @@ -238,7 +238,7 @@ static void test_find(void) { for (i = 0; i < 10000; i++) { int64_ttoa(i, buffer); elem = grpc_mdelem_from_strings("test", buffer); - GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem)); + GPR_ASSERT(grpc_chttp2_hptbl_add(&tbl, elem) == GRPC_ERROR_NONE); GRPC_MDELEM_UNREF(elem); } |