diff options
Diffstat (limited to 'test/core/end2end/end2end_tests.h')
-rw-r--r-- | test/core/end2end/end2end_tests.h | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/test/core/end2end/end2end_tests.h b/test/core/end2end/end2end_tests.h index 87269ec468..33943a7271 100644 --- a/test/core/end2end/end2end_tests.h +++ b/test/core/end2end/end2end_tests.h @@ -21,6 +21,10 @@ #include <grpc/grpc.h> +#ifdef __cplusplus +extern "C" { +#endif + typedef struct grpc_end2end_test_fixture grpc_end2end_test_fixture; typedef struct grpc_end2end_test_config grpc_end2end_test_config; @@ -38,40 +42,44 @@ typedef struct grpc_end2end_test_config grpc_end2end_test_config; #define FAIL_AUTH_CHECK_SERVER_ARG_NAME "fail_auth_check" struct grpc_end2end_test_fixture { - grpc_completion_queue *cq; - grpc_completion_queue *shutdown_cq; - grpc_server *server; - grpc_channel *client; - void *fixture_data; + grpc_completion_queue* cq; + grpc_completion_queue* shutdown_cq; + grpc_server* server; + grpc_channel* client; + void* fixture_data; }; struct grpc_end2end_test_config { /* A descriptive name for this test fixture. */ - const char *name; + const char* name; /* Which features are supported by this fixture. See feature flags above. */ uint32_t feature_mask; - grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args *client_args, - grpc_channel_args *server_args); - void (*init_client)(grpc_end2end_test_fixture *f, - grpc_channel_args *client_args); - void (*init_server)(grpc_end2end_test_fixture *f, - grpc_channel_args *server_args); - void (*tear_down_data)(grpc_end2end_test_fixture *f); + grpc_end2end_test_fixture (*create_fixture)(grpc_channel_args* client_args, + grpc_channel_args* server_args); + void (*init_client)(grpc_end2end_test_fixture* f, + grpc_channel_args* client_args); + void (*init_server)(grpc_end2end_test_fixture* f, + grpc_channel_args* server_args); + void (*tear_down_data)(grpc_end2end_test_fixture* f); }; void grpc_end2end_tests_pre_init(void); -void grpc_end2end_tests(int argc, char **argv, grpc_end2end_test_config config); +void grpc_end2end_tests(int argc, char** argv, grpc_end2end_test_config config); -const char *get_host_override_string(const char *str, +const char* get_host_override_string(const char* str, grpc_end2end_test_config config); /* Returns a pointer to a statically allocated slice: future invocations overwrite past invocations, not threadsafe, etc... */ -const grpc_slice *get_host_override_slice(const char *str, +const grpc_slice* get_host_override_slice(const char* str, grpc_end2end_test_config config); -void validate_host_override_string(const char *pattern, grpc_slice str, +void validate_host_override_string(const char* pattern, grpc_slice str, grpc_end2end_test_config config); +#ifdef __cplusplus +} +#endif + #endif /* GRPC_TEST_CORE_END2END_END2END_TESTS_H */ |