diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-03-04 23:24:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-03-05 23:52:14 +0100 |
| commit | ab766096598188759d29829043bf28e63379b730 (patch) | |
| tree | 1fb8fb9eb22c275834db2671395e7b3558e7aac4 /test/find_missing_test.cc | |
| parent | 2719964f89431a0598ef617326158309afe5ba43 (diff) | |
Replace Content::paths_valid() with a free utility function.
Diffstat (limited to 'test/find_missing_test.cc')
| -rw-r--r-- | test/find_missing_test.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/test/find_missing_test.cc b/test/find_missing_test.cc index 94c2fc53b..f455be19d 100644 --- a/test/find_missing_test.cc +++ b/test/find_missing_test.cc @@ -63,14 +63,14 @@ BOOST_AUTO_TEST_CASE (find_missing_test_with_single_files) /* That should make the content paths invalid */ for (auto content: film->content()) { - BOOST_CHECK (!content->paths_valid()); + BOOST_CHECK(!paths_exist(content->paths())); } /* Fix the missing files and check the result */ dcpomatic::find_missing (film->content(), moved / "A.png"); for (auto content: film->content()) { - BOOST_CHECK (content->paths_valid()); + BOOST_CHECK(paths_exist(content->paths())); } } @@ -100,14 +100,14 @@ BOOST_AUTO_TEST_CASE (find_missing_test_with_multiple_files) /* That should make the content paths invalid */ for (auto content: film->content()) { - BOOST_CHECK (!content->paths_valid()); + BOOST_CHECK(!paths_exist(content->paths())); } /* Fix the missing files and check the result */ dcpomatic::find_missing (film->content(), moved / "foo"); for (auto content: film->content()) { - BOOST_CHECK (content->paths_valid()); + BOOST_CHECK(paths_exist(content->paths())); } } @@ -144,14 +144,14 @@ BOOST_AUTO_TEST_CASE (find_missing_test_with_multiple_files_one_incorrect) /* The film's contents should be invalid */ for (auto content: film->content()) { - BOOST_CHECK (!content->paths_valid()); + BOOST_CHECK(!paths_exist(content->paths())); } dcpomatic::find_missing (film->content(), moved / "foo"); /* And even after find_missing there should still be missing content */ for (auto content: film->content()) { - BOOST_CHECK (!content->paths_valid()); + BOOST_CHECK(!paths_exist(content->paths())); } } @@ -184,7 +184,7 @@ BOOST_AUTO_TEST_CASE(find_missing_test_with_rename) /* That should make one of the content paths invalid */ auto content_list = film->content(); int const valid = std::count_if(content_list.begin(), content_list.end(), [](shared_ptr<const Content> content) { - return content->paths_valid(); + return paths_exist(content->paths()); }); BOOST_CHECK_EQUAL(valid, 2); @@ -192,7 +192,7 @@ BOOST_AUTO_TEST_CASE(find_missing_test_with_rename) dcpomatic::find_missing(content_list, content_dir / "bogus.png"); for (auto content: content_list) { - BOOST_CHECK(content->paths_valid()); + BOOST_CHECK(paths_exist(content->paths())); } } @@ -205,7 +205,7 @@ BOOST_AUTO_TEST_CASE(test_film_saved_on_windows) dcpomatic::find_missing(film->content(), TestPaths::private_data()); for (auto content: film->content()) { - BOOST_CHECK(content->paths_valid()); + BOOST_CHECK(paths_exist(content->paths())); } } @@ -217,6 +217,6 @@ BOOST_AUTO_TEST_CASE(test_film_saved_on_posix) dcpomatic::find_missing(film->content(), TestPaths::private_data()); for (auto content: film->content()) { - BOOST_CHECK(content->paths_valid()); + BOOST_CHECK(paths_exist(content->paths())); } } |
