summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-08-22 22:30:52 +0000
committerKevin Ryde <user42@zip.com.au>2003-08-22 22:30:52 +0000
commit01dbf76f90e4850d9334aaca2f1592ff5527a8a0 (patch)
tree350221eab1c16c98c83af0fe9278406ece88e81b
parentab8f1b99f13b35ebd9b751edf28353ebc2303132 (diff)
downloadguile-01dbf76f90e4850d9334aaca2f1592ff5527a8a0.tar.gz
(date-week-number): Add tests.
-rw-r--r--test-suite/tests/srfi-19.test10
1 files changed, 8 insertions, 2 deletions
diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test
index 75eb25637..45a8bf1e3 100644
--- a/test-suite/tests/srfi-19.test
+++ b/test-suite/tests/srfi-19.test
@@ -1,7 +1,7 @@
;;;; srfi-19.test --- test suite for SRFI-19 -*- scheme -*-
;;;; Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de> --- June 2001
;;;;
-;;;; Copyright (C) 2001 Free Software Foundation, Inc.
+;;;; Copyright (C) 2001, 2003 Free Software Foundation, Inc.
;;;;
;;;; 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
@@ -150,7 +150,13 @@ incomplete numerical tower implementation.)"
(time2 (make-time time-monotonic 385907 998360432))
(diff (time-difference time2 time1)))
(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 (= 0 (date-week-number (make-date 0 0 0 0 1 1 1984 0) 0)))
+ (pass-if (= 0 (date-week-number (make-date 0 0 0 0 7 1 1984 0) 0)))
+ (pass-if (= 1 (date-week-number (make-date 0 0 0 0 8 1 1984 0) 0)))))
+
;; Local Variables:
;; eval: (put 'with-tz 'scheme-indent-function 1)