Commit db33d307 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 8

Don't assume boost::path contains narrow characters

Summary: Because it contains `wchar_t`'s on Windows.

Reviewed By: yfeldblum

Differential Revision: D3672098

fbshipit-source-id: b49db642dedf48bf7379cf339130c93f52a22f9a
parent d449fce2
...@@ -267,8 +267,8 @@ TEST_F(FileUtilTest, preadv) { ...@@ -267,8 +267,8 @@ TEST_F(FileUtilTest, preadv) {
TEST(String, readFile) { TEST(String, readFile) {
const TemporaryFile afileTemp, emptyFileTemp; const TemporaryFile afileTemp, emptyFileTemp;
auto afile = afileTemp.path(); auto afile = afileTemp.path().string();
auto emptyFile = emptyFileTemp.path(); auto emptyFile = emptyFileTemp.path().string();
EXPECT_TRUE(writeFile(string(), emptyFile.c_str())); EXPECT_TRUE(writeFile(string(), emptyFile.c_str()));
EXPECT_TRUE(writeFile(StringPiece("bar"), afile.c_str())); EXPECT_TRUE(writeFile(StringPiece("bar"), afile.c_str()));
...@@ -300,7 +300,7 @@ TEST(String, readFile) { ...@@ -300,7 +300,7 @@ TEST(String, readFile) {
class ReadFileFd : public ::testing::Test { class ReadFileFd : public ::testing::Test {
protected: protected:
void SetUp() override { void SetUp() override {
ASSERT_TRUE(writeFile(StringPiece("bar"), aFile.path().c_str())); ASSERT_TRUE(writeFile(StringPiece("bar"), aFile.path().string().c_str()));
} }
TemporaryFile aFile; TemporaryFile aFile;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment