summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-10-06 20:37:40 +0100
committerCarl Hetherington <cth@carlh.net>2014-10-06 20:37:40 +0100
commitf7b50fd54b249c294e686fc09d8bb33d2a992d42 (patch)
treed10f46a74b34fde0a0659ba6a5d36264d3430b32 /test
parent8afd7786c87b571118d1e098a730ab69b7b3908b (diff)
Fix heinous bug with conversion to libdcp::Time causing missing subtitles (and probably other problems).
Diffstat (limited to 'test')
-rw-r--r--test/dcp_time_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/dcp_time_test.cc b/test/dcp_time_test.cc
index 6892711e..a8256998 100644
--- a/test/dcp_time_test.cc
+++ b/test/dcp_time_test.cc
@@ -59,4 +59,16 @@ BOOST_AUTO_TEST_CASE (dcp_time)
BOOST_CHECK_EQUAL (libdcp::Time (4128391203LL).to_ticks(), 4128391203LL);
BOOST_CHECK_EQUAL (libdcp::Time (60000).to_ticks(), 60000);
+
+ a = libdcp::Time (3600 * 24, 24);
+ BOOST_CHECK_EQUAL (a.h, 1);
+ BOOST_CHECK_EQUAL (a.m, 0);
+ BOOST_CHECK_EQUAL (a.s, 0);
+ BOOST_CHECK_EQUAL (a.t, 0);
+
+ a = libdcp::Time (60 * 24, 24);
+ BOOST_CHECK_EQUAL (a.h, 0);
+ BOOST_CHECK_EQUAL (a.m, 1);
+ BOOST_CHECK_EQUAL (a.s, 0);
+ BOOST_CHECK_EQUAL (a.t, 0);
}