X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=tests%2Ftest-actors.scm;h=ea0324cd0bed6206be783a4e8755857c16b843b9;hp=3efa837d2b2fb5d725b0e602b74bcb59a92bdec3;hb=1c7504b3ea4ead41410c660702eccf70b6556363;hpb=42c6617807a7817943567ba967a735b93600d258 diff --git a/tests/test-actors.scm b/tests/test-actors.scm index 3efa837..ea0324c 100644 --- a/tests/test-actors.scm +++ b/tests/test-actors.scm @@ -143,9 +143,9 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" ;;; Cleanup tests (define-simple-actor - (*clean-up* test-call-clean-up)) + (*cleanup* test-call-cleanup)) -(define (test-call-clean-up actor message) +(define (test-call-cleanup actor message) (speak "Hey, I'm cleanin' up here!\n")) (with-fresh-speaker @@ -155,29 +155,29 @@ customer> Whaaaaat? I can't believe I got voice mail!\n" (test-equal '("Hey, I'm cleanin' up here!\n") (get-spoken))) -;; won't work if we turn off #:clean-up though +;; won't work if we turn off #:cleanup though (with-fresh-speaker (let ((hive (make-hive))) (hive-create-actor hive ) - (run-hive hive '() #:clean-up #f)) - (test-equal '("Hey, I'm cleanin' up here!\n") + (run-hive hive '() #:cleanup #f)) + (test-equal '() (get-spoken))) -;; The exploder self-destructs, even though run-hive has clean-up +;; 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))) - (*clean-up* (lambda _ (speak "Cleaning up post-explosion\n")))) + (*cleanup* (lambda _ (speak "Cleaning up post-explosion\n")))) (with-fresh-speaker (let ((hive (make-hive))) (define exploder (hive-create-actor hive )) (run-hive hive (list (bootstrap-message hive exploder 'explode)) - #:clean-up #f)) + #:cleanup #f)) (get-spoken))