Makes gtest wokr on MinGW (by Vlad Losev); removes unused linked_ptr::release() method (by Zhanyong Wan).

This commit is contained in:
zhanyong.wan
2010-10-11 06:28:54 +00:00
parent 9c48242258
commit c18438ca29
5 changed files with 65 additions and 58 deletions

View File

@@ -526,11 +526,11 @@ bool DeathTestImpl::Passed(bool status_ok) {
//
class WindowsDeathTest : public DeathTestImpl {
public:
WindowsDeathTest(const char* statement,
const RE* regex,
WindowsDeathTest(const char* a_statement,
const RE* a_regex,
const char* file,
int line)
: DeathTestImpl(statement, regex), file_(file), line_(line) {}
: DeathTestImpl(a_statement, a_regex), file_(file), line_(line) {}
// All of these virtual functions are inherited from DeathTest.
virtual int Wait();
@@ -587,12 +587,12 @@ int WindowsDeathTest::Wait() {
GTEST_DEATH_TEST_CHECK_(
WAIT_OBJECT_0 == ::WaitForSingleObject(child_handle_.Get(),
INFINITE));
DWORD status;
GTEST_DEATH_TEST_CHECK_(::GetExitCodeProcess(child_handle_.Get(), &status)
!= FALSE);
DWORD status_code;
GTEST_DEATH_TEST_CHECK_(
::GetExitCodeProcess(child_handle_.Get(), &status_code) != FALSE);
child_handle_.Reset();
set_status(static_cast<int>(status));
return this->status();
set_status(static_cast<int>(status_code));
return status();
}
// The AssumeRole process for a Windows death test. It creates a child