aboutsummaryrefslogtreecommitdiffstats
path: root/src/gtest.cc
diff options
context:
space:
mode:
authorkosak <kosak@google.com>2015-07-27 21:36:08 +0000
committerkosak <kosak@google.com>2015-07-27 21:36:08 +0000
commitc33ce7c159055c956d97dbdb40532f20d71351d8 (patch)
treecd14ef21dc2acd83419f52cb4f4949f1cde9c79a /src/gtest.cc
parentf487e9510be94c70f08485887a16b48d756bf38f (diff)
downloadgoogletest-c33ce7c159055c956d97dbdb40532f20d71351d8.tar.gz
googletest-c33ce7c159055c956d97dbdb40532f20d71351d8.tar.bz2
googletest-c33ce7c159055c956d97dbdb40532f20d71351d8.zip
Inject the custom InitGoogleTest function using a macro.
Diffstat (limited to 'src/gtest.cc')
-rw-r--r--src/gtest.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gtest.cc b/src/gtest.cc
index bfc4f4fe..487592a6 100644
--- a/src/gtest.cc
+++ b/src/gtest.cc
@@ -5361,13 +5361,21 @@ void InitGoogleTestImpl(int* argc, CharType** argv) {
//
// Calling the function for the second time has no user-visible effect.
void InitGoogleTest(int* argc, char** argv) {
+#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
+ GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);
+#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
internal::InitGoogleTestImpl(argc, argv);
+#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
}
// This overloaded version can be used in Windows programs compiled in
// UNICODE mode.
void InitGoogleTest(int* argc, wchar_t** argv) {
+#if defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
+ GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_(argc, argv);
+#else // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
internal::InitGoogleTestImpl(argc, argv);
+#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
}
} // namespace testing