diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-20 23:15:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-20 23:15:11 +0100 |
| commit | d27d0f88a526cfe55e6018f9f32d54d5b61fc634 (patch) | |
| tree | 9645e24258c90fe329dbac08e8ba670b07fe97a8 /test/dcp_time_test.cc | |
| parent | 8ba4029ad997f638dedced7a24d441450d55b589 (diff) | |
| parent | 03257d7e08986d1333190f447e5d64c609ade981 (diff) | |
Merge tag 'v1.8.98' into v1.9.xv1.9.3
Diffstat (limited to 'test/dcp_time_test.cc')
| -rw-r--r-- | test/dcp_time_test.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/test/dcp_time_test.cc b/test/dcp_time_test.cc index 4b529be6..3e0050b4 100644 --- a/test/dcp_time_test.cc +++ b/test/dcp_time_test.cc @@ -131,6 +131,11 @@ BOOST_AUTO_TEST_CASE (dcp_time) /* SMPTE */ a = dcp::Time ("01:23:45:12", 250); BOOST_CHECK_EQUAL (a, dcp::Time (1, 23, 45, 12, 250)); + /* The editable units field can be any length (depending on the timecode rate) + * but in practice I think 3 is enough. + */ + a = dcp::Time("00:05:01:519", 250); + BOOST_CHECK_EQUAL(a, dcp::Time(0, 5, 1, 519, 250)); /* Check some disallowed constructions from string */ BOOST_CHECK_THROW (dcp::Time ("01:23:45:1234", optional<int>()), dcp::ReadError); @@ -145,7 +150,6 @@ BOOST_AUTO_TEST_CASE (dcp_time) BOOST_CHECK_THROW (dcp::Time ("01:23:.123", optional<int>()), dcp::ReadError); BOOST_CHECK_THROW (dcp::Time ("01::45.123", optional<int>()), dcp::ReadError); BOOST_CHECK_THROW (dcp::Time (":23:45.123", optional<int>()), dcp::ReadError); - BOOST_CHECK_THROW (dcp::Time ("01:23:45:123", 250), dcp::ReadError); BOOST_CHECK_THROW (dcp::Time ("01:23:45:123:66", 250), dcp::ReadError); BOOST_CHECK_THROW (dcp::Time ("01:23:45:", 250), dcp::ReadError); BOOST_CHECK_THROW (dcp::Time ("01:23::123", 250), dcp::ReadError); |
