aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/slice
diff options
context:
space:
mode:
authorGravatar Muxi Yan <mxyan@google.com>2017-12-06 22:09:36 -0800
committerGravatar Muxi Yan <mxyan@google.com>2017-12-06 22:09:36 -0800
commit67454d71e833a7704d61e673ad32e71dd31c868a (patch)
treefe720c5bb8388a02ed334b0b0c071c0f7b895b31 /test/core/slice
parentfc38142db69cd8c95f3c55a296b4e73b04c720c3 (diff)
parentb0bad8f3864dc9c8745736fe68efe513b2b84932 (diff)
Merge commit 'b0bad8f' into fix-stream-compression-config-interface
Diffstat (limited to 'test/core/slice')
-rw-r--r--test/core/slice/slice_hash_table_test.cc6
-rw-r--r--test/core/slice/slice_test.cc8
2 files changed, 7 insertions, 7 deletions
diff --git a/test/core/slice/slice_hash_table_test.cc b/test/core/slice/slice_hash_table_test.cc
index a2006b3c10..0ee4e8617d 100644
--- a/test/core/slice/slice_hash_table_test.cc
+++ b/test/core/slice/slice_hash_table_test.cc
@@ -46,7 +46,7 @@ static void check_values(const test_entry* input, size_t num_entries,
grpc_slice key = grpc_slice_from_static_string(input[i].key);
const char* actual =
static_cast<const char*>(grpc_slice_hash_table_get(table, key));
- GPR_ASSERT(actual != NULL);
+ GPR_ASSERT(actual != nullptr);
GPR_ASSERT(strcmp(actual, input[i].value) == 0);
grpc_slice_unref(key);
}
@@ -55,7 +55,7 @@ static void check_values(const test_entry* input, size_t num_entries,
static void check_non_existent_value(const char* key_string,
grpc_slice_hash_table* table) {
grpc_slice key = grpc_slice_from_static_string(key_string);
- GPR_ASSERT(grpc_slice_hash_table_get(table, key) == NULL);
+ GPR_ASSERT(grpc_slice_hash_table_get(table, key) == nullptr);
grpc_slice_unref(key);
}
@@ -116,7 +116,7 @@ static void test_slice_hash_table() {
};
const size_t num_entries = GPR_ARRAY_SIZE(test_entries);
grpc_slice_hash_table* table =
- create_table_from_entries(test_entries, num_entries, NULL);
+ create_table_from_entries(test_entries, num_entries, nullptr);
// Check contents of table.
check_values(test_entries, num_entries, table);
check_non_existent_value("XX", table);
diff --git a/test/core/slice/slice_test.cc b/test/core/slice/slice_test.cc
index aec5636376..02f6b1ea79 100644
--- a/test/core/slice/slice_test.cc
+++ b/test/core/slice/slice_test.cc
@@ -50,10 +50,10 @@ static void test_slice_malloc_returns_something_sensible(void) {
GPR_ASSERT(GRPC_SLICE_LENGTH(slice) == length);
/* If the slice has a refcount, it must be destroyable. */
if (slice.refcount) {
- GPR_ASSERT(slice.refcount->vtable != NULL);
- GPR_ASSERT(slice.refcount->vtable->ref != NULL);
- GPR_ASSERT(slice.refcount->vtable->unref != NULL);
- GPR_ASSERT(slice.refcount->vtable->hash != NULL);
+ GPR_ASSERT(slice.refcount->vtable != nullptr);
+ GPR_ASSERT(slice.refcount->vtable->ref != nullptr);
+ GPR_ASSERT(slice.refcount->vtable->unref != nullptr);
+ GPR_ASSERT(slice.refcount->vtable->hash != nullptr);
}
/* We must be able to write to every byte of the data */
for (i = 0; i < length; i++) {