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
pull/2920/head
Jun Jie 4 years ago
parent aee0f9d9b5
commit 5c0ef1cb84
  1. 4
      googletest/test/googletest-death-test-test.cc

@ -1376,7 +1376,11 @@ void DieWithMessage(const char* message) {
TEST(MatcherDeathTest, DoesNotBreakBareRegexMatching) {
// googletest tests this, of course; here we ensure that including googlemock
// has not broken it.
#if GTEST_USES_POSIX_RE
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) {

Loading…
Cancel
Save