diff options
author | 2016-11-17 16:42:21 -0800 | |
---|---|---|
committer | 2016-11-17 16:42:21 -0800 | |
commit | 1ad51e021f710e9cda1ceaf7038b3bc72e9a55c1 (patch) | |
tree | 7f90941bd6d65df702ee894fef4cb93a62d007b1 /test/core/slice | |
parent | 299dbe4e301d3eb76dd4f7ca4ecac351ed6c1948 (diff) |
Fix static metadata
Diffstat (limited to 'test/core/slice')
-rw-r--r-- | test/core/slice/slice_test.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/core/slice/slice_test.c b/test/core/slice/slice_test.c index ddce1d29b0..d3d1659341 100644 --- a/test/core/slice/slice_test.c +++ b/test/core/slice/slice_test.c @@ -294,11 +294,8 @@ static void test_static_slice_copy_interning(void) { grpc_init(); for (size_t i = 0; i < GRPC_STATIC_MDSTR_COUNT; i++) { - grpc_slice copy = - grpc_slice_malloc(GRPC_SLICE_LENGTH(grpc_static_slice_table[i])); - memcpy(GRPC_SLICE_START_PTR(copy), - GRPC_SLICE_START_PTR(grpc_static_slice_table[i]), - GRPC_SLICE_LENGTH(grpc_static_slice_table[i])); + grpc_slice copy = grpc_slice_dup(grpc_static_slice_table[i]); + GPR_ASSERT(!grpc_slice_is_equivalent(grpc_static_slice_table[i], copy)); GPR_ASSERT(grpc_slice_is_equivalent(grpc_static_slice_table[i], grpc_slice_intern(copy))); grpc_slice_unref(copy); @@ -310,7 +307,6 @@ static void test_static_slice_copy_interning(void) { int main(int argc, char **argv) { unsigned length; grpc_test_init(argc, argv); - grpc_test_only_set_slice_hash_seed(0); test_slice_malloc_returns_something_sensible(); test_slice_new_returns_something_sensible(); test_slice_new_with_user_data(); |