summaryrefslogtreecommitdiff
path: root/test/hints_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-04-16 22:20:54 +0200
committerCarl Hetherington <cth@carlh.net>2022-05-05 23:38:41 +0200
commit8a8c977c12fc65f1f50ea05099387e0fc8840e7d (patch)
tree2d2c8663652939d643779d1ab1c18a12813fcbd2 /test/hints_test.cc
parentefe153ab23b54cdbf28c653f2ccb0f25ca6bd015 (diff)
Use dcp::File in DCP-o-matic (#2231).
Diffstat (limited to 'test/hints_test.cc')
-rw-r--r--test/hints_test.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/hints_test.cc b/test/hints_test.cc
index 51374b274..bc858192d 100644
--- a/test/hints_test.cc
+++ b/test/hints_test.cc
@@ -200,16 +200,16 @@ BOOST_AUTO_TEST_CASE (hint_closed_caption_xml_too_big)
auto film = new_test_film2 (name);
- auto ccap = fopen_boost (String::compose("build/test/%1.srt", name), "w");
+ dcp::File ccap(String::compose("build/test/%1.srt", name), "w");
BOOST_REQUIRE (ccap);
for (int i = 0; i < 2048; ++i) {
- fprintf(ccap, "%d\n", i + 1);
+ fprintf(ccap.get(), "%d\n", i + 1);
int second = i * 2;
int minute = second % 60;
- fprintf(ccap, "00:%02d:%02d,000 --> 00:%02d:%02d,000\n", minute, second, minute, second + 1);
- fprintf(ccap, "Here are some closed captions.\n\n");
+ fprintf(ccap.get(), "00:%02d:%02d,000 --> 00:%02d:%02d,000\n", minute, second, minute, second + 1);
+ fprintf(ccap.get(), "Here are some closed captions.\n\n");
}
- fclose (ccap);
+ ccap.close();
auto content = content_factory("build/test/" + name + ".srt").front();
content->text.front()->set_type (TextType::CLOSED_CAPTION);