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
CrOS-Libchrome-Original-Commit: 1a0af4046fa9f6440f426598f653e1bb0035a7f2
diff --git a/base/file_path.cc b/base/file_path.cc
index 98cbfde..094c699 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -1232,3 +1232,7 @@
return *this;
#endif
}
+
+void PrintTo(const FilePath& path, std::ostream* out) {
+ *out << path.value();
+}