]> gitweb.factorcode.org Git - factor.git/commitdiff
calendar: add some tests for time-.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 11 Dec 2020 21:45:09 +0000 (13:45 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 11 Dec 2020 21:45:09 +0000 (13:45 -0800)
basis/calendar/calendar-tests.factor

index 47b688602fc07797766ba70b590810c91c5aff47..d1ccccef01a550da90785c79ad463fd1e14bbca4 100644 (file)
@@ -192,6 +192,9 @@ IN: calendar
 { t } [ 1325376000 unix-time>timestamp 2012 <year-gmt> = ] unit-test
 { t } [ 1356998399 unix-time>timestamp 2013 <year-gmt> 1 seconds time- = ] unit-test
 
+{ t } [ now now-gmt time- duration>seconds 1/5 < ] unit-test
+{ t } [ now-gmt now time- duration>seconds 1/5 < ] unit-test
+
 { t } [ 1500000000 random [ unix-time>timestamp timestamp>unix-time ] keep = ] unit-test
 
 { t } [