diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-09-28 12:13:38 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-09-28 12:13:38 +0100 |
| commit | db8af2f03cc3c93b6a42b2e5ace53c169eddf5fd (patch) | |
| tree | 179d7ca79145a1dcc467a79ef181657b0ddd515e /test | |
| parent | 57a68aced4450e2f7e0259ffa1ddb171834cc8c9 (diff) | |
Round down when rebasing times.
Diffstat (limited to 'test')
| -rw-r--r-- | test/dcp_time_test.cc | 5 | ||||
| -rw-r--r-- | test/write_subtitle_test.cc | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/test/dcp_time_test.cc b/test/dcp_time_test.cc index 926dd024..196efe17 100644 --- a/test/dcp_time_test.cc +++ b/test/dcp_time_test.cc @@ -93,5 +93,8 @@ BOOST_AUTO_TEST_CASE (dcp_time) a = dcp::Time (1, 58, 56, 2, 25); BOOST_CHECK_EQUAL (a.rebase (250), dcp::Time (1, 58, 56, 20, 250)); b = dcp::Time (9, 12, 41, 17, 99); - BOOST_CHECK_EQUAL (b.rebase (250), dcp::Time (9, 12, 41, 43, 250)); + BOOST_CHECK_EQUAL (b.rebase (250), dcp::Time (9, 12, 41, 42, 250)); + /* We must round down in rebase() */ + a = dcp::Time (0, 2, 57, 999, 1000); + BOOST_CHECK_EQUAL (a.rebase (250), dcp::Time (0, 2, 57, 249, 250)); } diff --git a/test/write_subtitle_test.cc b/test/write_subtitle_test.cc index faf5cee2..8b50b0e3 100644 --- a/test/write_subtitle_test.cc +++ b/test/write_subtitle_test.cc @@ -91,7 +91,7 @@ BOOST_AUTO_TEST_CASE (write_subtitle_test) " </Subtitle>\n" " </Font>\n" " <Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underlined=\"no\" Weight=\"normal\">\n" - " <Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:219\" TimeOut=\"06:12:15:219\" FadeUpTime=\"930792\" FadeDownTime=\"4591834\">\n" + " <Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:218\" TimeOut=\"06:12:15:218\" FadeUpTime=\"930792\" FadeDownTime=\"4591834\">\n" " <Text VAlign=\"bottom\" VPosition=\"40\">What's going on</Text>\n" " </Subtitle>\n" " </Font>\n" |
