result->line_count_exceeded = true;
}
for (auto j: current) {
- if (j.second >= warning_length) {
+ if (j.second > warning_length) {
result->warning_length_exceeded = true;
}
- if (j.second >= error_length) {
+ if (j.second > error_length) {
result->error_length_exceeded = true;
}
}
}
+BOOST_AUTO_TEST_CASE (verify_valid_closed_caption_line_length)
+{
+ auto const dir = path ("build/test/verify_valid_closed_caption_line_length");
+ auto cpl = dcp_with_text<dcp::ReelSMPTEClosedCaptionAsset> (
+ dir,
+ {
+ { 96, 300, 0.0, dcp::VAlign::CENTER, "01234567890123456789012345678901" }
+ });
+ check_verify_result (
+ {dir},
+ {
+ { dcp::VerificationNote::Type::BV21_ERROR, dcp::VerificationNote::Code::MISSING_CPL_METADATA, cpl->id(), cpl->file().get() }
+ });
+}
+
+
BOOST_AUTO_TEST_CASE (verify_invalid_closed_caption_line_length)
{
auto const dir = path ("build/test/verify_invalid_closed_caption_line_length");