summaryrefslogtreecommitdiffstats
path: root/base/file_util_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/file_util_unittest.cc')
-rw-r--r--base/file_util_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc
index ea29df5..85b650a 100644
--- a/base/file_util_unittest.cc
+++ b/base/file_util_unittest.cc
@@ -162,7 +162,7 @@ class FindResultCollector {
// Simple function to dump some text into a new file.
void CreateTextFile(const FilePath& filename,
const std::wstring& contents) {
- std::ofstream file;
+ std::wofstream file;
file.open(filename.value().c_str());
ASSERT_TRUE(file.is_open());
file << contents;
@@ -175,7 +175,7 @@ std::wstring ReadTextFile(const FilePath& filename) {
std::wifstream file;
file.open(filename.value().c_str());
EXPECT_TRUE(file.is_open());
- file.getline(contents, 64);
+ file.getline(contents, arraysize(contents));
file.close();
return std::wstring(contents);
}