diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
| commit | 08d62727f7f1c813cbc7041027fe4a52518623da (patch) | |
| tree | 756e38e4ad5ee2bdb51690e8a6fb149909c53712 /test/subrip_test.cc | |
| parent | 09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a (diff) | |
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
Diffstat (limited to 'test/subrip_test.cc')
| -rw-r--r-- | test/subrip_test.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/subrip_test.cc b/test/subrip_test.cc index d8c2d75de..315c0cf1e 100644 --- a/test/subrip_test.cc +++ b/test/subrip_test.cc @@ -130,45 +130,45 @@ BOOST_AUTO_TEST_CASE (subrip_parse_test) vector<SubRipSubtitle>::const_iterator i = s._subtitles.begin(); BOOST_CHECK (i != s._subtitles.end ()); - BOOST_CHECK_EQUAL (i->from, DCPTime::from_seconds ((1 * 60) + 49.200)); - BOOST_CHECK_EQUAL (i->to, DCPTime::from_seconds ((1 * 60) + 52.351)); + BOOST_CHECK_EQUAL (i->from, ContentTime::from_seconds ((1 * 60) + 49.200)); + BOOST_CHECK_EQUAL (i->to, ContentTime::from_seconds ((1 * 60) + 52.351)); BOOST_CHECK_EQUAL (i->pieces.size(), 1); BOOST_CHECK_EQUAL (i->pieces.front().text, "This is a subtitle, and it goes over two lines."); ++i; BOOST_CHECK (i != s._subtitles.end ()); - BOOST_CHECK_EQUAL (i->from, DCPTime::from_seconds ((1 * 60) + 52.440)); - BOOST_CHECK_EQUAL (i->to, DCPTime::from_seconds ((1 * 60) + 54.351)); + BOOST_CHECK_EQUAL (i->from, ContentTime::from_seconds ((1 * 60) + 52.440)); + BOOST_CHECK_EQUAL (i->to, ContentTime::from_seconds ((1 * 60) + 54.351)); BOOST_CHECK_EQUAL (i->pieces.size(), 1); BOOST_CHECK_EQUAL (i->pieces.front().text, "We have emboldened this"); BOOST_CHECK_EQUAL (i->pieces.front().bold, true); ++i; BOOST_CHECK (i != s._subtitles.end ()); - BOOST_CHECK_EQUAL (i->from, DCPTime::from_seconds ((1 * 60) + 54.440)); - BOOST_CHECK_EQUAL (i->to, DCPTime::from_seconds ((1 * 60) + 56.590)); + BOOST_CHECK_EQUAL (i->from, ContentTime::from_seconds ((1 * 60) + 54.440)); + BOOST_CHECK_EQUAL (i->to, ContentTime::from_seconds ((1 * 60) + 56.590)); BOOST_CHECK_EQUAL (i->pieces.size(), 1); BOOST_CHECK_EQUAL (i->pieces.front().text, "And italicised this."); BOOST_CHECK_EQUAL (i->pieces.front().italic, true); ++i; BOOST_CHECK (i != s._subtitles.end ()); - BOOST_CHECK_EQUAL (i->from, DCPTime::from_seconds ((1 * 60) + 56.680)); - BOOST_CHECK_EQUAL (i->to, DCPTime::from_seconds ((1 * 60) + 58.955)); + BOOST_CHECK_EQUAL (i->from, ContentTime::from_seconds ((1 * 60) + 56.680)); + BOOST_CHECK_EQUAL (i->to, ContentTime::from_seconds ((1 * 60) + 58.955)); BOOST_CHECK_EQUAL (i->pieces.size(), 1); BOOST_CHECK_EQUAL (i->pieces.front().text, "Shall I compare thee to a summers' day?"); ++i; BOOST_CHECK (i != s._subtitles.end ()); - BOOST_CHECK_EQUAL (i->from, DCPTime::from_seconds ((2 * 60) + 0.840)); - BOOST_CHECK_EQUAL (i->to, DCPTime::from_seconds ((2 * 60) + 3.400)); + BOOST_CHECK_EQUAL (i->from, ContentTime::from_seconds ((2 * 60) + 0.840)); + BOOST_CHECK_EQUAL (i->to, ContentTime::from_seconds ((2 * 60) + 3.400)); BOOST_CHECK_EQUAL (i->pieces.size(), 1); BOOST_CHECK_EQUAL (i->pieces.front().text, "Is this a dagger I see before me?"); ++i; BOOST_CHECK (i != s._subtitles.end ()); - BOOST_CHECK_EQUAL (i->from, DCPTime::from_seconds ((3 * 60) + 54.560)); - BOOST_CHECK_EQUAL (i->to, DCPTime::from_seconds ((3 * 60) + 56.471)); + BOOST_CHECK_EQUAL (i->from, ContentTime::from_seconds ((3 * 60) + 54.560)); + BOOST_CHECK_EQUAL (i->to, ContentTime::from_seconds ((3 * 60) + 56.471)); BOOST_CHECK_EQUAL (i->pieces.size(), 1); BOOST_CHECK_EQUAL (i->pieces.front().text, "Hello world."); |
