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

Unified Diff: base/files/file_path_unittest.cc

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 | « base/files/file_path.cc ('k') | base/test/test_file_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « base/files/file_path.cc ('k') | base/test/test_file_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698