summaryrefslogtreecommitdiff
path: root/src/mongo/util/concurrency/thread_pool_test_common.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/concurrency/thread_pool_test_common.cpp')
-rw-r--r--src/mongo/util/concurrency/thread_pool_test_common.cpp63
1 files changed, 31 insertions, 32 deletions
diff --git a/src/mongo/util/concurrency/thread_pool_test_common.cpp b/src/mongo/util/concurrency/thread_pool_test_common.cpp
index 1f965e4a2c4..ea63df2df83 100644
--- a/src/mongo/util/concurrency/thread_pool_test_common.cpp
+++ b/src/mongo/util/concurrency/thread_pool_test_common.cpp
@@ -99,40 +99,39 @@ public:
}
};
-#define COMMON_THREAD_POOL_TEST(TEST_NAME) \
- class TPT_##TEST_NAME : public CommonThreadPoolTestFixture { \
- public: \
- TPT_##TEST_NAME(ThreadPoolFactory makeThreadPool) \
- : CommonThreadPoolTestFixture(std::move(makeThreadPool)) {} \
- \
- private: \
- void _doTest() override; \
- static const TptRegistrationAgent _agent; \
- }; \
- const TptRegistrationAgent TPT_##TEST_NAME::_agent(#TEST_NAME, \
- [](ThreadPoolFactory makeThreadPool) { \
- return stdx::make_unique<TPT_##TEST_NAME>(std::move(makeThreadPool)); \
- }); \
+#define COMMON_THREAD_POOL_TEST(TEST_NAME) \
+ class TPT_##TEST_NAME : public CommonThreadPoolTestFixture { \
+ public: \
+ TPT_##TEST_NAME(ThreadPoolFactory makeThreadPool) \
+ : CommonThreadPoolTestFixture(std::move(makeThreadPool)) {} \
+ \
+ private: \
+ void _doTest() override; \
+ static const TptRegistrationAgent _agent; \
+ }; \
+ const TptRegistrationAgent TPT_##TEST_NAME::_agent( \
+ #TEST_NAME, [](ThreadPoolFactory makeThreadPool) { \
+ return stdx::make_unique<TPT_##TEST_NAME>(std::move(makeThreadPool)); \
+ }); \
void TPT_##TEST_NAME::_doTest()
-#define COMMON_THREAD_POOL_DEATH_TEST(TEST_NAME, MATCH_EXPR) \
- class TPT_##TEST_NAME : public CommonThreadPoolTestFixture { \
- public: \
- TPT_##TEST_NAME(ThreadPoolFactory makeThreadPool) \
- : CommonThreadPoolTestFixture(std::move(makeThreadPool)) {} \
- \
- private: \
- void _doTest() override; \
- static const TptDeathRegistrationAgent<TPT_##TEST_NAME> _agent; \
- }; \
- const TptDeathRegistrationAgent<TPT_##TEST_NAME> TPT_##TEST_NAME::_agent( \
- #TEST_NAME, \
- [](ThreadPoolFactory makeThreadPool) { \
- return stdx::make_unique<TPT_##TEST_NAME>(std::move(makeThreadPool)); \
- }); \
- std::string getDeathTestPattern(TPT_##TEST_NAME*) { \
- return MATCH_EXPR; \
- } \
+#define COMMON_THREAD_POOL_DEATH_TEST(TEST_NAME, MATCH_EXPR) \
+ class TPT_##TEST_NAME : public CommonThreadPoolTestFixture { \
+ public: \
+ TPT_##TEST_NAME(ThreadPoolFactory makeThreadPool) \
+ : CommonThreadPoolTestFixture(std::move(makeThreadPool)) {} \
+ \
+ private: \
+ void _doTest() override; \
+ static const TptDeathRegistrationAgent<TPT_##TEST_NAME> _agent; \
+ }; \
+ const TptDeathRegistrationAgent<TPT_##TEST_NAME> TPT_##TEST_NAME::_agent( \
+ #TEST_NAME, [](ThreadPoolFactory makeThreadPool) { \
+ return stdx::make_unique<TPT_##TEST_NAME>(std::move(makeThreadPool)); \
+ }); \
+ std::string getDeathTestPattern(TPT_##TEST_NAME*) { \
+ return MATCH_EXPR; \
+ } \
void TPT_##TEST_NAME::_doTest()
COMMON_THREAD_POOL_TEST(UnusedPool) {