diff options
Diffstat (limited to 'src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp')
-rw-r--r-- | src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp b/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp index 71e76b1943..2d78564a2a 100644 --- a/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp +++ b/src/timelineDecoder/tests/JSONTimelineDecoderTests.cpp @@ -11,6 +11,7 @@ #include <boost/test/unit_test_suite.hpp> #include <fstream> +#include <boost/filesystem.hpp> BOOST_AUTO_TEST_SUITE(JSONTimelineDecoderTests) @@ -796,8 +797,11 @@ BOOST_AUTO_TEST_CASE(JSONTimelineDecoderTestJSON) timelineDecoder.PrintJSON(rootEntity); - std::ifstream inFile; - inFile.open("/tmp/output.json"); //open the input file + boost::filesystem::ifstream inFile; + boost::filesystem::path fileDir = boost::filesystem::temp_directory_path(); + boost::filesystem::path p{fileDir / boost::filesystem::unique_path("output.json")}; + + inFile.open(p); //open the input file std::stringstream strStream; strStream << inFile.rdbuf(); //read the file |