Inject the name of the Init function using a macro.
This commit is contained in:
parent
4188ec3529
commit
f487e9510b
@ -290,6 +290,10 @@
|
|||||||
# define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
|
# define GTEST_PROJECT_URL_ "http://code.google.com/p/googletest/"
|
||||||
#endif // !defined(GTEST_DEV_EMAIL_)
|
#endif // !defined(GTEST_DEV_EMAIL_)
|
||||||
|
|
||||||
|
#if !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
|
||||||
|
# define GTEST_INIT_GOOGLE_TEST_NAME_ "testing::InitGoogleTest"
|
||||||
|
#endif // !defined(GTEST_INIT_GOOGLE_TEST_NAME_)
|
||||||
|
|
||||||
// Determines the version of gcc that is used to compile this.
|
// Determines the version of gcc that is used to compile this.
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
// 40302 means version 4.3.2.
|
// 40302 means version 4.3.2.
|
||||||
|
@ -382,15 +382,17 @@ TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) {
|
|||||||
// the platform. The test will produce compiler errors in case of failure.
|
// the platform. The test will produce compiler errors in case of failure.
|
||||||
// For simplicity, we only cover the most important platforms here.
|
// For simplicity, we only cover the most important platforms here.
|
||||||
TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine) {
|
TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine) {
|
||||||
#if GTEST_HAS_POSIX_RE
|
#if !GTEST_USES_PCRE
|
||||||
|
# if GTEST_HAS_POSIX_RE
|
||||||
|
|
||||||
EXPECT_TRUE(GTEST_USES_POSIX_RE);
|
EXPECT_TRUE(GTEST_USES_POSIX_RE);
|
||||||
|
|
||||||
#else
|
# else
|
||||||
|
|
||||||
EXPECT_TRUE(GTEST_USES_SIMPLE_RE);
|
EXPECT_TRUE(GTEST_USES_SIMPLE_RE);
|
||||||
|
|
||||||
#endif
|
# endif
|
||||||
|
#endif // !GTEST_USES_PCRE
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GTEST_USES_POSIX_RE
|
#if GTEST_USES_POSIX_RE
|
||||||
|
Loading…
Reference in New Issue
Block a user