diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-07-22 21:07:19 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-07-22 21:07:19 +0000 |
commit | e96d247b20116646f343b6e2ec37af154f655977 (patch) | |
tree | 6182008e59b5ef52fa7b5967a64e6d7649c855ef /test/gtest-port_test.cc | |
parent | e2a7f03b80fc0e9e6a6f36acb43776509486a6d4 (diff) | |
download | googletest-e96d247b20116646f343b6e2ec37af154f655977.tar.gz googletest-e96d247b20116646f343b6e2ec37af154f655977.tar.bz2 googletest-e96d247b20116646f343b6e2ec37af154f655977.zip |
Allows Google Test to build on OSes other then a pre-determined set and implements GTEST_HAS_POSIX_REGEX condition for compatibility with them.
Diffstat (limited to 'test/gtest-port_test.cc')
-rw-r--r-- | test/gtest-port_test.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/gtest-port_test.cc b/test/gtest-port_test.cc index 6f1512ce..6cdbfab4 100644 --- a/test/gtest-port_test.cc +++ b/test/gtest-port_test.cc @@ -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 |