From 0c9855167736d9f045cb127150b060f3b848d927 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 26 Feb 2008 15:22:49 -0600 Subject: [PATCH] Add failing test --- extra/calendar/calendar-tests.factor | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/extra/calendar/calendar-tests.factor b/extra/calendar/calendar-tests.factor index a3ae5f115a..a03ebeffcb 100755 --- a/extra/calendar/calendar-tests.factor +++ b/extra/calendar/calendar-tests.factor @@ -161,3 +161,19 @@ continuations system io.streams.string ; [ 1+1/2 ] [ "+01:30" [ read-rfc3339-gmt-offset ] with-string-reader ] unit-test + +: check+dt now dup clone [ rot +dt drop ] keep = ; + +[ t ] [ 5 seconds check+dt ] unit-test + +[ t ] [ 5 minutes check+dt ] unit-test + +[ t ] [ 5 hours check+dt ] unit-test + +[ t ] [ 5 days check+dt ] unit-test + +[ t ] [ 5 weeks check+dt ] unit-test + +[ t ] [ 5 months check+dt ] unit-test + +[ t ] [ 5 years check+dt ] unit-test