diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/calendar/time-date-tests.el | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/test/lisp/calendar/time-date-tests.el b/test/lisp/calendar/time-date-tests.el index d5269804ad2..ed842e34fd6 100644 --- a/test/lisp/calendar/time-date-tests.el +++ b/test/lisp/calendar/time-date-tests.el | |||
| @@ -55,13 +55,13 @@ | |||
| 55 | (should (date-leap-year-p 2004))) | 55 | (should (date-leap-year-p 2004))) |
| 56 | 56 | ||
| 57 | (ert-deftest test-days-to-time () | 57 | (ert-deftest test-days-to-time () |
| 58 | (should (equal (days-to-time 0) '(0 0))) | 58 | (should (time-equal-p (days-to-time 0) '(0 0))) |
| 59 | (should (equal (days-to-time 1) '(1 20864))) | 59 | (should (time-equal-p (days-to-time 1) '(1 20864))) |
| 60 | (should (equal (days-to-time 999) '(1317 2688))) | 60 | (should (time-equal-p (days-to-time 999) '(1317 2688))) |
| 61 | (should (equal (days-to-time 0.0) '(0 0 0 0))) | 61 | (should (time-equal-p (days-to-time 0.0) '(0 0 0 0))) |
| 62 | (should (equal (days-to-time 0.5) '(0 43200 0 0))) | 62 | (should (time-equal-p (days-to-time 0.5) '(0 43200 0 0))) |
| 63 | (should (equal (days-to-time 1.0) '(1 20864 0 0))) | 63 | (should (time-equal-p (days-to-time 1.0) '(1 20864 0 0))) |
| 64 | (should (equal (days-to-time 999.0) '(1317 2688 0 0)))) | 64 | (should (time-equal-p (days-to-time 999.0) '(1317 2688 0 0)))) |
| 65 | 65 | ||
| 66 | (ert-deftest test-seconds-to-string () | 66 | (ert-deftest test-seconds-to-string () |
| 67 | (should (equal (seconds-to-string 0) "0s")) | 67 | (should (equal (seconds-to-string 0) "0s")) |
| @@ -170,7 +170,8 @@ | |||
| 170 | 170 | ||
| 171 | (ert-deftest test-time-since () | 171 | (ert-deftest test-time-since () |
| 172 | (should (time-equal-p 0 (time-since nil))) | 172 | (should (time-equal-p 0 (time-since nil))) |
| 173 | (should (= (cadr (time-since (time-subtract (current-time) 1))) 1))) | 173 | (should (time-equal-p 1 (time-convert (time-since (time-subtract nil 1)) |
| 174 | 'integer)))) | ||
| 174 | 175 | ||
| 175 | (ert-deftest test-time-decoded-period () | 176 | (ert-deftest test-time-decoded-period () |
| 176 | (should (equal (decoded-time-period '(nil nil 1 nil nil nil nil nil nil)) | 177 | (should (equal (decoded-time-period '(nil nil 1 nil nil nil nil nil nil)) |