summaryrefslogtreecommitdiff
path: root/test/kdm_naming_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/kdm_naming_test.cc')
-rw-r--r--test/kdm_naming_test.cc26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/kdm_naming_test.cc b/test/kdm_naming_test.cc
index 4735ef75e..e8bafb6a2 100644
--- a/test/kdm_naming_test.cc
+++ b/test/kdm_naming_test.cc
@@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE (single_kdm_naming_test)
boost::algorithm::replace_all (until_time, ":", "-");
auto const dcp_date = boost::gregorian::to_iso_string(film->isdcf_date());
- auto const ref = String::compose("KDM_Cinema_A_-_Screen_1_-_MyGreatFilm_TST-1_F_XX-XX_MOS_2K_%1_SMPTE_OV_-_%2_%3_-_%4_%5.xml", dcp_date, from.date(), from_time, until.date(), until_time);
+ auto const ref = fmt::format("KDM_Cinema_A_-_Screen_1_-_MyGreatFilm_TST-1_F_XX-XX_MOS_2K_{}_SMPTE_OV_-_{}_{}_-_{}_{}.xml", dcp_date, from.date(), from_time, until.date(), until_time);
BOOST_CHECK_MESSAGE (boost::filesystem::exists("build/test/single_kdm_naming_test/" + ref), "File " << ref << " not found");
}
@@ -224,41 +224,41 @@ BOOST_AUTO_TEST_CASE(directory_kdm_naming_test)
boost::algorithm::replace_all (until_time, ":", "-");
auto const dcp_date = boost::gregorian::to_iso_string(film->isdcf_date());
- auto const dcp_name = String::compose("MyGreatFilm_TST-1_F_XX-XX_MOS_2K_%1_SMPTE_OV", dcp_date);
- auto const common = String::compose("%1_-_%2_%3_-_%4_%5", dcp_name, from.date(), from_time, until.date(), until_time);
+ auto const dcp_name = fmt::format("MyGreatFilm_TST-1_F_XX-XX_MOS_2K_{}_SMPTE_OV", dcp_date);
+ auto const common = fmt::format("{}_-_{}_{}_-_{}_{}", dcp_name, from.date(), from_time, until.date(), until_time);
path const base = "build/test/directory_kdm_naming_test";
- path dir_a = String::compose("Cinema_A_-_%s_-_%1", common);
+ path dir_a = fmt::format("Cinema_A_-_%s_-_{}", common);
BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_a), "Directory " << dir_a << " not found");
- path dir_b = String::compose("Cinema_B_-_%s_-_%1", common);
+ path dir_b = fmt::format("Cinema_B_-_%s_-_{}", common);
BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_b), "Directory " << dir_b << " not found");
#ifdef DCPOMATIC_WINDOWS
- path ref = String::compose("KDM_%1.xml", dcp_name);
+ path ref = fmt::format("KDM_{}.xml", dcp_name);
#else
- path ref = String::compose("KDM_Cinema_A_-_Screen_2_-_%1_-_%2.xml", common, cpl_id);
+ path ref = fmt::format("KDM_Cinema_A_-_Screen_2_-_{}_-_{}.xml", common, cpl_id);
#endif
BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_a / ref), "File " << ref << " not found");
#ifdef DCPOMATIC_WINDOWS
- ref = String::compose("KDM_%1.xml", dcp_name);
+ ref = fmt::format("KDM_{}.xml", dcp_name);
#else
- ref = String::compose("KDM_Cinema_B_-_Screen_X_-_%1_-_%2.xml", common, cpl_id);
+ ref = fmt::format("KDM_Cinema_B_-_Screen_X_-_{}_-_{}.xml", common, cpl_id);
#endif
BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_b / ref), "File " << ref << " not found");
#ifdef DCPOMATIC_WINDOWS
- ref = String::compose("KDM_%1.xml", dcp_name);
+ ref = fmt::format("KDM_{}.xml", dcp_name);
#else
- ref = String::compose("KDM_Cinema_A_-_Screen_1_-_%1_-_%2.xml", common, cpl_id);
+ ref = fmt::format("KDM_Cinema_A_-_Screen_1_-_{}_-_{}.xml", common, cpl_id);
#endif
BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_a / ref), "File " << ref << " not found");
#ifdef DCPOMATIC_WINDOWS
- ref = String::compose("KDM_%1.xml", dcp_name);
+ ref = fmt::format("KDM_{}.xml", dcp_name);
#else
- ref = String::compose("KDM_Cinema_B_-_Screen_Z_-_%1_-_%2.xml", common, cpl_id);
+ ref = fmt::format("KDM_Cinema_B_-_Screen_Z_-_{}_-_{}.xml", common, cpl_id);
#endif
BOOST_CHECK_MESSAGE (boost::filesystem::exists(base / dir_b / ref), "File " << ref << " not found");
}