From ffc891fbaea94ffdb700be7e8dfeaf743aa7b7a7 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 20 Jan 2017 01:45:51 -0800 Subject: [PATCH] Allow assert-error to be used without explicit error conditions. --- tests/unit-testing.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/unit-testing.scm b/tests/unit-testing.scm index 0f4287dca..171635ed7 100644 --- a/tests/unit-testing.scm +++ b/tests/unit-testing.scm @@ -417,12 +417,15 @@ USA. 'EQUALITY-PREDICATE = properties))) -(define-for-tests (assert-error thunk condition-types . properties) +(define-for-tests (assert-error thunk #!optional condition-types . properties) (call-with-current-continuation (lambda (k) (apply fail 'RESULT-OBJECT - (bind-condition-handler condition-types + (bind-condition-handler + (if (default-object? condition-types) + (list condition-type:error) + condition-types) (lambda (condition) condition ;ignore (k #f)) -- 2.25.1