From: Chris Hanson Date: Fri, 20 Jan 2017 09:45:51 +0000 (-0800) Subject: Allow assert-error to be used without explicit error conditions. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~100 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=ffc891fbaea94ffdb700be7e8dfeaf743aa7b7a7;p=mit-scheme.git Allow assert-error to be used without explicit error conditions. --- 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))