summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-05-02 22:16:03 +0100
committerCarl Hetherington <cth@carlh.net>2018-05-14 23:14:50 +0100
commit743acc9bc88f543257355d40c320992ab72d8abe (patch)
tree19c4796f999af10d25ba3bee7ba8212c138dded1 /test
parentb43b16605df0980f3bb43d969cc0c3c18360812d (diff)
rebase() would round up and so it was possible for ticks to go out of range.
Now it still rounds up but then copes with overflow.
Diffstat (limited to 'test')
-rw-r--r--test/dcp_time_test.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/dcp_time_test.cc b/test/dcp_time_test.cc
index 48a35b5a..405640f8 100644
--- a/test/dcp_time_test.cc
+++ b/test/dcp_time_test.cc
@@ -102,7 +102,9 @@ BOOST_AUTO_TEST_CASE (dcp_time)
b = dcp::Time (9, 12, 41, 17, 99);
BOOST_CHECK_EQUAL (b.rebase(250), dcp::Time(9, 12, 41, 43, 250));
a = dcp::Time (0, 2, 57, 999, 1000);
- BOOST_CHECK_EQUAL (a.rebase(250), dcp::Time(0, 2, 57, 250, 250));
+ BOOST_CHECK_EQUAL (a.rebase(250), dcp::Time(0, 2, 58, 0, 250));
+ a = dcp::Time (0, 47, 9, 998, 1000);
+ BOOST_CHECK_EQUAL (a.rebase(250), dcp::Time(0, 47, 10, 0, 250));
/* Check some allowed constructions from string */