diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-01-20 11:15:27 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-01-20 11:15:27 +0000 |
| commit | a200d926f14ffcc043a1bf9ced60004c9c3deb87 (patch) | |
| tree | 7d6c3ce8f8b31165f4dacd48908fab0950efdb24 | |
| parent | 92f849621c9756fa60e89fc937d27444e72f64c8 (diff) | |
| parent | 91378c017e04f1da06bfbe4a39489471bc550c14 (diff) | |
Merge.
| -rw-r--r-- | cscript | 3 | ||||
| -rw-r--r-- | test/time_test.cc | 10 |
2 files changed, 9 insertions, 4 deletions
@@ -1,8 +1,5 @@ import os -def dependencies(target): - return (('libdcp', '19e00ec'),) - def build(target, options): cmd = './waf configure --prefix=%s' % target.directory if target.platform == 'linux': diff --git a/test/time_test.cc b/test/time_test.cc index f57bb2c..76f9a7b 100644 --- a/test/time_test.cc +++ b/test/time_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,6 +18,7 @@ */ #include "sub_time.h" +#include "exceptions.h" #include <boost/test/unit_test.hpp> /* Check time construction */ @@ -64,3 +65,10 @@ BOOST_AUTO_TEST_CASE (time_operator_test) BOOST_CHECK_EQUAL (sub::Time::from_hms (0, 0, 5, 198 * 4), sub::Time::from_hms (0, 0, 5, 198 * 4)); BOOST_CHECK (sub::Time::from_hms (0, 0, 55, 332) != sub::Time::from_hms (0, 0, 58, 332)); } + +/* Check some other bits of Time */ +BOOST_AUTO_TEST_CASE (time_other_test) +{ + BOOST_CHECK_THROW (sub::Time::from_hmsf (2, 1, 58, 4).all_as_seconds(), sub::UnknownFrameRateError); + BOOST_CHECK_CLOSE (sub::Time::from_hmsf (2, 1, 58, 4, sub::Rational (24, 1)).all_as_seconds(), 7318.1667, 0.001); +} |
