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
This commit is contained in:
Jun Jie 2020-07-02 13:33:56 +08:00
parent aee0f9d9b5
commit 5c0ef1cb84

View File

@ -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) {