aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/gtest-port_test.cc11
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