aboutsummaryrefslogtreecommitdiffstats
path: root/include/gtest/internal/gtest-filepath.h
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-01-26 19:21:32 +0000
committerzhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925>2009-01-26 19:21:32 +0000
commit650d5bf3ba200ecbeccbfcec6e7b6cc6f40a1f60 (patch)
tree2c3c7d9501a94340bd4ee3bd4858ebc305bca3eb /include/gtest/internal/gtest-filepath.h
parentb593ccbbbe6dcef342f833a37e41af0b750c7f14 (diff)
downloadgoogletest-650d5bf3ba200ecbeccbfcec6e7b6cc6f40a1f60.tar.gz
googletest-650d5bf3ba200ecbeccbfcec6e7b6cc6f40a1f60.tar.bz2
googletest-650d5bf3ba200ecbeccbfcec6e7b6cc6f40a1f60.zip
Fixes the bug where the XML output path is affected by test changing the current directory. By Stefan Weigand.
Diffstat (limited to 'include/gtest/internal/gtest-filepath.h')
-rw-r--r--include/gtest/internal/gtest-filepath.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/gtest/internal/gtest-filepath.h b/include/gtest/internal/gtest-filepath.h
index 07fb86ae..1b2f5869 100644
--- a/include/gtest/internal/gtest-filepath.h
+++ b/include/gtest/internal/gtest-filepath.h
@@ -93,6 +93,12 @@ class FilePath {
int number,
const char* extension);
+ // Given directory = "dir", relative_path = "test.xml",
+ // returns "dir/test.xml".
+ // On Windows, uses \ as the separator rather than /.
+ static FilePath ConcatPaths(const FilePath& directory,
+ const FilePath& relative_path);
+
// Returns a pathname for a file that does not currently exist. The pathname
// will be directory/base_name.extension or
// directory/base_name_<number>.extension if directory/base_name.extension
@@ -164,6 +170,9 @@ class FilePath {
// root directory per disk drive.)
bool IsRootDirectory() const;
+ // Returns true if pathname describes an absolute path.
+ bool IsAbsolutePath() const;
+
private:
// Replaces multiple consecutive separators with a single separator.
// For example, "bar///foo" becomes "bar/foo". Does not eliminate other