From: Christopher Dykes Date: Thu, 4 Aug 2016 22:38:00 +0000 (-0700) Subject: Don't assume boost::path contains narrow characters X-Git-Tag: v2016.08.08.00~16 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=db33d30722844457a675db2b5820da53a36b9dff;p=folly.git 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 --- diff --git a/folly/test/FileUtilTest.cpp b/folly/test/FileUtilTest.cpp index 9170ff45..6a63b33c 100644 --- a/folly/test/FileUtilTest.cpp +++ b/folly/test/FileUtilTest.cpp @@ -267,8 +267,8 @@ TEST_F(FileUtilTest, preadv) { TEST(String, readFile) { const TemporaryFile afileTemp, emptyFileTemp; - auto afile = afileTemp.path(); - auto emptyFile = emptyFileTemp.path(); + auto afile = afileTemp.path().string(); + auto emptyFile = emptyFileTemp.path().string(); EXPECT_TRUE(writeFile(string(), emptyFile.c_str())); EXPECT_TRUE(writeFile(StringPiece("bar"), afile.c_str())); @@ -300,7 +300,7 @@ TEST(String, readFile) { class ReadFileFd : public ::testing::Test { protected: void SetUp() override { - ASSERT_TRUE(writeFile(StringPiece("bar"), aFile.path().c_str())); + ASSERT_TRUE(writeFile(StringPiece("bar"), aFile.path().string().c_str())); } TemporaryFile aFile;