]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
chore: Remove obsolete os_path helper in test_storage_local_util
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 26 May 2024 16:08:39 +0000 (18:08 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 27 May 2024 19:51:54 +0000 (21:51 +0200)
unittest/test_storage_local_util.cpp

index 9b1c04d9386115b594c8c8e21e185c8c484ea9e6..200d7797ee17223b398780fe0c38b6cfaa87e04c 100644 (file)
@@ -33,16 +33,6 @@ using TestUtil::TestContext;
 
 namespace fs = util::filesystem;
 
-static inline std::string
-os_path(std::string path)
-{
-#if defined(_WIN32) && !defined(HAVE_DIRENT_H)
-  std::replace(path.begin(), path.end(), '/', '\\');
-#endif
-
-  return path;
-}
-
 TEST_SUITE_BEGIN("storage::local::util");
 
 TEST_CASE("storage::local::for_each_cache_subdir")
@@ -93,13 +83,13 @@ TEST_CASE("storage::local::get_cache_dir_files")
       return f1.path() < f2.path();
     });
 
-    CHECK(files[0].path() == os_path("0/1/file_b"));
+    CHECK(files[0].path() == "0/1/file_b");
     CHECK(files[0].size() == 1);
-    CHECK(files[1].path() == os_path("0/1/file_c"));
+    CHECK(files[1].path() == "0/1/file_c");
     CHECK(files[1].size() == 2);
-    CHECK(files[2].path() == os_path("0/f/c/file_d"));
+    CHECK(files[2].path() == "0/f/c/file_d");
     CHECK(files[2].size() == 3);
-    CHECK(files[3].path() == os_path("0/file_a"));
+    CHECK(files[3].path() == "0/file_a");
     CHECK(files[3].size() == 0);
   }
 }