diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-13 01:45:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-13 01:45:42 +0100 |
| commit | 4c987f7feb504fe4011b52ffeb231e3b25823de1 (patch) | |
| tree | 893c852593830fa5fe5a769bf61fcef86d57b9bf /test | |
| parent | c14a05a935886345d4d891a92a31b1c35bf10582 (diff) | |
Basic subtitle test works.
Diffstat (limited to 'test')
| -rw-r--r-- | test/tests.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/tests.cc b/test/tests.cc index c6d28622..b8d9ef97 100644 --- a/test/tests.cc +++ b/test/tests.cc @@ -101,6 +101,29 @@ BOOST_AUTO_TEST_CASE (subtitles) BOOST_CHECK_EQUAL ((*i)->texts().size(), 1); BOOST_CHECK_EQUAL ((*i)->texts().front()->v_position(), 15); BOOST_CHECK_EQUAL ((*i)->texts().front()->text(), "My jacket was Idi Amin's"); + ++i; + + BOOST_CHECK_EQUAL ((*i)->in(), libdcp::Time (0, 0, 7, 177)); + BOOST_CHECK_EQUAL ((*i)->out(), libdcp::Time (0, 0, 11, 31)); + BOOST_CHECK_EQUAL ((*i)->texts().size(), 2); + BOOST_CHECK_EQUAL ((*i)->texts().front()->v_position(), 21); + BOOST_CHECK_EQUAL ((*i)->texts().front()->text(), "My corset was H.M. The Queen's"); + BOOST_CHECK_EQUAL ((*i)->texts().back()->v_position(), 15); + BOOST_CHECK_EQUAL ((*i)->texts().back()->text(), "My large wonderbra"); + ++i; + + BOOST_CHECK_EQUAL ((*i)->in(), libdcp::Time (0, 0, 11, 94)); + BOOST_CHECK_EQUAL ((*i)->out(), libdcp::Time (0, 0, 13, 63)); + BOOST_CHECK_EQUAL ((*i)->texts().size(), 1); + BOOST_CHECK_EQUAL ((*i)->texts().front()->v_position(), 15); + BOOST_CHECK_EQUAL ((*i)->texts().front()->text(), "Once belonged to the Shah"); + ++i; + + BOOST_CHECK_EQUAL ((*i)->in(), libdcp::Time (0, 0, 13, 104)); + BOOST_CHECK_EQUAL ((*i)->out(), libdcp::Time (0, 0, 15, 177)); + BOOST_CHECK_EQUAL ((*i)->texts().size(), 1); + BOOST_CHECK_EQUAL ((*i)->texts().front()->v_position(), 15); + BOOST_CHECK_EQUAL ((*i)->texts().front()->text(), "And these are Roy Hattersley's jeans"); } |
