summaryrefslogtreecommitdiff
path: root/test/util_test.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-05-28 01:17:59 +0100
committerCarl Hetherington <cth@carlh.net>2018-05-28 01:17:59 +0100
commit9d904847726295852b78b0029939d0f848793d06 (patch)
tree4a985ec00ecb7558060843d4a3f23d64118e1269 /test/util_test.cc
parent1f12c554e58f13fbed38313279c1c5418e0721ca (diff)
Fix seconds_to_approximate_hms sometimes saying things like 1h60m (#1314).
Diffstat (limited to 'test/util_test.cc')
-rw-r--r--test/util_test.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/util_test.cc b/test/util_test.cc
index e0e70f902..4b3e20ae3 100644
--- a/test/util_test.cc
+++ b/test/util_test.cc
@@ -68,6 +68,8 @@ BOOST_AUTO_TEST_CASE (seconds_to_approximate_hms_test)
BOOST_CHECK_EQUAL (seconds_to_approximate_hms (17 * 60 + 20), "17m");
BOOST_CHECK_EQUAL (seconds_to_approximate_hms (1 * 3600), "1h");
BOOST_CHECK_EQUAL (seconds_to_approximate_hms (3600 + 40 * 60), "1h 40m");
+ BOOST_CHECK_EQUAL (seconds_to_approximate_hms (2 * 3600), "2h");
+ BOOST_CHECK_EQUAL (seconds_to_approximate_hms (2 * 3600 - 1), "2h");
BOOST_CHECK_EQUAL (seconds_to_approximate_hms (13 * 3600 + 40 * 60), "14h");
}