summaryrefslogtreecommitdiff
path: root/test/hints_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/hints_test.cc')
-rw-r--r--test/hints_test.cc44
1 files changed, 42 insertions, 2 deletions
diff --git a/test/hints_test.cc b/test/hints_test.cc
index 55bd9d77f..7cb9d676b 100644
--- a/test/hints_test.cc
+++ b/test/hints_test.cc
@@ -211,7 +211,7 @@ BOOST_AUTO_TEST_CASE (hint_subtitle_mxf_too_big)
BOOST_CHECK_EQUAL (
hints[0],
"At least one of your subtitle files is larger than " MAX_TEXT_MXF_SIZE_TEXT " in total. "
- "You should divide the DCP into shorter reels."
+ "The largest file is 134MB. You should divide the DCP into shorter reels."
);
}
@@ -245,7 +245,7 @@ BOOST_AUTO_TEST_CASE (hint_closed_caption_xml_too_big)
BOOST_CHECK_EQUAL (
hints[0],
"At least one of your closed caption files' XML part is larger than " MAX_CLOSED_CAPTION_XML_SIZE_TEXT ". "
- "You should divide the DCP into shorter reels."
+ "The largest XML part is 482KB. You should divide the DCP into shorter reels."
);
}
@@ -315,3 +315,43 @@ BOOST_AUTO_TEST_CASE(hints_mpeg2)
"encoded with JPEG2000 rather than MPEG2. Make sure that your cinema really wants an old-style MPEG2 DCP."
);
}
+
+
+BOOST_AUTO_TEST_CASE(hints_120fps)
+{
+ auto content = content_factory("test/data/numbered_120.mp4");
+ auto film = new_test_film("hints_120fps", content);
+ auto hints = get_hints(film);
+ for (auto hint: hints) {
+ BOOST_CHECK(hint.find("There is a large difference between the frame rate of your DCP and that of some of your content.") == std::string::npos);
+ }
+}
+
+
+BOOST_AUTO_TEST_CASE(hints_ccap_not_too_many_lines_xml)
+{
+ auto content = content_factory(TestPaths::private_data() / "ccap_not_too_many_lines.xml")[0];
+ auto film = new_test_film("hints_ccap_not_too_many_lines", { content });
+ content->text[0]->set_type(TextType::CLOSED_CAPTION);
+ auto hints = get_hints(film);
+
+ BOOST_CHECK(
+ std::none_of(hints.begin(), hints.end(), [](string const& hint) {
+ return hint.find("Some of your closed captions span more than 3 lines") != std::string::npos;
+ })
+ );
+}
+
+
+BOOST_AUTO_TEST_CASE(hints_ccap_too_many_lines_xml)
+{
+ auto content = content_factory(TestPaths::private_data() / "ccap_too_many_lines.xml")[0];
+ auto film = new_test_film("hints_ccap_too_many_lines", { content });
+ content->text[0]->set_type(TextType::CLOSED_CAPTION);
+ auto hints = get_hints(film);
+ BOOST_CHECK(
+ std::any_of(hints.begin(), hints.end(), [](string const& hint) {
+ return hint.find("Some of your closed captions span more than 3 lines") != std::string::npos;
+ })
+ );
+}