projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add timecode methods to Time
[dcpomatic.git]
/
test
/
util_test.cc
diff --git
a/test/util_test.cc
b/test/util_test.cc
index 5eb3e27f185a70039edf090f39ee19160b131650..39cc0e6bf7df07956b56191e88af6465ee92db71 100644
(file)
--- a/
test/util_test.cc
+++ b/
test/util_test.cc
@@
-88,3
+88,9
@@
BOOST_AUTO_TEST_CASE (divide_with_round_test)
BOOST_CHECK_EQUAL (divide_with_round (1000, 500), 2);
}
BOOST_CHECK_EQUAL (divide_with_round (1000, 500), 2);
}
+
+BOOST_AUTO_TEST_CASE (timecode_test)
+{
+ DCPTime t = DCPTime::from_seconds (2 * 60 * 60 + 4 * 60 + 31) + DCPTime::from_frames (19, 24);
+ BOOST_CHECK_EQUAL (t.timecode (24), "02:04:31:19");
+}