X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=tests%2Ftest-agenda.scm;h=844356d51b31b1b8d913ef39e91f40015bc8faa9;hp=bbf22d28fbaaa98a1184092a9fe0fffeabef9612;hb=d757311a3fbec95274d1b4b39b1d78e30b1bb5e3;hpb=2a468eba78a9fee4cff48550bb675130daea1e1f diff --git a/tests/test-agenda.scm b/tests/test-agenda.scm index bbf22d2..844356d 100644 --- a/tests/test-agenda.scm +++ b/tests/test-agenda.scm @@ -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 @@ -228,7 +238,7 @@ (test-equal (run-request-when run-two-squared) '(88 . 0))) -;;; %run, %sync and friends tests +;;; %run, %8sync and friends tests ;;; ----------------------------- (define (test-%run-and-friends async-request expected-when) @@ -253,10 +263,10 @@ 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! +;; TODO: test %8sync and friends! ;;; Agenda tests @@ -309,7 +319,7 @@ (speaker "Today I went to the zoo and I saw...\n") (speaker (string-concatenate - `("A " ,(symbol->string (%sync (%run (return-monkey)))) "!\n")))) + `("A " ,(symbol->string (%8sync (%run (return-monkey)))) "!\n")))) (let ((q (make-q))) (set! speaker (speak-it))