From 9d904847726295852b78b0029939d0f848793d06 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 28 May 2018 01:17:59 +0100 Subject: Fix seconds_to_approximate_hms sometimes saying things like 1h60m (#1314). --- test/util_test.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/util_test.cc') 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"); } -- cgit v1.2.3