diff options
author | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-11 06:37:32 +0000 |
---|---|---|
committer | vladlosev <vladlosev@861a406c-534a-0410-8894-cb66d6ee9925> | 2010-02-11 06:37:32 +0000 |
commit | 9d965bbeefdd8e309e23145b1b475a0961e108a7 (patch) | |
tree | d19994b3c241eddca00ed136db5ea9d5692b0aef | |
parent | cfcbc298cd91806e0e3417e03fce42bc4f1fa150 (diff) | |
download | googletest-9d965bbeefdd8e309e23145b1b475a0961e108a7.tar.gz googletest-9d965bbeefdd8e309e23145b1b475a0961e108a7.tar.bz2 googletest-9d965bbeefdd8e309e23145b1b475a0961e108a7.zip |
Adds Solaris support to test scripts.
-rw-r--r-- | src/gtest-port.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gtest-port.cc b/src/gtest-port.cc index 7d89e26d..b9504f56 100644 --- a/src/gtest-port.cc +++ b/src/gtest-port.cc @@ -460,8 +460,15 @@ class CapturedStream { char temp_file_path[MAX_PATH + 1] = { '\0' }; // NOLINT ::GetTempPathA(sizeof(temp_dir_path), temp_dir_path); - ::GetTempFileNameA(temp_dir_path, "gtest_redir", 0, temp_file_path); + const UINT success = ::GetTempFileNameA(temp_dir_path, + "gtest_redir", + 0, // Generate unique file name. + temp_file_path); + GTEST_CHECK_(success != 0) + << "Unable to create a temporary file in " << temp_dir_path; const int captured_fd = creat(temp_file_path, _S_IREAD | _S_IWRITE); + GTEST_CHECK_(captured_fd != -1) << "Unable to open temporary file " + << temp_file_path; filename_ = temp_file_path; #else // There's no guarantee that a test has write access to the |