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.
|
// Calling the function for the second time has no user-visible effect.
|
||||||
void InitGoogleTest(int* argc, char** argv) {
|
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);
|
internal::InitGoogleTestImpl(argc, argv);
|
||||||
|
#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This overloaded version can be used in Windows programs compiled in
|
// This overloaded version can be used in Windows programs compiled in
|
||||||
// UNICODE mode.
|
// UNICODE mode.
|
||||||
void InitGoogleTest(int* argc, wchar_t** argv) {
|
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);
|
internal::InitGoogleTestImpl(argc, argv);
|
||||||
|
#endif // defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace testing
|
} // namespace testing
|
||||||
|
Loading…
Reference in New Issue
Block a user