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

Switch the logging tests from .native() to .string()

Summary: These were using `boost::filesystem::path.native()` in contexts where an `std::string` was the expected output. `boost::filesystem::path.native()` returns a `std::wstring` on Windows, so use `.string()` instead.

Reviewed By: simpkins

Differential Revision: D5305649

fbshipit-source-id: 3c7cd53d2f33d2dbb222731655cdab69d1c4a187
parent 7af82bb2
......@@ -88,7 +88,7 @@ TEST(AsyncFileWriter, simpleMessages) {
}
std::string data;
auto ret = folly::readFile(tmpFile.path().native().c_str(), data);
auto ret = folly::readFile(tmpFile.path().string().c_str(), data);
ASSERT_TRUE(ret);
std::string expected =
......
......@@ -40,7 +40,7 @@ TEST(ImmediateFileWriter, readBatch) {
// Read the log file and confirm it contains all of the expected messages
std::string data;
auto ret = folly::readFile(tmpFile.path().native().c_str(), data);
auto ret = folly::readFile(tmpFile.path().string().c_str(), data);
ASSERT_TRUE(ret);
std::string expected =
......@@ -59,11 +59,11 @@ TEST(ImmediateFileWriter, readBatch) {
TEST(ImmediateFileWriter, immediateRead) {
TemporaryFile tmpFile{"logging_test"};
ImmediateFileWriter writer{tmpFile.path().native()};
ImmediateFileWriter writer{tmpFile.path().string()};
// Write several messages, and read each one back immediately
// after we write it.
folly::File readf{tmpFile.path().native()};
folly::File readf{tmpFile.path().string()};
for (int n = 0; n < 10; ++n) {
writer.writeMessage(folly::to<std::string>("message ", n, "\n"));
......
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