From 7e55e74249e38e863254e3dd9263db2b907dca9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 18 May 2022 00:19:32 +0200 Subject: Possibly marginally improve tests. --- tests/test/datetime.scm | 76 +++++++++++++------------------------------------ 1 file changed, 20 insertions(+), 56 deletions(-) diff --git a/tests/test/datetime.scm b/tests/test/datetime.scm index 8648006b..3435aad6 100644 --- a/tests/test/datetime.scm +++ b/tests/test/datetime.scm @@ -15,72 +15,36 @@ :use-module ((guile) :select (LC_CTYPE LC_TIME))) (test-equal - "empty time" + "A new time is empty" (time) #00:00:00) -(test-assert - "Synatx date" - #2020-01-01) - -(test-assert - "Test year type" - (integer? (year (date year: 2020)))) - -(test-assert - "Test mmnth type" - (integer? (month (date month: 1)))) +(test-equal "A new date is empty" + (date) + #0000-00-00) (test-assert - "Test day type" - (integer? (day (date day: 1)))) - -(test-equal - "Manual print (any)" - "2020-10-10" - (let ((d #2020-10-10)) - (format #f "~a-~a-~a" (year d) (month d) (day d)))) - -(test-equal - "Manual print (number)" - "2020-10-10" - (let ((d #2020-10-10)) - (format #f "~d-~d-~d" (year d) (month d) (day d)))) - -(test-equal - "Date print" - "#2020-01-01" - (format - #f - "~a" - #2020-01-01)) - -(test-equal "time print" - "#20:30:40" - (format #f "~a" #20:30:40)) + "Datetime have syntax" + #2020-01-01) -(test-equal "time print bad" - "#<