guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 01/01: Add srfi-19 ~f regression test


From: Andy Wingo
Subject: [Guile-commits] 01/01: Add srfi-19 ~f regression test
Date: Wed, 19 Apr 2017 09:49:56 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit e264860718bfde6c578a64c5bd3d0907640d1b3e
Author: Andy Wingo <address@hidden>
Date:   Wed Apr 19 15:49:06 2017 +0200

    Add srfi-19 ~f regression test
    
    * test-suite/tests/srfi-19.test ("SRFI date/time library"): Add test for
      https://bugs.gnu.org/26259.
---
 test-suite/tests/srfi-19.test | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test
index 717047b..c963f15 100644
--- a/test-suite/tests/srfi-19.test
+++ b/test-suite/tests/srfi-19.test
@@ -180,10 +180,14 @@ incomplete numerical tower implementation.)"
       (equal? "099999999"
               (date->string date "~N"))))
 
-  (pass-if "date->string correct ~f"
+  (pass-if "date->string ~f without leading zeroes"
     (let ((date (make-date 200000000 5 34 12 26 3 2017 0)))
       (equal? "5.2" (date->string date "~f"))))
 
+  (pass-if "date->string ~f proper fractional part"
+    (let ((date (make-date 550000 56 34 12 26 3 2017 0)))
+      (equal? "56.00055" (date->string date "~f"))))
+
   ;; check time comparison procedures
   (let* ((time1 (make-time time-monotonic 0 0))
          (time2 (make-time time-monotonic 0 0))



reply via email to

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