diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-08-07 06:47:47 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-08-07 06:47:47 +0000 |
commit | 535de5338c3a76bc75905694ac15731e3f0bfc8d (patch) | |
tree | ca41796e67c988e8985cc084e1c6136aa609df39 /src/gtest-death-test.cc | |
parent | 96ac1fd602a5d0c8c9c32c0d0bfd065cf73129e6 (diff) | |
download | gtest-535de5338c3a76bc75905694ac15731e3f0bfc8d.tar.gz gtest-535de5338c3a76bc75905694ac15731e3f0bfc8d.tar.bz2 gtest-535de5338c3a76bc75905694ac15731e3f0bfc8d.tar.xz |
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).
git-svn-id: http://googletest.googlecode.com/svn/trunk@289 861a406c-534a-0410-8894-cb66d6ee9925
Diffstat (limited to 'src/gtest-death-test.cc')
-rw-r--r-- | src/gtest-death-test.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/gtest-death-test.cc b/src/gtest-death-test.cc index 0d4110b..02ce48d 100644 --- a/src/gtest-death-test.cc +++ b/src/gtest-death-test.cc @@ -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" |