X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fssa_subtitle_test.cc;h=8132ba3a0db3aab1283030eaac3c9b3b4034ca2d;hb=f6a51c4902d6c1983d58e1073f048d50ba2a50df;hp=5c2e61b7e41d74602209432e0f6e9017d6fdf33b;hpb=41262015eb2bb1fc3da8585883420975de381a65;p=dcpomatic.git diff --git a/test/ssa_subtitle_test.cc b/test/ssa_subtitle_test.cc index 5c2e61b7e..8132ba3a0 100644 --- a/test/ssa_subtitle_test.cc +++ b/test/ssa_subtitle_test.cc @@ -25,21 +25,21 @@ */ -#include "lib/film.h" -#include "lib/string_text_file_content.h" #include "lib/dcp_content_type.h" +#include "lib/film.h" #include "lib/font.h" #include "lib/ratio.h" +#include "lib/string_text_file_content.h" #include "lib/text_content.h" #include "test.h" +#include #include #include -using std::string; using std::list; -using std::shared_ptr; using std::make_shared; +using std::string; /** Make a DCP with subs from a .ssa file */ @@ -61,8 +61,16 @@ BOOST_AUTO_TEST_CASE (ssa_subtitle_test1) make_and_verify_dcp (film, { dcp::VerificationNote::Code::INVALID_STANDARD }); - /* Find the subtitle file and check it */ - check_xml (subtitle_file(film), TestPaths::private_data() / "DKH_UT_EN20160601def.xml", {"SubtitleID"}); + auto ref = make_shared(TestPaths::private_data() / "DKH_UT_EN20160601def.xml"); + auto check = make_shared(subtitle_file(film)); + + dcp::EqualityOptions options; + options.max_subtitle_vertical_position_error = 0.1; + BOOST_CHECK(ref->equals(check, options, [](dcp::NoteType t, string n) { + if (t == dcp::NoteType::ERROR) { + std::cerr << n << "\n"; + } + })); cl.run (); }