aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/internal
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-03-24 20:39:44 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-03-24 20:39:44 +0000
commit2c0fc6d415343b732a4ae39cce1458be1170b9f6 (patch)
treec5ab10847116c91a6e4bc12a2945b3d77f70fd21 /include/gtest/internal
parent1f8a50e429735ded6b27bfdfb96d0e0aa4d8627b (diff)
downloadgoogletest-2c0fc6d415343b732a4ae39cce1458be1170b9f6.tar.gz
googletest-2c0fc6d415343b732a4ae39cce1458be1170b9f6.tar.bz2
googletest-2c0fc6d415343b732a4ae39cce1458be1170b9f6.zip
Cleans up death test implementation (by Vlad Losev); changes the XML format to be closer to junitreport (by Zhanyong Wan).
Diffstat (limited to 'include/gtest/internal')
-rw-r--r--include/gtest/internal/gtest-death-test-internal.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/include/gtest/internal/gtest-death-test-internal.h b/include/gtest/internal/gtest-death-test-internal.h
index ff2e490e..1e12a3df 100644
--- a/include/gtest/internal/gtest-death-test-internal.h
+++ b/include/gtest/internal/gtest-death-test-internal.h
@@ -41,6 +41,8 @@
#if GTEST_HAS_DEATH_TEST && GTEST_OS_WINDOWS
#include <io.h>
+#elif GTEST_HAS_DEATH_TEST
+#include <unistd.h>
#endif // GTEST_HAS_DEATH_TEST && GTEST_OS_WINDOWS
namespace testing {
@@ -196,17 +198,17 @@ class InternalRunDeathTestFlag {
InternalRunDeathTestFlag(const String& file,
int line,
int index,
- int status_fd)
- : file_(file), line_(line), index_(index), status_fd_(status_fd) {}
+ int write_fd)
+ : file_(file), line_(line), index_(index), write_fd_(write_fd) {}
~InternalRunDeathTestFlag() {
- if (status_fd_ >= 0)
+ if (write_fd_ >= 0)
// Suppress MSVC complaints about POSIX functions.
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4996)
#endif // _MSC_VER
- close(status_fd_);
+ close(write_fd_);
#ifdef _MSC_VER
#pragma warning(pop)
#endif // _MSC_VER
@@ -215,13 +217,13 @@ class InternalRunDeathTestFlag {
String file() const { return file_; }
int line() const { return line_; }
int index() const { return index_; }
- int status_fd() const { return status_fd_; }
+ int write_fd() const { return write_fd_; }
private:
String file_;
int line_;
int index_;
- int status_fd_;
+ int write_fd_;
GTEST_DISALLOW_COPY_AND_ASSIGN_(InternalRunDeathTestFlag);
};