mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
(date-week-number): Add tests.
This commit is contained in:
parent
4449eb27bf
commit
e76f68caee
1 changed files with 9 additions and 1 deletions
|
@ -150,7 +150,15 @@ incomplete numerical tower implementation.)"
|
||||||
(time2 (make-time time-monotonic 385907 998360432))
|
(time2 (make-time time-monotonic 385907 998360432))
|
||||||
(diff (time-difference time2 time1)))
|
(diff (time-difference time2 time1)))
|
||||||
(test-time-arithmetic add-duration time1 diff time2)
|
(test-time-arithmetic add-duration time1 diff time2)
|
||||||
(test-time-arithmetic subtract-duration time2 diff time1)))
|
(test-time-arithmetic subtract-duration time2 diff time1))
|
||||||
|
|
||||||
|
(with-test-prefix "date-week-number"
|
||||||
|
(pass-if "1Jan84"
|
||||||
|
(= 0 (date-week-number (make-date 0 0 0 0 1 1 1984 0) 0)))
|
||||||
|
(pass-if "7Jan84"
|
||||||
|
(= 0 (date-week-number (make-date 0 0 0 0 7 1 1984 0) 0)))
|
||||||
|
(pass-if "8Jan84"
|
||||||
|
(= 1 (date-week-number (make-date 0 0 0 0 8 1 1984 0) 0)))))
|
||||||
|
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
;; eval: (put 'with-tz 'scheme-indent-function 1)
|
;; eval: (put 'with-tz 'scheme-indent-function 1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue