summaryrefslogtreecommitdiffstats
path: root/base/file_path.h
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-26 21:21:13 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-26 21:21:13 +0000
commit1a0af4046fa9f6440f426598f653e1bb0035a7f2 (patch)
treefbe2013258652836ec8ab1486bc7514594bcb185 /base/file_path.h
parent8eee49962d8dea78ec711baaba724204f1babe76 (diff)
downloadchromium_src-1a0af4046fa9f6440f426598f653e1bb0035a7f2.zip
chromium_src-1a0af4046fa9f6440f426598f653e1bb0035a7f2.tar.gz
chromium_src-1a0af4046fa9f6440f426598f653e1bb0035a7f2.tar.bz2
PrintTo for FilePath -- Pretty-print when comparing FilePaths in gtest
Used in upcoming http://codereview.chromium.org/10996005/ (and potentially others). BUG=148539 TEST=Write a test with an error comparing two FilePaths and confirm the paths' values are printed by gtest as opposed to the byte-representation. Review URL: https://chromiumcodereview.appspot.com/10984028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@158893 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.h')
-rw-r--r--base/file_path.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/file_path.h b/base/file_path.h
index 3770a8e..09e8269 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -396,6 +396,9 @@ class BASE_EXPORT FilePath {
StringType path_;
};
+// This is required by googletest to print a readable output on test failures.
+BASE_EXPORT extern void PrintTo(const FilePath& path, std::ostream* out);
+
// Macros for string literal initialization of FilePath::CharType[], and for
// using a FilePath::CharType[] in a printf-style format string.
#if defined(OS_POSIX)