Skip to content

Commit 3eb4996

Browse files
authored
Fix broken path on Windows in unit_tdb_matrix_with_ids.cc (#267)
1 parent f826913 commit 3eb4996

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

src/include/test/unit_api_feature_vector_array.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,10 @@ TEST_CASE("api: tdbMatrixWithIds constructors and destructors", "[api]") {
392392
int offset = 13;
393393
size_t rows = 3;
394394
size_t cols = 7;
395-
std::string tmp_matrix_uri = "/tmp/tmp_tdb_matrix";
396-
std::string tmp_ids_uri = "/tmp/tmp_tdb_ids_matrix";
395+
std::string tmp_matrix_uri =
396+
(std::filesystem::temp_directory_path() / "tmp_tdb_matrix").string();
397+
std::string tmp_ids_uri =
398+
(std::filesystem::temp_directory_path() / "tmp_tdb_ids_matrix").string();
397399

398400
auto c = ColMajorMatrixWithIds<int, float>(rows, cols);
399401
fill_and_write_matrix(
@@ -425,8 +427,10 @@ TEMPLATE_TEST_CASE(
425427
int offset = 13;
426428
size_t rows = 3;
427429
size_t cols = 7;
428-
std::string tmp_matrix_uri = "/tmp/tmp_tdb_matrix";
429-
std::string tmp_ids_uri = "/tmp/tmp_tdb_ids_matrix";
430+
std::string tmp_matrix_uri =
431+
(std::filesystem::temp_directory_path() / "tmp_tdb_matrix").string();
432+
std::string tmp_ids_uri =
433+
(std::filesystem::temp_directory_path() / "tmp_tdb_ids_matrix").string();
430434

431435
auto cc = ColMajorMatrixWithIds<DataType, IdsType>(rows, cols);
432436
fill_and_write_matrix(

src/include/test/unit_tdb_matrix_with_ids.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,10 @@ TEMPLATE_TEST_CASE(
107107

108108
TEST_CASE("tdb_matrix_with_ids: different types", "[tdb_matrix_with_ids]") {
109109
tiledb::Context ctx;
110-
std::string tmp_matrix_uri = "/tmp/tmp_tdb_matrix";
111-
std::string tmp_ids_uri = "/tmp/tmp_tdb_ids_matrix";
110+
std::string tmp_matrix_uri =
111+
(std::filesystem::temp_directory_path() / "tmp_tdb_matrix").string();
112+
std::string tmp_ids_uri =
113+
(std::filesystem::temp_directory_path() / "tmp_tdb_ids_matrix").string();
112114
int offset = 13;
113115
size_t Mrows = 200;
114116
size_t Ncols = 500;

0 commit comments

Comments
 (0)