Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
76491b74
Commit
76491b74
authored
May 18, 2017
by
Gennadiy Civil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes add ability to overwrite TempDir(), issue
https://github.com/google/googletest/issues/1093
parent
7cc548dc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
gtest.h
googletest/include/gtest/internal/custom/gtest.h
+4
-0
gtest.cc
googletest/src/gtest.cc
+3
-1
No files found.
googletest/include/gtest/internal/custom/gtest.h
View file @
76491b74
...
@@ -33,6 +33,10 @@
...
@@ -33,6 +33,10 @@
// GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of
// GTEST_OS_STACK_TRACE_GETTER_ - The name of an implementation of
// OsStackTraceGetterInterface.
// OsStackTraceGetterInterface.
//
//
// GTEST_CUSTOM_TEMPDIR_FUNCTION_ - An override for testing::TempDir().
// See testing::TempDir for semantics and
// signature.
//
// ** Custom implementation starts here **
// ** Custom implementation starts here **
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_
...
...
googletest/src/gtest.cc
View file @
76491b74
...
@@ -5385,6 +5385,9 @@ void InitGoogleTest(int* argc, wchar_t** argv) {
...
@@ -5385,6 +5385,9 @@ void InitGoogleTest(int* argc, wchar_t** argv) {
}
}
std
::
string
TempDir
()
{
std
::
string
TempDir
()
{
#if defined(GTEST_CUSTOM_TEMPDIR_FUNCTION_)
return
GTEST_CUSTOM_TEMPDIR_FUNCTION_
();
#endif
#if GTEST_OS_WINDOWS_MOBILE
#if GTEST_OS_WINDOWS_MOBILE
return
"
\\
temp
\\
"
;
return
"
\\
temp
\\
"
;
#elif GTEST_OS_WINDOWS
#elif GTEST_OS_WINDOWS
...
@@ -5402,5 +5405,4 @@ std::string TempDir() {
...
@@ -5402,5 +5405,4 @@ std::string TempDir() {
#endif // GTEST_OS_WINDOWS_MOBILE
#endif // GTEST_OS_WINDOWS_MOBILE
}
}
}
// namespace testing
}
// namespace testing
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment