X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=tests%2Ftest-agenda.scm;h=ef2c74f13abe7a6c20392f445fd78b6e97efe9a0;hp=a41be0adfe58431b272923bc76fcba685db825f1;hb=2cf0efca6f8abb4938cec1cc4d00bb96dcc4de87;hpb=70569369ff9d2814d4902443a6531cce76dcc8de diff --git a/tests/test-agenda.scm b/tests/test-agenda.scm index a41be0a..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)))) @@ -400,7 +417,7 @@ (catch-8sync (begin (speaker "hello") - (throw '%8sync-caught-error + (throw '8sync-caught-error 'my-orig-key '(apple orange banana) '(*fake-stack* *fake-stack* *fake-stack*)) (speaker "no goodbyes")) ('some-key