From e14e1c604cce281eafcfcea0f7d56f4e98d19653 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 23 May 2010 22:12:54 -0700 Subject: [PATCH] Use new ASSERT-ERROR. --- tests/runtime/test-regsexp.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/runtime/test-regsexp.scm b/tests/runtime/test-regsexp.scm index 8f3a9c86f..1b7bb04d4 100644 --- a/tests/runtime/test-regsexp.scm +++ b/tests/runtime/test-regsexp.scm @@ -31,15 +31,15 @@ USA. (regsexp-match-string (compile-regsexp pattern) string)) (define ((match-string-test pattern string expected)) - (let ((result (ignore-errors (lambda () (match-string pattern string))))) - (if (condition? result) - (if (and (eq? expected 'PATTERN-ERROR) - (condition-of-type? result condition-type:compile-regsexp)) - #f - (signal-condition result)) - (assert-equal result + (let ((thunk (lambda () (match-string pattern string))) + (expr `(match-string ',pattern ,string))) + (if (eq? expected 'PATTERN-ERROR) + (assert-error thunk + (list condition-type:compile-regsexp) + 'EXPRESSION error) + (assert-equal (thunk) expected - 'EXPRESSION `(match-string ',pattern ,string))))) + 'EXPRESSION expr)))) (define (match-strings-test pattern entries) (map (lambda (p) -- 2.25.1