Inject the custom InitGoogleTest function using a macro.
This commit is contained in:
parent
f487e9510b
commit
c33ce7c159
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user