diff options
author | Gennadiy Civil <misterg@google.com> | 2018-02-09 15:41:09 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2018-02-09 15:41:09 (GMT) |
commit | ec7faa943d7817c81ce7bdf71a21ebc9244dc8de (patch) | |
tree | 93570e0098d107f38417c6524b79c26dbda37120 /googletest/src/gtest-death-test.cc | |
parent | a3c73ed28d7995b18d48027aee740ad827fcc157 (diff) | |
download | googletest-ec7faa943d7817c81ce7bdf71a21ebc9244dc8de.zip googletest-ec7faa943d7817c81ce7bdf71a21ebc9244dc8de.tar.gz googletest-ec7faa943d7817c81ce7bdf71a21ebc9244dc8de.tar.bz2 |
mergesrefs/pull/1448/head
Diffstat (limited to 'googletest/src/gtest-death-test.cc')
-rw-r--r-- | googletest/src/gtest-death-test.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/googletest/src/gtest-death-test.cc b/googletest/src/gtest-death-test.cc index 2bbb1bc..00e231b 100644 --- a/googletest/src/gtest-death-test.cc +++ b/googletest/src/gtest-death-test.cc @@ -73,7 +73,7 @@ namespace testing { // Constants. // The default death test style. -static const char kDefaultDeathTestStyle[] = "fast"; +static const char kDefaultDeathTestStyle[] = "threadsafe"; GTEST_DEFINE_string_( death_test_style, @@ -555,7 +555,13 @@ bool DeathTestImpl::Passed(bool status_ok) { break; case DIED: if (status_ok) { +# if GTEST_USES_PCRE + // PCRE regexes support embedded NULs. + // GTEST_USES_PCRE is defined only in google3 mode + const bool matched = RE::PartialMatch(error_message, *regex()); +# else const bool matched = RE::PartialMatch(error_message.c_str(), *regex()); +# endif // GTEST_USES_PCRE if (matched) { success = true; } else { |