diff options
author | 2018-11-30 08:53:08 -0800 | |
---|---|---|
committer | 2018-11-30 08:53:08 -0800 | |
commit | 2a938b0006c098cba1c559afacdd311c55afa723 (patch) | |
tree | 9e1e6ea5479c696d9b49ec3f36553bfa6bc1b536 /test/core/util/test_config.h | |
parent | 7ef8fc826c52b0c4abeaead633d464197fc0bdf8 (diff) |
Add a class to wrap grpc_test_init
Diffstat (limited to 'test/core/util/test_config.h')
-rw-r--r-- | test/core/util/test_config.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/core/util/test_config.h b/test/core/util/test_config.h index 5b3d34799e..a8a2d32aaf 100644 --- a/test/core/util/test_config.h +++ b/test/core/util/test_config.h @@ -37,6 +37,21 @@ gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms); #define GRPC_TEST_PICK_PORT #endif +// Prefer TestEnvironment below. void grpc_test_init(int argc, char** argv); +namespace grpc { +namespace testing { + +// A TestEnvironment object should be alive in the main function of a test. It +// provides test init and shutdown inside. +class TestEnvironment { +public: + TestEnvironment(int argc, char **argv); + ~TestEnvironment(); +}; + +} // namespace testing +} // namespace grpc + #endif /* GRPC_TEST_CORE_UTIL_TEST_CONFIG_H */ |