From 5b27941372debbae80c1b7d77bb9be3f5e8a79e1 Mon Sep 17 00:00:00 2001 From: Hope Casey-Allen Date: Wed, 12 Sep 2018 14:47:34 -0700 Subject: Even cleaner implementation that does not modify the grpc_mdelem struct. --- test/core/end2end/tests/authority_not_supported.cc | 4 ++-- test/core/end2end/tests/binary_metadata.cc | 8 ++++---- test/core/end2end/tests/simple_cacheable_request.cc | 8 ++++---- test/core/end2end/tests/simple_metadata.cc | 8 ++++---- test/core/end2end/tests/trailing_metadata.cc | 12 ++++++------ 5 files changed, 20 insertions(+), 20 deletions(-) (limited to 'test/core/end2end/tests') diff --git a/test/core/end2end/tests/authority_not_supported.cc b/test/core/end2end/tests/authority_not_supported.cc index 4ccdb5e72a..01a95e4e10 100644 --- a/test/core/end2end/tests/authority_not_supported.cc +++ b/test/core/end2end/tests/authority_not_supported.cc @@ -93,11 +93,11 @@ static void test_with_authority_header(grpc_end2end_test_config config) { grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"), grpc_slice_from_static_string("val1"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key2"), grpc_slice_from_static_string("val2"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_end2end_test_fixture f = begin_test(config, "test_with_authority_header", nullptr, nullptr); cq_verifier* cqv = cq_verifier_create(f.cq); diff --git a/test/core/end2end/tests/binary_metadata.cc b/test/core/end2end/tests/binary_metadata.cc index 2ce050355d..cdf5b1eb94 100644 --- a/test/core/end2end/tests/binary_metadata.cc +++ b/test/core/end2end/tests/binary_metadata.cc @@ -101,23 +101,23 @@ static void test_request_response_with_metadata_and_payload( grpc_slice_from_static_string( "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key2-bin"), grpc_slice_from_static_string( "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_metadata meta_s[2] = { {grpc_slice_from_static_string("key3-bin"), grpc_slice_from_static_string( "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key4-bin"), grpc_slice_from_static_string( "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_end2end_test_fixture f = begin_test(config, "test_request_response_with_metadata_and_payload", nullptr, nullptr); diff --git a/test/core/end2end/tests/simple_cacheable_request.cc b/test/core/end2end/tests/simple_cacheable_request.cc index 7493818a27..be6d16ecad 100644 --- a/test/core/end2end/tests/simple_cacheable_request.cc +++ b/test/core/end2end/tests/simple_cacheable_request.cc @@ -101,19 +101,19 @@ static void test_cacheable_request_response_with_metadata_and_payload( grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"), grpc_slice_from_static_string("val1"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key2"), grpc_slice_from_static_string("val2"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_metadata meta_s[2] = {{grpc_slice_from_static_string("key3"), grpc_slice_from_static_string("val3"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key4"), grpc_slice_from_static_string("val4"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_end2end_test_fixture f = begin_test( config, "test_cacheable_request_response_with_metadata_and_payload", nullptr, nullptr); diff --git a/test/core/end2end/tests/simple_metadata.cc b/test/core/end2end/tests/simple_metadata.cc index a9e86bda3a..3e476c2129 100644 --- a/test/core/end2end/tests/simple_metadata.cc +++ b/test/core/end2end/tests/simple_metadata.cc @@ -99,19 +99,19 @@ static void test_request_response_with_metadata_and_payload( grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"), grpc_slice_from_static_string("val1"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key2"), grpc_slice_from_static_string("val2"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_metadata meta_s[2] = {{grpc_slice_from_static_string("key3"), grpc_slice_from_static_string("val3"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key4"), grpc_slice_from_static_string("val4"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_end2end_test_fixture f = begin_test(config, "test_request_response_with_metadata_and_payload", nullptr, nullptr); diff --git a/test/core/end2end/tests/trailing_metadata.cc b/test/core/end2end/tests/trailing_metadata.cc index 1fb9683ee5..5cf6f2bb11 100644 --- a/test/core/end2end/tests/trailing_metadata.cc +++ b/test/core/end2end/tests/trailing_metadata.cc @@ -99,27 +99,27 @@ static void test_request_response_with_metadata_and_payload( grpc_metadata meta_c[2] = {{grpc_slice_from_static_string("key1"), grpc_slice_from_static_string("val1"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key2"), grpc_slice_from_static_string("val2"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_metadata meta_s[2] = {{grpc_slice_from_static_string("key3"), grpc_slice_from_static_string("val3"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key4"), grpc_slice_from_static_string("val4"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_metadata meta_t[2] = {{grpc_slice_from_static_string("key5"), grpc_slice_from_static_string("val5"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}, + {{nullptr, nullptr, nullptr, nullptr}}}, {grpc_slice_from_static_string("key6"), grpc_slice_from_static_string("val6"), 0, - {0, {nullptr, nullptr, nullptr, nullptr}}}}; + {{nullptr, nullptr, nullptr, nullptr}}}}; grpc_end2end_test_fixture f = begin_test(config, "test_request_response_with_metadata_and_payload", nullptr, nullptr); -- cgit v1.2.3