diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-02-26 01:24:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-26 01:24:48 +0100 |
| commit | ea63ad9560757e56505551db3bf2e1c31be5c76c (patch) | |
| tree | ec0f539b89d9c8ac627e65886241cc086246ab09 /test/subtitle_trim_test.cc | |
| parent | cbb8260e395058da76b3de518ebc535a114c54b1 (diff) | |
More verification of DCPs during tests.
Diffstat (limited to 'test/subtitle_trim_test.cc')
| -rw-r--r-- | test/subtitle_trim_test.cc | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/test/subtitle_trim_test.cc b/test/subtitle_trim_test.cc index 3a615c8d8..f0fea4765 100644 --- a/test/subtitle_trim_test.cc +++ b/test/subtitle_trim_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2018 Carl Hetherington <cth@carlh.net> + Copyright (C) 2018-2021 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -18,25 +18,31 @@ */ + #include "lib/film.h" #include "lib/dcp_subtitle_content.h" #include "test.h" #include <boost/test/unit_test.hpp> + +using std::make_shared; using std::shared_ptr; -using namespace dcpomatic; + /** Check for no crash when trimming DCP subtitles (#1275) */ BOOST_AUTO_TEST_CASE (subtitle_trim_test1) { - shared_ptr<Film> film = new_test_film2 ("subtitle_trim_test1"); - shared_ptr<DCPSubtitleContent> content (new DCPSubtitleContent ("test/data/dcp_sub5.xml")); - film->examine_and_add_content (content); - BOOST_REQUIRE (!wait_for_jobs ()); + auto content = make_shared<DCPSubtitleContent>("test/data/dcp_sub5.xml"); + auto film = new_test_film2 ("subtitle_trim_test1", {content}); - content->set_trim_end (ContentTime::from_seconds (2)); + content->set_trim_end (dcpomatic::ContentTime::from_seconds(2)); film->write_metadata (); - film->make_dcp (); - BOOST_REQUIRE (!wait_for_jobs ()); + make_and_verify_dcp ( + film, + { + dcp::VerificationNote::Code::MISSING_SUBTITLE_LANGUAGE, + dcp::VerificationNote::Code::INVALID_SUBTITLE_FIRST_TEXT_TIME, + dcp::VerificationNote::Code::MISSING_CPL_METADATA + }); } |
