X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=tests%2Ftest-agenda.scm;h=781703b3ead8544e27ef8feb7dc0d7a9a122dc4a;hp=e183fdcfbcc57a9cf0c247f409852797e66d6726;hb=fb20084ff3904c8445dcc72d1497e1ad6fa775ee;hpb=2425363fe06d00cebd8f9c8ec9ae0a8c61716958 diff --git a/tests/test-agenda.scm b/tests/test-agenda.scm index e183fdc..781703b 100644 --- a/tests/test-agenda.scm +++ b/tests/test-agenda.scm @@ -60,7 +60,7 @@ (time-delta+ '(2 . 3) tdelta) '(10 . 3))) -(let ((tdelta (make-time-delta 10 1))) +(let ((tdelta (make-time-delta '(10 . 1)))) (test-assert (time-delta? tdelta)) (test-eqv (time-delta-sec tdelta) 10) (test-eqv (time-delta-usec tdelta) 1) @@ -68,6 +68,16 @@ (time-delta+ '(2 . 3) tdelta) '(12 . 4))) +(test-equal (time-minus '(100 . 100) '(50 . 66)) + '(50 . 34)) +(test-equal (time-minus '(2 . 0) '(0 . 1)) + '(1 . 999999)) + +(test-equal (time-plus '(50 . 34) '(50 . 66)) + '(100 . 100)) +(test-equal (time-plus '(1 . 999999) '(1 . 2)) + '(3 . 1)) + ;;; Schedule tests @@ -253,7 +263,7 @@ 8) ;; whoa, I'm surprised equal? can ;; compare records like this - (tdelta 8 0)) + (tdelta 8)) ;; TODO: test %port-request ;; TODO: test %sync and friends!