aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/transport/chttp2
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-11-10 14:14:17 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-11-10 14:14:17 -0800
commit4ac2b8e585cbf7064f9bdde4eabaf8ff42801142 (patch)
tree5379629b43d287972916a87637a26251c1b0de5f /test/core/transport/chttp2
parente77b3c36d1b3e2033abd19d553748b678c22253f (diff)
Enable clang-tidy as a sanity check, fix up all known failures
Diffstat (limited to 'test/core/transport/chttp2')
-rw-r--r--test/core/transport/chttp2/hpack_encoder_test.cc14
-rw-r--r--test/core/transport/chttp2/hpack_parser_test.cc2
-rw-r--r--test/core/transport/chttp2/stream_map_test.cc26
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 a7e44abc2b..2d18b72504 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;
@@ -80,8 +80,8 @@ static void verify(grpc_exec_ctx* exec_ctx, const verify_params params,
exec_ctx, 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];
@@ -106,7 +106,7 @@ static void verify(grpc_exec_ctx* exec_ctx, const verify_params params,
16384, /* max_frame_size */
&stats /* stats */
};
- grpc_chttp2_encode_header(exec_ctx, &g_compressor, NULL, 0, &b, &hopt,
+ grpc_chttp2_encode_header(exec_ctx, &g_compressor, nullptr, 0, &b, &hopt,
&output);
merged = grpc_slice_merge(output.slices, output.count);
grpc_slice_buffer_destroy_internal(exec_ctx, &output);
@@ -220,8 +220,8 @@ static void verify_table_size_change_match_elem_size(grpc_exec_ctx* exec_ctx,
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;
@@ -235,7 +235,7 @@ static void verify_table_size_change_match_elem_size(grpc_exec_ctx* exec_ctx,
use_true_binary, /* use_true_binary_metadata */
16384, /* max_frame_size */
&stats /* stats */};
- grpc_chttp2_encode_header(exec_ctx, &g_compressor, NULL, 0, &b, &hopt,
+ grpc_chttp2_encode_header(exec_ctx, &g_compressor, nullptr, 0, &b, &hopt,
&output);
grpc_slice_buffer_destroy_internal(exec_ctx, &output);
grpc_metadata_batch_destroy(exec_ctx, &b);
diff --git a/test/core/transport/chttp2/hpack_parser_test.cc b/test/core/transport/chttp2/hpack_parser_test.cc
index 434b46eb2e..82fb20aced 100644
--- a/test/core/transport/chttp2/hpack_parser_test.cc
+++ b/test/core/transport/chttp2/hpack_parser_test.cc
@@ -73,7 +73,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));
}
}