Allows Google Test to build on OSes other then a pre-determined set and implements GTEST_HAS_POSIX_REGEX condition for compatibility with them.

This commit is contained in:
vladlosev
2010-07-22 21:07:19 +00:00
parent e2a7f03b80
commit e96d247b20
3 changed files with 44 additions and 17 deletions

View File

@@ -284,6 +284,17 @@ TEST(GtestCheckDeathTest, LivesSilentlyOnSuccess) {
#endif // GTEST_HAS_DEATH_TEST
// Verifies that Google Test choose regular expression engine appropriate to
// the platform. The test will produce compiler errors in case of failure.
// For simplicity, we only cover the most important platforms here.
TEST(RegexEngineSelectionTest, SelectsCorrectRegexEngine) {
#if GTEST_HAS_POSIX_RE
EXPECT_TRUE(GTEST_USES_POSIX_RE);
#else
EXPECT_TRUE(GTEST_USES_SIMPLE_RE);
#endif
}
#if GTEST_USES_POSIX_RE
#if GTEST_HAS_TYPED_TEST