Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(695)

Unified Diff: base/files/file_path.h

Issue 1139883004: Testing: Fixed printing FilePaths when a test fails comparing them. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bauerb-profiles-ephemeral
Patch Set: Remove BASE_EXPORT; see if this fixes Windows compile. Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | base/files/file_path.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_path.h
diff --git a/base/files/file_path.h b/base/files/file_path.h
index 5225b12ffd4c8cab478e5b73c8f6a9823c0c3f9c..3a0513d93b316ed08dd647ace19130e8aefe3f54 100644
--- a/base/files/file_path.h
+++ b/base/files/file_path.h
@@ -103,6 +103,8 @@
#define BASE_FILES_FILE_PATH_H_
#include <stddef.h>
+
+#include <iosfwd>
#include <string>
#include <vector>
@@ -433,10 +435,13 @@ class BASE_EXPORT FilePath {
StringType path_;
};
-} // namespace base
-
// This is required by googletest to print a readable output on test failures.
-BASE_EXPORT extern void PrintTo(const base::FilePath& path, std::ostream* out);
+// This is declared here for use in gtest-based unit tests but is defined in
+// the test_support_base target. Depend on that to use this in your unit test.
+// This should not be used in production code - call ToString() instead.
+void PrintTo(const FilePath& path, std::ostream* out);
+
+} // namespace base
// Macros for string literal initialization of FilePath::CharType[], and for
// using a FilePath::CharType[] in a printf-style format string.
« no previous file with comments | « no previous file | base/files/file_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698