diff options
author | 2017-11-16 19:31:28 -0800 | |
---|---|---|
committer | 2017-11-16 19:31:28 -0800 | |
commit | 177039b2f89e73ad0d048da021f939f3a153c4e2 (patch) | |
tree | c7f10f04cd9a0872863e2b181162bc9928160cd8 /test/core/transport/chttp2 | |
parent | 995aa91bbbc68deb6dfd7c667cfee3af2bedec08 (diff) | |
parent | 82c8f945302f128495e261b853ac49f1dfbe69a1 (diff) |
Merge master
Diffstat (limited to 'test/core/transport/chttp2')
-rw-r--r-- | test/core/transport/chttp2/hpack_encoder_test.cc | 14 | ||||
-rw-r--r-- | test/core/transport/chttp2/hpack_parser_test.cc | 2 | ||||
-rw-r--r-- | test/core/transport/chttp2/stream_map_test.cc | 26 |
3 files changed, 21 insertions, 21 deletions
diff --git a/test/core/transport/chttp2/hpack_encoder_test.cc b/test/core/transport/chttp2/hpack_encoder_test.cc index 91e2ca376e..2772aef3c4 100644 --- a/test/core/transport/chttp2/hpack_encoder_test.cc +++ b/test/core/transport/chttp2/hpack_encoder_test.cc @@ -39,7 +39,7 @@ grpc_chttp2_hpack_compressor g_compressor; int g_failure = 0; -void** to_delete = NULL; +void** to_delete = nullptr; size_t num_to_delete = 0; size_t cap_to_delete = 0; @@ -79,8 +79,8 @@ static void verify(const verify_params params, const char* expected, e[i].md = grpc_mdelem_from_slices( grpc_slice_intern(grpc_slice_from_static_string(key)), value_slice); } - e[0].prev = NULL; - e[nheaders - 1].next = NULL; + e[0].prev = nullptr; + e[nheaders - 1].next = nullptr; va_end(l); b.list.head = &e[0]; @@ -105,7 +105,7 @@ static void verify(const verify_params params, const char* expected, 16384, /* max_frame_size */ &stats /* stats */ }; - grpc_chttp2_encode_header(&g_compressor, NULL, 0, &b, &hopt, &output); + grpc_chttp2_encode_header(&g_compressor, nullptr, 0, &b, &hopt, &output); merged = grpc_slice_merge(output.slices, output.count); grpc_slice_buffer_destroy_internal(&output); grpc_metadata_batch_destroy(&b); @@ -214,8 +214,8 @@ static void verify_table_size_change_match_elem_size(const char* key, grpc_metadata_batch b; grpc_metadata_batch_init(&b); e[0].md = elem; - e[0].prev = NULL; - e[0].next = NULL; + e[0].prev = nullptr; + e[0].next = nullptr; b.list.head = &e[0]; b.list.tail = &e[0]; b.list.count = 1; @@ -229,7 +229,7 @@ static void verify_table_size_change_match_elem_size(const char* key, use_true_binary, /* use_true_binary_metadata */ 16384, /* max_frame_size */ &stats /* stats */}; - grpc_chttp2_encode_header(&g_compressor, NULL, 0, &b, &hopt, &output); + grpc_chttp2_encode_header(&g_compressor, nullptr, 0, &b, &hopt, &output); grpc_slice_buffer_destroy_internal(&output); grpc_metadata_batch_destroy(&b); diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc index 1bd3644fab..52900c5419 100644 --- a/test/core/transport/chttp2/hpack_parser_test.cc +++ b/test/core/transport/chttp2/hpack_parser_test.cc @@ -72,7 +72,7 @@ static void test_vector(grpc_chttp2_hpack_parser* parser, } gpr_free(slices); - GPR_ASSERT(NULL == va_arg(chk.args, char*)); + GPR_ASSERT(nullptr == va_arg(chk.args, char*)); va_end(chk.args); } diff --git a/test/core/transport/chttp2/stream_map_test.cc b/test/core/transport/chttp2/stream_map_test.cc index 23a7b3f4c2..9b21cb2364 100644 --- a/test/core/transport/chttp2/stream_map_test.cc +++ b/test/core/transport/chttp2/stream_map_test.cc @@ -39,7 +39,7 @@ static void test_empty_find(void) { LOG_TEST("test_empty_find"); grpc_chttp2_stream_map_init(&map, 8); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, 39128)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(&map, 39128)); grpc_chttp2_stream_map_destroy(&map); } @@ -56,13 +56,13 @@ static void test_double_deletion(void) { GPR_ASSERT(1 == grpc_chttp2_stream_map_size(&map)); GPR_ASSERT((void*)1 == grpc_chttp2_stream_map_delete(&map, 1)); GPR_ASSERT(0 == grpc_chttp2_stream_map_size(&map)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, 1)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_delete(&map, 1)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, 1)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_delete(&map, 1)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, 1)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_delete(&map, 1)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(&map, 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_delete(&map, 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(&map, 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_delete(&map, 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(&map, 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_delete(&map, 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(&map, 1)); grpc_chttp2_stream_map_destroy(&map); } @@ -81,8 +81,8 @@ static void test_basic_add_find(uint32_t n) { grpc_chttp2_stream_map_add(&map, i, (void*)(uintptr_t)i); } GPR_ASSERT(n == grpc_chttp2_stream_map_size(&map)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, 0)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(&map, n + 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(&map, 0)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(&map, n + 1)); for (i = 1; i <= n; i++) { got = (uintptr_t)grpc_chttp2_stream_map_find(&map, i); GPR_ASSERT(i == got); @@ -103,14 +103,14 @@ static void check_delete_evens(grpc_chttp2_stream_map* map, uint32_t n) { uint32_t i; size_t got; - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(map, 0)); - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(map, n + 1)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(map, 0)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(map, n + 1)); for (i = 1; i <= n; i++) { if (i & 1) { got = (uintptr_t)grpc_chttp2_stream_map_find(map, i); GPR_ASSERT(i == got); } else { - GPR_ASSERT(NULL == grpc_chttp2_stream_map_find(map, i)); + GPR_ASSERT(nullptr == grpc_chttp2_stream_map_find(map, i)); } } |