TemporaryDirectory: Expose boost::filesystem::path in class interface

This commit is contained in:
Kamil Śliwak
2021-05-12 18:08:17 +02:00
parent 5619702d31
commit cdebbb0dbb
6 changed files with 20 additions and 52 deletions
+2 -2
View File
@@ -75,11 +75,11 @@ BOOST_AUTO_TEST_SUITE(CommonTest)
BOOST_FIXTURE_TEST_CASE(readLinesFromFile_should_return_all_lines_from_a_text_file_as_strings_without_newlines, ReadLinesFromFileFixture)
{
{
ofstream tmpFile(m_tempDir.memberPath("test-file.txt"));
ofstream tmpFile((m_tempDir.path() / "test-file.txt").string());
tmpFile << endl << "Line 1" << endl << endl << endl << "Line 2" << endl << "#" << endl << endl;
}
vector<string> lines = readLinesFromFile(m_tempDir.memberPath("test-file.txt"));
vector<string> lines = readLinesFromFile((m_tempDir.path() / "test-file.txt").string());
BOOST_TEST((lines == vector<string>{"", "Line 1", "", "", "Line 2", "#", ""}));
}