From: Joel Rosdahl Date: Sun, 26 May 2024 16:08:39 +0000 (+0200) Subject: chore: Remove obsolete os_path helper in test_storage_local_util X-Git-Tag: v4.10~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b88e59b3b6913727f5e10abe3e4ef56905e273d;p=thirdparty%2Fccache.git chore: Remove obsolete os_path helper in test_storage_local_util --- diff --git a/unittest/test_storage_local_util.cpp b/unittest/test_storage_local_util.cpp index 9b1c04d9..200d7797 100644 --- a/unittest/test_storage_local_util.cpp +++ b/unittest/test_storage_local_util.cpp @@ -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); } }