diff options
author | Craig Tiller <ctiller@google.com> | 2017-11-10 14:14:17 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2017-11-10 14:14:17 -0800 |
commit | 4ac2b8e585cbf7064f9bdde4eabaf8ff42801142 (patch) | |
tree | 5379629b43d287972916a87637a26251c1b0de5f /test/core/security/auth_context_test.cc | |
parent | e77b3c36d1b3e2033abd19d553748b678c22253f (diff) |
Enable clang-tidy as a sanity check, fix up all known failures
Diffstat (limited to 'test/core/security/auth_context_test.cc')
-rw-r--r-- | test/core/security/auth_context_test.cc | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/core/security/auth_context_test.cc b/test/core/security/auth_context_test.cc index 3ab9190689..d8e41326c0 100644 --- a/test/core/security/auth_context_test.cc +++ b/test/core/security/auth_context_test.cc @@ -25,31 +25,31 @@ #include <grpc/support/log.h> static void test_empty_context(void) { - grpc_auth_context* ctx = grpc_auth_context_create(NULL); + grpc_auth_context* ctx = grpc_auth_context_create(nullptr); grpc_auth_property_iterator it; gpr_log(GPR_INFO, "test_empty_context"); - GPR_ASSERT(ctx != NULL); - GPR_ASSERT(grpc_auth_context_peer_identity_property_name(ctx) == NULL); + GPR_ASSERT(ctx != nullptr); + GPR_ASSERT(grpc_auth_context_peer_identity_property_name(ctx) == nullptr); it = grpc_auth_context_peer_identity(ctx); - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); it = grpc_auth_context_property_iterator(ctx); - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); it = grpc_auth_context_find_properties_by_name(ctx, "foo"); - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); GPR_ASSERT(grpc_auth_context_set_peer_identity_property_name(ctx, "bar") == 0); - GPR_ASSERT(grpc_auth_context_peer_identity_property_name(ctx) == NULL); + GPR_ASSERT(grpc_auth_context_peer_identity_property_name(ctx) == nullptr); GRPC_AUTH_CONTEXT_UNREF(ctx, "test"); } static void test_simple_context(void) { - grpc_auth_context* ctx = grpc_auth_context_create(NULL); + grpc_auth_context* ctx = grpc_auth_context_create(nullptr); grpc_auth_property_iterator it; size_t i; gpr_log(GPR_INFO, "test_simple_context"); - GPR_ASSERT(ctx != NULL); + GPR_ASSERT(ctx != nullptr); grpc_auth_context_add_cstring_property(ctx, "name", "chapi"); grpc_auth_context_add_cstring_property(ctx, "name", "chapo"); grpc_auth_context_add_cstring_property(ctx, "foo", "bar"); @@ -64,25 +64,25 @@ static void test_simple_context(void) { const grpc_auth_property* p = grpc_auth_property_iterator_next(&it); GPR_ASSERT(p == &ctx->properties.array[i]); } - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); it = grpc_auth_context_find_properties_by_name(ctx, "foo"); GPR_ASSERT(grpc_auth_property_iterator_next(&it) == &ctx->properties.array[2]); - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); it = grpc_auth_context_peer_identity(ctx); GPR_ASSERT(grpc_auth_property_iterator_next(&it) == &ctx->properties.array[0]); GPR_ASSERT(grpc_auth_property_iterator_next(&it) == &ctx->properties.array[1]); - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); GRPC_AUTH_CONTEXT_UNREF(ctx, "test"); } static void test_chained_context(void) { - grpc_auth_context* chained = grpc_auth_context_create(NULL); + grpc_auth_context* chained = grpc_auth_context_create(nullptr); grpc_auth_context* ctx = grpc_auth_context_create(chained); grpc_auth_property_iterator it; size_t i; @@ -108,14 +108,14 @@ static void test_chained_context(void) { const grpc_auth_property* p = grpc_auth_property_iterator_next(&it); GPR_ASSERT(p == &chained->properties.array[i]); } - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); it = grpc_auth_context_find_properties_by_name(ctx, "foo"); GPR_ASSERT(grpc_auth_property_iterator_next(&it) == &ctx->properties.array[2]); GPR_ASSERT(grpc_auth_property_iterator_next(&it) == &chained->properties.array[1]); - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); it = grpc_auth_context_peer_identity(ctx); GPR_ASSERT(grpc_auth_property_iterator_next(&it) == @@ -124,7 +124,7 @@ static void test_chained_context(void) { &ctx->properties.array[1]); GPR_ASSERT(grpc_auth_property_iterator_next(&it) == &chained->properties.array[0]); - GPR_ASSERT(grpc_auth_property_iterator_next(&it) == NULL); + GPR_ASSERT(grpc_auth_property_iterator_next(&it) == nullptr); GRPC_AUTH_CONTEXT_UNREF(ctx, "test"); } |