From e96d247b20116646f343b6e2ec37af154f655977 Mon Sep 17 00:00:00 2001 From: vladlosev Date: Thu, 22 Jul 2010 21:07:19 +0000 Subject: Allows Google Test to build on OSes other then a pre-determined set and implements GTEST_HAS_POSIX_REGEX condition for compatibility with them. --- test/gtest-port_test.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') 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 -- cgit v1.2.3