File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 2222#include " memilio/utils/logging.h"
2323#include " memilio/math/eigen.h"
2424#include " matchers.h"
25+ #include " temp_file_register.h"
2526
2627#include < gtest/gtest.h>
2728
@@ -37,8 +38,9 @@ TEST(TestReadMobility, readFormatted)
3738 }
3839
3940 std::fstream file;
40-
41- file.open (" test_mobility.txt" , std::ios::out);
41+ TempFileRegister file_register;
42+ auto tmp_file_path = file_register.get_unique_path (" test_mobility-%%%%-%%%%.txt" );
43+ file.open (tmp_file_path, std::ios::out);
4244
4345 if (!file) {
4446 mio::log_error (" File was not created" );
@@ -61,7 +63,7 @@ TEST(TestReadMobility, readFormatted)
6163 file.close ();
6264 }
6365
64- auto matrix_read = mio::read_mobility_formatted (" test_mobility.txt " );
66+ auto matrix_read = mio::read_mobility_formatted (tmp_file_path );
6567 ASSERT_TRUE (matrix_read);
6668 ASSERT_EQ (test_matrix.rows (), matrix_read.value ().rows ());
6769 ASSERT_EQ (test_matrix.cols (), matrix_read.value ().cols ());
You can’t perform that action at this time.
0 commit comments