diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
| commit | 08d62727f7f1c813cbc7041027fe4a52518623da (patch) | |
| tree | 756e38e4ad5ee2bdb51690e8a6fb149909c53712 /test/util_test.cc | |
| parent | 09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a (diff) | |
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
Diffstat (limited to 'test/util_test.cc')
| -rw-r--r-- | test/util_test.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/test/util_test.cc b/test/util_test.cc index 3373bf86b..25b814004 100644 --- a/test/util_test.cc +++ b/test/util_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington <cth@carlh.net> + Copyright (C) 2012-2014 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 @@ -57,15 +57,15 @@ BOOST_AUTO_TEST_CASE (md5_digest_test) /* Straightforward test of DCPTime::round_up */ BOOST_AUTO_TEST_CASE (dcptime_round_up_test) { - BOOST_CHECK_EQUAL (DCPTime (0).round_up (DCPTime::HZ / 2), 0); - BOOST_CHECK_EQUAL (DCPTime (1).round_up (DCPTime::HZ / 2), 2); - BOOST_CHECK_EQUAL (DCPTime (2).round_up (DCPTime::HZ / 2), 2); - BOOST_CHECK_EQUAL (DCPTime (3).round_up (DCPTime::HZ / 2), 4); + BOOST_CHECK_EQUAL (DCPTime (0).round_up (DCPTime::HZ / 2), DCPTime (0)); + BOOST_CHECK_EQUAL (DCPTime (1).round_up (DCPTime::HZ / 2), DCPTime (2)); + BOOST_CHECK_EQUAL (DCPTime (2).round_up (DCPTime::HZ / 2), DCPTime (2)); + BOOST_CHECK_EQUAL (DCPTime (3).round_up (DCPTime::HZ / 2), DCPTime (4)); - BOOST_CHECK_EQUAL (DCPTime (0).round_up (DCPTime::HZ / 42), 0); - BOOST_CHECK_EQUAL (DCPTime (1).round_up (DCPTime::HZ / 42), 42); - BOOST_CHECK_EQUAL (DCPTime (42).round_up (DCPTime::HZ / 42), 42); - BOOST_CHECK_EQUAL (DCPTime (43).round_up (DCPTime::HZ / 42), 84); + BOOST_CHECK_EQUAL (DCPTime (0).round_up (DCPTime::HZ / 42), DCPTime (0)); + BOOST_CHECK_EQUAL (DCPTime (1).round_up (DCPTime::HZ / 42), DCPTime (42)); + BOOST_CHECK_EQUAL (DCPTime (42).round_up (DCPTime::HZ / 42), DCPTime (42)); + BOOST_CHECK_EQUAL (DCPTime (43).round_up (DCPTime::HZ / 42), DCPTime (84)); } |
