diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-11-16 19:31:28 -0800 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-11-16 19:31:28 -0800 |
commit | 177039b2f89e73ad0d048da021f939f3a153c4e2 (patch) | |
tree | c7f10f04cd9a0872863e2b181162bc9928160cd8 /test/core/transport | |
parent | 995aa91bbbc68deb6dfd7c667cfee3af2bedec08 (diff) | |
parent | 82c8f945302f128495e261b853ac49f1dfbe69a1 (diff) |
Merge master
Diffstat (limited to 'test/core/transport')
-rw-r--r-- | test/core/transport/byte_stream_test.cc | 10 | ||||
-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 | ||||
-rw-r--r-- | test/core/transport/connectivity_state_test.cc | 2 | ||||
-rw-r--r-- | test/core/transport/stream_owned_slice_test.cc | 2 |
6 files changed, 28 insertions, 28 deletions
diff --git a/test/core/transport/byte_stream_test.cc b/test/core/transport/byte_stream_test.cc index 08dd91e4ec..593c2ae141 100644 --- a/test/core/transport/byte_stream_test.cc +++ b/test/core/transport/byte_stream_test.cc @@ -52,7 +52,7 @@ static void test_slice_buffer_stream_basic(void) { grpc_slice_buffer_stream_init(&stream, &buffer, 0); GPR_ASSERT(stream.base.length == 6); grpc_closure closure; - GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr, grpc_schedule_on_exec_ctx); // Read each slice. Note that next() always returns synchronously. for (size_t i = 0; i < GPR_ARRAY_SIZE(input); ++i) { @@ -86,7 +86,7 @@ static void test_slice_buffer_stream_shutdown(void) { grpc_slice_buffer_stream_init(&stream, &buffer, 0); GPR_ASSERT(stream.base.length == 6); grpc_closure closure; - GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr, grpc_schedule_on_exec_ctx); // Read the first slice. GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure)); @@ -135,7 +135,7 @@ static void test_caching_byte_stream_basic(void) { grpc_caching_byte_stream stream; grpc_caching_byte_stream_init(&stream, &cache); grpc_closure closure; - GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr, grpc_schedule_on_exec_ctx); // Read each slice. Note that next() always returns synchronously, // because the underlying byte stream always does. @@ -174,7 +174,7 @@ static void test_caching_byte_stream_reset(void) { grpc_caching_byte_stream stream; grpc_caching_byte_stream_init(&stream, &cache); grpc_closure closure; - GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr, grpc_schedule_on_exec_ctx); // Read one slice. GPR_ASSERT(grpc_byte_stream_next(&stream.base, ~(size_t)0, &closure)); @@ -222,7 +222,7 @@ static void test_caching_byte_stream_shared_cache(void) { grpc_caching_byte_stream stream2; grpc_caching_byte_stream_init(&stream2, &cache); grpc_closure closure; - GRPC_CLOSURE_INIT(&closure, not_called_closure, NULL, + GRPC_CLOSURE_INIT(&closure, not_called_closure, nullptr, grpc_schedule_on_exec_ctx); // Read one slice from stream1. GPR_ASSERT(grpc_byte_stream_next(&stream1.base, ~(size_t)0, &closure)); 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)); } } diff --git a/test/core/transport/connectivity_state_test.cc b/test/core/transport/connectivity_state_test.cc index 0ccf7ba288..06bb093d32 100644 --- a/test/core/transport/connectivity_state_test.cc +++ b/test/core/transport/connectivity_state_test.cc @@ -82,7 +82,7 @@ static void test_subscribe_then_unsubscribe(void) { grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(state == GRPC_CHANNEL_IDLE); GPR_ASSERT(g_counter == 0); - grpc_connectivity_state_notify_on_state_change(&tracker, NULL, closure); + grpc_connectivity_state_notify_on_state_change(&tracker, nullptr, closure); grpc_core::ExecCtx::Get()->Flush(); GPR_ASSERT(state == GRPC_CHANNEL_IDLE); GPR_ASSERT(g_counter == 1); diff --git a/test/core/transport/stream_owned_slice_test.cc b/test/core/transport/stream_owned_slice_test.cc index e8fcc61167..d25d83c2c6 100644 --- a/test/core/transport/stream_owned_slice_test.cc +++ b/test/core/transport/stream_owned_slice_test.cc @@ -29,7 +29,7 @@ int main(int argc, char** argv) { uint8_t buffer[] = "abc123"; grpc_stream_refcount r; - GRPC_STREAM_REF_INIT(&r, 1, do_nothing, NULL, "test"); + GRPC_STREAM_REF_INIT(&r, 1, do_nothing, nullptr, "test"); GPR_ASSERT(r.refs.count == 1); grpc_slice slice = grpc_slice_from_stream_owned_buffer(&r, buffer, sizeof(buffer)); |