Index: base/files/file_path_unittest.cc |
diff --git a/base/files/file_path_unittest.cc b/base/files/file_path_unittest.cc |
index c16293861ce7a6b6d94a6f6304486cae274b05a6..60eaa8f002f2e1103ad78dfc6fdaf4f5b7849bb0 100644 |
--- a/base/files/file_path_unittest.cc |
+++ b/base/files/file_path_unittest.cc |
@@ -2,6 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include <sstream> |
+ |
#include "base/basictypes.h" |
#include "base/files/file_path.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -1273,4 +1275,13 @@ TEST_F(FilePathTest, ContentUriTest) { |
} |
#endif |
+// Test the PrintTo overload for FilePath (used when a test fails to compare two |
+// FilePaths). |
+TEST_F(FilePathTest, PrintTo) { |
+ std::stringstream ss; |
+ FilePath fp(FPL("foo")); |
+ base::PrintTo(fp, &ss); |
+ EXPECT_EQ("foo", ss.str()); |
+} |
+ |
} // namespace base |