summaryrefslogtreecommitdiff
path: root/test/test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-09 22:53:27 +0200
committerCarl Hetherington <cth@carlh.net>2025-07-10 20:50:32 +0200
commit62c34b28567a097e8f22576e7d7891bd3dbe0ac0 (patch)
tree2a0440ed2bdb58c608582b75da6c877527dd6bda /test/test.cc
parent2c499921a9f8615c8368d8161cb43c9a93c67311 (diff)
Replace String::compose with fmt.
sed -i "/Plural-Forms/n;/%100/n;/scanf/n;s/%[123456789]/{}/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc src/lib/po/*.po src/wx/po/*.po src/tools/po/*.po test/*.cc sed -i "s/String::compose */fmt::format/g" src/lib/*.cc src/lib/*.h src/wx/*.cc src/tools/*.cc test/*.cc
Diffstat (limited to 'test/test.cc')
-rw-r--r--test/test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/test.cc b/test/test.cc
index 6d8e6f5f7..85698b3fe 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -594,7 +594,7 @@ check_xml(
auto test_children = test->get_children ();
string context;
if (ref_file && test_file) {
- context = String::compose(" comparing %1 and %2", ref_file->string(), test_file->string());
+ context = fmt::format(" comparing {} and {}", ref_file->string(), test_file->string());
}
BOOST_REQUIRE_MESSAGE (
ref_children.size() == test_children.size(),
@@ -739,7 +739,7 @@ png_flush (png_structp)
static void
png_error_fn (png_structp, char const * message)
{
- throw EncodeError (String::compose("Error during PNG write: %1", message));
+ throw EncodeError (fmt::format("Error during PNG write: {}", message));
}
@@ -822,7 +822,7 @@ write_image (shared_ptr<const Image> image, boost::filesystem::path file)
void
check_ffmpeg (boost::filesystem::path ref, boost::filesystem::path check, int audio_tolerance)
{
- int const r = system (String::compose("ffcmp -t %1 %2 %3", audio_tolerance, ref.string(), check.string()).c_str());
+ int const r = system (fmt::format("ffcmp -t {} {} {}", audio_tolerance, ref.string(), check.string()).c_str());
BOOST_REQUIRE_EQUAL (WEXITSTATUS(r), 0);
}
@@ -1015,13 +1015,13 @@ make_and_verify_dcp(shared_ptr<Film> film, vector<dcp::VerificationNote::Code> i
auto dcp_inspect_env = getenv("DCPOMATIC_DCP_INSPECT");
if (dcp_inspect && dcp_inspect_env) {
boost::filesystem::path dcp_inspect(dcp_inspect_env);
- auto cmd = String::compose("%1 %2 > %3 2>&1", dcp_inspect.string(), film->dir(film->dcp_name()).string(), film->file("dcp_inspect.log").string());
+ auto cmd = fmt::format("{} {} > {} 2>&1", dcp_inspect.string(), film->dir(film->dcp_name()).string(), film->file("dcp_inspect.log").string());
auto result = system(cmd.c_str());
BOOST_CHECK_EQUAL(WEXITSTATUS(result), 0);
}
if (clairmeta && getenv("DCPOMATIC_CLAIRMETA")) {
- auto cmd = String::compose("python3 -m clairmeta.cli check -type dcp %1 > %2 2>&1", film->dir(film->dcp_name()).string(), film->file("clairmeta.log").string());
+ auto cmd = fmt::format("python3 -m clairmeta.cli check -type dcp {} > {} 2>&1", film->dir(film->dcp_name()).string(), film->file("clairmeta.log").string());
auto result = system(cmd.c_str());
BOOST_CHECK_EQUAL(WEXITSTATUS(result), 0);
}