projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.
[dcpomatic.git]
/
test
/
util_test.cc
diff --git
a/test/util_test.cc
b/test/util_test.cc
index b2085afe19ad4eee81c330fccd354276445203ed..39cc0e6bf7df07956b56191e88af6465ee92db71 100644
(file)
--- a/
test/util_test.cc
+++ b/
test/util_test.cc
@@
-17,6
+17,10
@@
*/
*/
+/** @file test/util_test.cc
+ * @brief Test various utility methods.
+ */
+
#include <boost/test/unit_test.hpp>
#include "lib/util.h"
#include "lib/exceptions.h"
#include <boost/test/unit_test.hpp>
#include "lib/util.h"
#include "lib/exceptions.h"
@@
-84,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");
+}