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:
parent
aee0f9d9b5
commit
5c0ef1cb84
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user