[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: Fix tests for SRFI-19 date->string ~N
From: |
Daniel Llorens |
Subject: |
[Guile-commits] 01/01: Fix tests for SRFI-19 date->string ~N |
Date: |
Wed, 12 Dec 2018 02:32:25 -0500 (EST) |
lloda pushed a commit to branch stable-2.2
in repository guile.
commit 901bfef5922ace25c4344522ce47ed872d37f989
Author: Daniel Llorens <address@hidden>
Date: Wed Dec 12 08:01:05 2018 +0100
Fix tests for SRFI-19 date->string ~N
---
test-suite/tests/srfi-19.test | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test
index 256ff74..1d56214 100644
--- a/test-suite/tests/srfi-19.test
+++ b/test-suite/tests/srfi-19.test
@@ -177,14 +177,18 @@ incomplete numerical tower implementation.)"
(date->string date))))
(pass-if "string->date understands nanoseconds (1)"
- (time=? (date->time-utc (string->date "2018-12-10 10:53:24.189"
- "~Y-~m-~d ~H:~M:~S.~N"))
- (date->time-utc (make-date 189000000 24 53 10 10 12 2018 3600))))
+ (let ((date (string->date "2018-12-10 10:53:24.189"
+ "~Y-~m-~d ~H:~M:~S.~N")))
+ (time=? (date->time-utc date)
+ (date->time-utc (make-date 189000000 24 53 10 10 12 2018
+ (date-zone-offset date))))))
(pass-if "string->date understands nanoseconds (2)"
- (time=? (date->time-utc (string->date "2018-12-10 10:53:24.189654321"
- "~Y-~m-~d ~H:~M:~S.~N"))
- (date->time-utc (make-date 189654321 24 53 10 10 12 2018 3600))))
+ (let ((date (string->date "2018-12-10 10:53:24.189654321"
+ "~Y-~m-~d ~H:~M:~S.~N")))
+ (time=? (date->time-utc date)
+ (date->time-utc (make-date 189654321 24 53 10 10 12 2018
+ (date-zone-offset date))))))
(pass-if "date->string pads small nanoseconds values correctly"
(let* ((date (make-date 99999999 5 34 12 26 3 2017 0)))