From: Christopher Allan Webber Date: Fri, 22 Apr 2016 15:36:03 +0000 (-0500) Subject: tests: actors: Fix check for a missing key on message-ref X-Git-Tag: v0.2.0~57 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=c3cd292ee063bdfd8cb21ef36c993f28f4467826;p=8sync.git tests: actors: Fix check for a missing key on message-ref * tests/test-actors.scm: Update test for message-ref with missing key. It used to be that the default was to return #f. Now the default is to throw an error if no default provided. --- diff --git a/tests/test-actors.scm b/tests/test-actors.scm index fa33922..6a9b0a7 100644 --- a/tests/test-actors.scm +++ b/tests/test-actors.scm @@ -20,8 +20,13 @@ 'banana) ;; A key we don't have - (test-equal (message-ref monkey-message 'coo-coo) - #f) + (let ((caught-error #f)) + (catch 'message-missing-key + (lambda () + (message-ref monkey-message 'coo-coo)) + (lambda (. args) + (set! caught-error #t))) + (test-assert caught-error)) ;; A key we don't have, with a default set (test-equal (message-ref monkey-message 'coo-coo 'danger-danger)