summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-11-11 01:31:58 +0100
committerCarl Hetherington <cth@carlh.net>2023-11-12 22:11:27 +0100
commitdfa7b94e802b05bba4243381460eef96626102a0 (patch)
tree348ab6b50c7b074e351f2577101ae583a1597c58 /test
parent0f225b6df7a9603678a5bd84f9428ff6fb56aea2 (diff)
Replace deprecated leaf() with filename().
Diffstat (limited to 'test')
-rw-r--r--test/ffmpeg_dcp_test.cc2
-rw-r--r--test/test.cc4
-rw-r--r--test/threed_test.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/test/ffmpeg_dcp_test.cc b/test/ffmpeg_dcp_test.cc
index c1c322948..c332759c8 100644
--- a/test/ffmpeg_dcp_test.cc
+++ b/test/ffmpeg_dcp_test.cc
@@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE (ffmpeg_have_dcp_test, * boost::unit_test::depends_on("ffmp
p /= film->dcp_name();
auto i = boost::filesystem::directory_iterator (p);
- while (i != boost::filesystem::directory_iterator() && !boost::algorithm::starts_with (i->path().leaf().string(), "j2c")) {
+ while (i != boost::filesystem::directory_iterator() && !boost::algorithm::starts_with(i->path().filename().string(), "j2c")) {
++i;
}
diff --git a/test/test.cc b/test/test.cc
index 9b08dfb4e..2bd31292a 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -843,7 +843,7 @@ dcp_file (shared_ptr<const Film> film, string prefix)
vector<directory_entry> matches;
std::copy_if(recursive_directory_iterator(film->dir(film->dcp_name())), recursive_directory_iterator(), std::back_inserter(matches), [&prefix](directory_entry const& entry) {
- return boost::algorithm::starts_with(entry.path().leaf().string(), prefix);
+ return boost::algorithm::starts_with(entry.path().filename().string(), prefix);
});
BOOST_REQUIRE_MESSAGE(matches.size() == 1, "Found " << matches.size() << " files with prefix " << prefix);
@@ -854,7 +854,7 @@ boost::filesystem::path
subtitle_file (shared_ptr<Film> film)
{
for (auto i: boost::filesystem::recursive_directory_iterator(film->directory().get() / film->dcp_name(false))) {
- if (boost::algorithm::starts_with(i.path().leaf().string(), "sub_")) {
+ if (boost::algorithm::starts_with(i.path().filename().string(), "sub_")) {
return i.path();
}
}
diff --git a/test/threed_test.cc b/test/threed_test.cc
index a53b4d10e..698fcba0b 100644
--- a/test/threed_test.cc
+++ b/test/threed_test.cc
@@ -319,7 +319,7 @@ BOOST_AUTO_TEST_CASE(threed_passthrough_test, * boost::unit_test::depends_on("th
std::vector<directory_entry> matches;
std::copy_if(recursive_directory_iterator(*input_dcp), recursive_directory_iterator(), std::back_inserter(matches), [](directory_entry const& entry) {
- return boost::algorithm::starts_with(entry.path().leaf().string(), "j2c");
+ return boost::algorithm::starts_with(entry.path().filename().string(), "j2c");
});
BOOST_REQUIRE_EQUAL(matches.size(), 1U);