From c3cd292ee063bdfd8cb21ef36c993f28f4467826 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Fri, 22 Apr 2016 10:36:03 -0500 Subject: [PATCH] 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. --- tests/test-actors.scm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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) -- 2.31.1