mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
TemporaryDirectory: Expose boost::filesystem::path in class interface
This commit is contained in:
@@ -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", "#", ""}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user