Implements EXPECT_DEATH_IF_SUPPORTED (by Vlad Losev); Fixes compatibility with Symbian (by Araceli Checa); Removes GetCapturedStderr()'s dependency on std::string (by Vlad Losev).

This commit is contained in:
zhanyong.wan
2009-08-07 06:47:47 +00:00
parent 18c31d64e1
commit ed8500b341
8 changed files with 88 additions and 56 deletions

View File

@@ -452,11 +452,7 @@ bool DeathTestImpl::Passed(bool status_ok) {
if (!spawned())
return false;
#if GTEST_HAS_GLOBAL_STRING
const ::string error_message = GetCapturedStderr();
#else
const ::std::string error_message = GetCapturedStderr();
#endif // GTEST_HAS_GLOBAL_STRING
const String error_message = GetCapturedStderr();
bool success = false;
Message buffer;
@@ -473,7 +469,7 @@ bool DeathTestImpl::Passed(bool status_ok) {
break;
case DIED:
if (status_ok) {
if (RE::PartialMatch(error_message, *regex())) {
if (RE::PartialMatch(error_message.c_str(), *regex())) {
success = true;
} else {
buffer << " Result: died but not with expected error.\n"