1 (define-module (tests test-actors)
2 #:use-module (srfi srfi-64)
3 #:use-module (8sync systems actors)
4 #:use-module (tests utils))
6 (test-begin "test-actors")
16 (make-message 'id 'to 'from 'action
17 '((monkey . banana)))))
19 (test-equal (message-ref monkey-message 'monkey)
22 ;; A key we don't have
23 (let ((caught-error #f))
24 (catch 'message-missing-key
26 (message-ref monkey-message 'coo-coo))
28 (set! caught-error #t)))
29 (test-assert caught-error))
31 ;; A key we don't have, with a default set
32 (test-equal (message-ref monkey-message 'coo-coo 'danger-danger)
36 (test-end "test-agenda")