guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 32/55: Fix tests for SRFI-19 date->string ~N


From: Andy Wingo
Subject: [Guile-commits] 32/55: Fix tests for SRFI-19 date->string ~N
Date: Thu, 23 May 2019 11:52:41 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 1b0fcddba54f5404f95599a02e3430448403e4a7
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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]