Commit 5c0ef1cb by Jun Jie

Fix test failing when simple regex is used

Test MatcherDeathTest.DoesNotBreakBareRegexMatching fails when googletest uses simple regex instead of posix regex. This partially fixes #2687
parent aee0f9d9
...@@ -1376,7 +1376,11 @@ void DieWithMessage(const char* message) { ...@@ -1376,7 +1376,11 @@ void DieWithMessage(const char* message) {
TEST(MatcherDeathTest, DoesNotBreakBareRegexMatching) { TEST(MatcherDeathTest, DoesNotBreakBareRegexMatching) {
// googletest tests this, of course; here we ensure that including googlemock // googletest tests this, of course; here we ensure that including googlemock
// has not broken it. // has not broken it.
#if GTEST_USES_POSIX_RE
EXPECT_DEATH(DieWithMessage("O, I die, Horatio."), "I d[aeiou]e"); EXPECT_DEATH(DieWithMessage("O, I die, Horatio."), "I d[aeiou]e");
#else
EXPECT_DEATH(DieWithMessage("O, I die, Horatio."), "I di?e");
#endif
} }
TEST(MatcherDeathTest, MonomorphicMatcherMatches) { TEST(MatcherDeathTest, MonomorphicMatcherMatches) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment