X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tests%2Ftest-actors.scm;h=0b9adb503e34a591a9b62c336257dd96db266a8e;hb=f82b19034aa588a744fff713416bd914778681eb;hp=4d7ec4b3d1a2fc6f99cedfbdcb1d82e594cce960;hpb=2785c244a09fc008488385b10053ef854fb27c34;p=8sync.git diff --git a/tests/test-actors.scm b/tests/test-actors.scm index 4d7ec4b..0b9adb5 100644 --- a/tests/test-actors.scm +++ b/tests/test-actors.scm @@ -74,8 +74,8 @@ ;;; Test reply / autoreply ;;; ====================== -(define-simple-actor - (pester-rep (wrap-apply antsy-caller-pester-rep))) +(define-actor () + ((pester-rep (wrap-apply antsy-caller-pester-rep)))) (define* (antsy-caller-pester-rep actor message #:key who-to-call) (~display "customer> I'm calling customer service about this!\n") @@ -92,8 +92,8 @@ (~display "customer> Well then! Harumph.\n") (error "Not an autoreply? What's going on here..."))))))) -(define-simple-actor - (field-call (wrap-apply rep-field-call))) +(define-actor () + ((field-call (wrap-apply rep-field-call)))) (define (rep-field-call actor message) (~display "good-rep> Hm, another call from a customer...\n") @@ -102,10 +102,10 @@ (~format "*rep hears*: ~a\n" msg) (~display "good-rep> I'm sorry, that's all I can do for you.\n"))) -(define-simple-actor - (field-call - (lambda (actor message) - (~display "lazy-rep> I'm not answering that.\n")))) +(define-actor () + ((field-call + (lambda (actor message) + (~display "lazy-rep> I'm not answering that.\n"))))) (let* ((hive (make-hive)) (customer (bootstrap-actor* hive "antsy-caller")) @@ -140,8 +140,8 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" ;;; Cleanup tests -(define-simple-actor - (*cleanup* test-call-cleanup)) +(define-actor () + ((*cleanup* test-call-cleanup))) (define (test-call-cleanup actor message) (speak "Hey, I'm cleanin' up here!\n")) @@ -165,11 +165,11 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" ;; The exploder self-destructs, even though run-hive has cleanup ;; disabled, because it cleans up on self-destruct. -(define-simple-actor - (explode (lambda (exploder message) - (speak "POOF\n") - (self-destruct exploder))) - (*cleanup* (lambda _ (speak "Cleaning up post-explosion\n")))) +(define-actor () + ((explode (lambda (exploder message) + (speak "POOF\n") + (self-destruct exploder))) + (*cleanup* (lambda _ (speak "Cleaning up post-explosion\n"))))) (with-fresh-speaker (let ((hive (make-hive)))