diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-06-21 15:44:46 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-06-21 15:44:46 +0100 |
| commit | de49deb8b65bad47fda93a04fab2e97b10d48a75 (patch) | |
| tree | 65a94d8fb4da433db32bae0ec84f78a9a988de2c /test | |
| parent | a05f25fc0e70ecd5c51984c9efccd2377ebb8ffe (diff) | |
Add FrameTime constructor from frames and fps.
Diffstat (limited to 'test')
| -rw-r--r-- | test/time_test.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/time_test.cc b/test/time_test.cc index 977ebd2..fc852b1 100644 --- a/test/time_test.cc +++ b/test/time_test.cc @@ -40,6 +40,14 @@ BOOST_AUTO_TEST_CASE (time_construction_test) BOOST_CHECK_EQUAL (t.seconds(), 2); BOOST_CHECK_EQUAL (t.milliseconds(), 3); } + + { + sub::FrameTime t (3 * 60 * 60 * 24 + 31 * 60 * 24 + 4 * 24 + 11, 24); + BOOST_CHECK_EQUAL (t.hours(), 3); + BOOST_CHECK_EQUAL (t.minutes(), 31); + BOOST_CHECK_EQUAL (t.seconds(), 4); + BOOST_CHECK_EQUAL (t.frames(), 11); + } } /* Check time conversions */ |
