X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tests%2Ftest-agenda.scm;h=ef2c74f13abe7a6c20392f445fd78b6e97efe9a0;hb=5be4a76b4a1d667128042e5db7cd4621cb139340;hp=9ab65f1cdf57f3ef488ded5d0f33a006f382c4b5;hpb=cfccc4dee6478d80e2f45f72c0ab83b776d99503;p=8sync.git diff --git a/tests/test-agenda.scm b/tests/test-agenda.scm index 9ab65f1..ef2c74f 100644 --- a/tests/test-agenda.scm +++ b/tests/test-agenda.scm @@ -40,8 +40,25 @@ messages))) -;; Timer tests -;; =========== +;;; queue helpers +;;; ============= + +(define test-q (list->q '(1 2 3))) +(test-equal (deq! test-q) 1) +(test-equal (deq! test-q) 2) +(test-equal (deq! test-q) 3) +(test-assert (q-empty? test-q)) + +(define test-q (make-q* 'apple 'banana 'carrot)) +(test-equal (deq! test-q) 'apple) +(test-equal (deq! test-q) 'banana) +(test-equal (deq! test-q) 'carrot) +(test-assert (q-empty? test-q)) + + + +;;; Timer tests +;;; =========== (test-assert (time= '(1 . 1) '(1 . 1))) (test-assert (not (time= '(1 . 1) '(1 . 0))))