diff --git a/test/core/debug/stats_test.cc b/test/core/debug/stats_test.cc index 501581952d9..915254f3caf 100644 --- a/test/core/debug/stats_test.cc +++ b/test/core/debug/stats_test.cc @@ -16,9 +16,7 @@ * */ -extern "C" { #include "src/core/lib/debug/stats.h" -} #include #include diff --git a/test/core/end2end/h2_ssl_cert_test.cc b/test/core/end2end/h2_ssl_cert_test.cc index 6da5e8396ef..515707af929 100644 --- a/test/core/end2end/h2_ssl_cert_test.cc +++ b/test/core/end2end/h2_ssl_cert_test.cc @@ -16,9 +16,7 @@ * */ -extern "C" { #include "test/core/end2end/end2end_tests.h" -} #include #include @@ -27,7 +25,6 @@ extern "C" { #include #include -extern "C" { #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/env.h" @@ -37,7 +34,6 @@ extern "C" { #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -} #include diff --git a/test/core/security/oauth2_utils.h b/test/core/security/oauth2_utils.h index 15f68bd6d83..85ef9884137 100644 --- a/test/core/security/oauth2_utils.h +++ b/test/core/security/oauth2_utils.h @@ -21,17 +21,9 @@ #include "src/core/lib/security/credentials/credentials.h" -#ifdef __cplusplus -extern "C" { -#endif - /* Fetch oauth2 access token with a credentials object. Does not take ownership. Returns NULL on a failure. The caller should call gpr_free on the token. */ char *grpc_test_fetch_oauth2_token_with_credentials( grpc_call_credentials *creds); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_TEST_CORE_SECURITY_OAUTH2_UTILS_H */ diff --git a/test/core/tsi/transport_security_test_lib.h b/test/core/tsi/transport_security_test_lib.h index ed8ff856dfa..1a04c1f074a 100644 --- a/test/core/tsi/transport_security_test_lib.h +++ b/test/core/tsi/transport_security_test_lib.h @@ -21,10 +21,6 @@ #include "src/core/tsi/transport_security_interface.h" -#ifdef __cplusplus -extern "C" { -#endif - #define TSI_TEST_TINY_HANDSHAKE_BUFFER_SIZE 32 #define TSI_TEST_SMALL_HANDSHAKE_BUFFER_SIZE 128 #define TSI_TEST_SMALL_READ_BUFFER_ALLOCATED_SIZE 41 @@ -173,8 +169,4 @@ void tsi_test_do_handshake(tsi_test_fixture *fixture); the client and server switching its role. */ void tsi_test_do_round_trip(tsi_test_fixture *fixture); -#ifdef __cplusplus -} -#endif - #endif // GRPC_TEST_CORE_TSI_TRANSPORT_SECURITY_TEST_LIB_H_ diff --git a/test/core/util/debugger_macros.cc b/test/core/util/debugger_macros.cc index 72384f2dd7f..ebe74f1fd6f 100644 --- a/test/core/util/debugger_macros.cc +++ b/test/core/util/debugger_macros.cc @@ -29,7 +29,7 @@ #include "src/core/lib/channel/connected_channel.h" #include "src/core/lib/surface/call.h" -extern "C" void grpc_summon_debugger_macros() {} +void grpc_summon_debugger_macros() {} grpc_stream *grpc_transport_stream_from_call(grpc_call *call) { grpc_call_stack *cs = grpc_call_get_call_stack(call); diff --git a/test/core/util/debugger_macros.h b/test/core/util/debugger_macros.h index 24718d93075..c6b3720c5ad 100644 --- a/test/core/util/debugger_macros.h +++ b/test/core/util/debugger_macros.h @@ -19,14 +19,6 @@ #ifndef GRPC_TEST_CORE_UTIL_DEBUGGER_MACROS_H #define GRPC_TEST_CORE_UTIL_DEBUGGER_MACROS_H -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - void grpc_summon_debugger_macros(); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* GRPC_TEST_CORE_UTIL_DEBUGGER_MACROS_H */ diff --git a/test/core/util/grpc_profiler.h b/test/core/util/grpc_profiler.h index 8809f552077..f3d0eaa9621 100644 --- a/test/core/util/grpc_profiler.h +++ b/test/core/util/grpc_profiler.h @@ -19,15 +19,7 @@ #ifndef GRPC_TEST_CORE_UTIL_GRPC_PROFILER_H #define GRPC_TEST_CORE_UTIL_GRPC_PROFILER_H -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - void grpc_profiler_start(const char *filename); void grpc_profiler_stop(); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* GRPC_TEST_CORE_UTIL_GRPC_PROFILER_H */ diff --git a/test/core/util/port.h b/test/core/util/port.h index 602099dea6d..3a4cf4467a3 100644 --- a/test/core/util/port.h +++ b/test/core/util/port.h @@ -19,10 +19,6 @@ #ifndef GRPC_TEST_CORE_UTIL_PORT_H #define GRPC_TEST_CORE_UTIL_PORT_H -#ifdef __cplusplus -extern "C" { -#endif - typedef struct grpc_pick_port_functions { int (*pick_unused_port_fn)(void); int (*pick_unused_port_or_die_fn)(void); @@ -45,8 +41,4 @@ void grpc_recycle_unused_port(int port); /** Request the family of pick_port functions in \a functions be used. */ void grpc_set_pick_port_functions(grpc_pick_port_functions functions); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_TEST_CORE_UTIL_PORT_H */ diff --git a/test/core/util/reconnect_server.h b/test/core/util/reconnect_server.h index 38db729108e..de9150a6a70 100644 --- a/test/core/util/reconnect_server.h +++ b/test/core/util/reconnect_server.h @@ -23,10 +23,6 @@ #include #include "test/core/util/test_tcp_server.h" -#ifdef __cplusplus -extern "C" { -#endif - typedef struct timestamp_list { gpr_timespec timestamp; struct timestamp_list *next; @@ -46,8 +42,4 @@ void reconnect_server_poll(reconnect_server *server, int seconds); void reconnect_server_destroy(reconnect_server *server); void reconnect_server_clear_timestamps(reconnect_server *server); -#ifdef __cplusplus -} -#endif - #endif /* GRPC_TEST_CORE_UTIL_RECONNECT_SERVER_H */ diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h index 051d7e9a3de..619359bfab8 100644 --- a/test/core/util/test_config.h +++ b/test/core/util/test_config.h @@ -21,10 +21,6 @@ #include -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - extern int64_t g_fixture_slowdown_factor; extern int64_t g_poller_slowdown_factor; @@ -43,8 +39,4 @@ gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms); void grpc_test_init(int argc, char **argv); -#ifdef __cplusplus -} -#endif /* __cplusplus */ - #endif /* GRPC_TEST_CORE_UTIL_TEST_CONFIG_H */ diff --git a/test/core/util/trickle_endpoint.h b/test/core/util/trickle_endpoint.h index ca39638ba0d..78f1eeeda2f 100644 --- a/test/core/util/trickle_endpoint.h +++ b/test/core/util/trickle_endpoint.h @@ -21,10 +21,6 @@ #include "src/core/lib/iomgr/endpoint.h" -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - grpc_endpoint *grpc_trickle_endpoint_create(grpc_endpoint *wrap, double bytes_per_second); @@ -34,8 +30,4 @@ size_t grpc_trickle_endpoint_trickle(grpc_exec_ctx *exec_ctx, size_t grpc_trickle_get_backlog(grpc_endpoint *endpoint); -#ifdef __cplusplus -} -#endif // __cplusplus - #endif diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc index e25d2a7597c..4a097e8739e 100644 --- a/test/cpp/common/auth_property_iterator_test.cc +++ b/test/cpp/common/auth_property_iterator_test.cc @@ -22,9 +22,7 @@ #include "src/cpp/common/secure_auth_context.h" #include "test/cpp/util/string_ref_helper.h" -extern "C" { #include "src/core/lib/security/context/security_context.h" -} using ::grpc::testing::ToString; diff --git a/test/cpp/common/channel_arguments_test.cc b/test/cpp/common/channel_arguments_test.cc index cfe64f11b11..6f27ddd1e07 100644 --- a/test/cpp/common/channel_arguments_test.cc +++ b/test/cpp/common/channel_arguments_test.cc @@ -23,10 +23,8 @@ #include #include -extern "C" { #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/socket_mutator.h" -} namespace grpc { namespace testing { diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc index 91c7a3b5df3..0cc32c18530 100644 --- a/test/cpp/common/secure_auth_context_test.cc +++ b/test/cpp/common/secure_auth_context_test.cc @@ -22,9 +22,7 @@ #include #include "test/cpp/util/string_ref_helper.h" -extern "C" { #include "src/core/lib/security/context/security_context.h" -} using grpc::testing::ToString; diff --git a/test/cpp/end2end/client_lb_end2end_test.cc b/test/cpp/end2end/client_lb_end2end_test.cc index c236f76e89c..83bbe45523d 100644 --- a/test/cpp/end2end/client_lb_end2end_test.cc +++ b/test/cpp/end2end/client_lb_end2end_test.cc @@ -33,10 +33,8 @@ #include #include -extern "C" { #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/ext/filters/client_channel/subchannel_index.h" -} #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" diff --git a/test/cpp/end2end/grpclb_end2end_test.cc b/test/cpp/end2end/grpclb_end2end_test.cc index c370302c499..fd84f1e8b3f 100644 --- a/test/cpp/end2end/grpclb_end2end_test.cc +++ b/test/cpp/end2end/grpclb_end2end_test.cc @@ -33,10 +33,8 @@ #include #include -extern "C" { #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/lib/iomgr/sockaddr.h" -} #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index e740ea513a4..0fadc256ec6 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -35,7 +35,7 @@ #include #include -extern "C" { + #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h" #include "src/core/lib/channel/channel_args.h" @@ -49,7 +49,6 @@ extern "C" { #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -} #include "src/proto/grpc/lb/v1/load_balancer.pb.h" diff --git a/test/cpp/interop/interop_test.cc b/test/cpp/interop/interop_test.cc index c18fe1ec1fa..1bf0d8d10fc 100644 --- a/test/cpp/interop/interop_test.cc +++ b/test/cpp/interop/interop_test.cc @@ -37,10 +37,8 @@ #include "test/core/util/port.h" #include "test/cpp/util/test_config.h" -extern "C" { #include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/support/string.h" -} DEFINE_string(extra_server_flags, "", "Extra flags to pass to server."); diff --git a/test/cpp/microbenchmarks/bm_arena.cc b/test/cpp/microbenchmarks/bm_arena.cc index 165b74670d5..5b7c6119199 100644 --- a/test/cpp/microbenchmarks/bm_arena.cc +++ b/test/cpp/microbenchmarks/bm_arena.cc @@ -18,9 +18,7 @@ /* Benchmark arenas */ -extern "C" { #include "src/core/lib/support/arena.h" -} #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" diff --git a/test/cpp/microbenchmarks/bm_call_create.cc b/test/cpp/microbenchmarks/bm_call_create.cc index cf9a42e8c60..a53565bb095 100644 --- a/test/cpp/microbenchmarks/bm_call_create.cc +++ b/test/cpp/microbenchmarks/bm_call_create.cc @@ -29,7 +29,6 @@ #include #include -extern "C" { #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/deadline/deadline_filter.h" #include "src/core/ext/filters/http/client/http_client_filter.h" @@ -43,7 +42,6 @@ extern "C" { #include "src/core/lib/profiling/timers.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/transport_impl.h" -} #include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" diff --git a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc index bc2157b9f13..930081341b9 100644 --- a/test/cpp/microbenchmarks/bm_chttp2_hpack.cc +++ b/test/cpp/microbenchmarks/bm_chttp2_hpack.cc @@ -22,14 +22,14 @@ #include #include #include -extern "C" { + #include "src/core/ext/transport/chttp2/transport/hpack_encoder.h" #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" #include "src/core/lib/slice/slice_internal.h" #include "src/core/lib/slice/slice_string_helpers.h" #include "src/core/lib/transport/static_metadata.h" #include "src/core/lib/transport/timeout_encoding.h" -} + #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" diff --git a/test/cpp/microbenchmarks/bm_closure.cc b/test/cpp/microbenchmarks/bm_closure.cc index 41649b8a731..3b9e261a220 100644 --- a/test/cpp/microbenchmarks/bm_closure.cc +++ b/test/cpp/microbenchmarks/bm_closure.cc @@ -22,12 +22,10 @@ #include #include -extern "C" { #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/iomgr/combiner.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/support/spinlock.h" -} #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/bm_cq.cc b/test/cpp/microbenchmarks/bm_cq.cc index a0c0414f2f5..68252d8bc33 100644 --- a/test/cpp/microbenchmarks/bm_cq.cc +++ b/test/cpp/microbenchmarks/bm_cq.cc @@ -26,9 +26,7 @@ #include #include "test/cpp/microbenchmarks/helpers.h" -extern "C" { #include "src/core/lib/surface/completion_queue.h" -} namespace grpc { namespace testing { diff --git a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc index 57a69acf01e..8d4349a297e 100644 --- a/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc +++ b/test/cpp/microbenchmarks/bm_cq_multiple_threads.cc @@ -25,11 +25,9 @@ #include #include "test/cpp/microbenchmarks/helpers.h" -extern "C" { #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/surface/completion_queue.h" -} struct grpc_pollset { gpr_mu mu; diff --git a/test/cpp/microbenchmarks/bm_error.cc b/test/cpp/microbenchmarks/bm_error.cc index 56b80dfcf6d..aa7822653ff 100644 --- a/test/cpp/microbenchmarks/bm_error.cc +++ b/test/cpp/microbenchmarks/bm_error.cc @@ -21,10 +21,8 @@ #include #include -extern "C" { #include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/error_utils.h" -} #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/bm_metadata.cc b/test/cpp/microbenchmarks/bm_metadata.cc index 360bbabe136..1ed05f7466d 100644 --- a/test/cpp/microbenchmarks/bm_metadata.cc +++ b/test/cpp/microbenchmarks/bm_metadata.cc @@ -21,10 +21,8 @@ #include #include -extern "C" { #include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/static_metadata.h" -} #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/bm_pollset.cc b/test/cpp/microbenchmarks/bm_pollset.cc index eab1e894802..92d76f307e3 100644 --- a/test/cpp/microbenchmarks/bm_pollset.cc +++ b/test/cpp/microbenchmarks/bm_pollset.cc @@ -23,12 +23,10 @@ #include #include -extern "C" { #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/port.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" -} #include "test/cpp/microbenchmarks/helpers.h" #include "third_party/benchmark/include/benchmark/benchmark.h" diff --git a/test/cpp/microbenchmarks/fullstack_fixtures.h b/test/cpp/microbenchmarks/fullstack_fixtures.h index a7f85045052..ba0935719c4 100644 --- a/test/cpp/microbenchmarks/fullstack_fixtures.h +++ b/test/cpp/microbenchmarks/fullstack_fixtures.h @@ -27,7 +27,6 @@ #include #include -extern "C" { #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/endpoint.h" @@ -39,7 +38,6 @@ extern "C" { #include "src/core/lib/surface/server.h" #include "test/core/util/passthru_endpoint.h" #include "test/core/util/port.h" -} #include "src/cpp/client/create_channel_internal.h" #include "test/cpp/microbenchmarks/helpers.h" diff --git a/test/cpp/microbenchmarks/helpers.h b/test/cpp/microbenchmarks/helpers.h index b6cea7c3170..07be589df60 100644 --- a/test/cpp/microbenchmarks/helpers.h +++ b/test/cpp/microbenchmarks/helpers.h @@ -22,11 +22,9 @@ #include #include -extern "C" { #include #include "src/core/lib/debug/stats.h" #include "test/core/util/memory_counters.h" -} #include #include diff --git a/test/cpp/naming/resolver_component_test.cc b/test/cpp/naming/resolver_component_test.cc index 7d0371bea4c..a0ac4c501a5 100644 --- a/test/cpp/naming/resolver_component_test.cc +++ b/test/cpp/naming/resolver_component_test.cc @@ -32,7 +32,6 @@ #include "test/cpp/util/subprocess.h" #include "test/cpp/util/test_config.h" -extern "C" { #include "src/core/ext/filters/client_channel/client_channel.h" #include "src/core/ext/filters/client_channel/resolver.h" #include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h" @@ -47,7 +46,6 @@ extern "C" { #include "src/core/lib/support/string.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" -} using std::vector; using grpc::SubProcess; diff --git a/test/cpp/naming/resolver_component_tests_runner_invoker.cc b/test/cpp/naming/resolver_component_tests_runner_invoker.cc index b14391284d5..96f2e5abb59 100644 --- a/test/cpp/naming/resolver_component_tests_runner_invoker.cc +++ b/test/cpp/naming/resolver_component_tests_runner_invoker.cc @@ -32,10 +32,8 @@ #include "test/cpp/util/subprocess.h" #include "test/cpp/util/test_config.h" -extern "C" { #include "src/core/lib/support/env.h" #include "test/core/util/port.h" -} DEFINE_bool( running_under_bazel, false, diff --git a/test/cpp/performance/writes_per_rpc_test.cc b/test/cpp/performance/writes_per_rpc_test.cc index f4f794cb88f..6c232450210 100644 --- a/test/cpp/performance/writes_per_rpc_test.cc +++ b/test/cpp/performance/writes_per_rpc_test.cc @@ -26,7 +26,6 @@ #include #include -extern "C" { #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/endpoint.h" @@ -38,7 +37,7 @@ extern "C" { #include "src/core/lib/surface/server.h" #include "test/core/util/passthru_endpoint.h" #include "test/core/util/port.h" -} + #include "src/cpp/client/create_channel_internal.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/test_config.h"