diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-05-02 22:16:03 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-05-02 22:16:03 +0100 |
| commit | 7b03aba8bc4e9df269430d79ce4ee2c6bd5f344c (patch) | |
| tree | 38f0a72117bbf1a3cade0f418355fa2715377091 /test | |
| parent | 0bfa05b5c0c23cb4df482ee64222ca176c0e1b90 (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.cc | 4 |
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 */ |
