From: Chris Hanson Date: Sat, 7 Jan 2017 04:19:45 +0000 (-0800) Subject: Implement assert-range-error. X-Git-Tag: mit-scheme-pucked-9.2.12~227^2~189 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=f561ccad33e4ca95670d88351715abcdc078c9f2;p=mit-scheme.git Implement assert-range-error. Also rename assert-wta-error to assert-type-error. --- diff --git a/tests/runtime/test-parametric-predicate.scm b/tests/runtime/test-parametric-predicate.scm index 7542398ea..4357b3706 100644 --- a/tests/runtime/test-parametric-predicate.scm +++ b/tests/runtime/test-parametric-predicate.scm @@ -178,7 +178,7 @@ USA. (define-test 'match-template-pattern (lambda () - (assert-wta-error (lambda () (match-numbers '((? a)) 1))) + (assert-type-error (lambda () (match-numbers '((? a)) 1))) (assert-equal (match-numbers '((? a)) '(1)) '((a + 1))) (assert-equal (match-numbers '((? a -) (? b)) '(1 2)) diff --git a/tests/runtime/test-predicate-metadata.scm b/tests/runtime/test-predicate-metadata.scm index 5be30cb1f..7d9e7a2a4 100644 --- a/tests/runtime/test-predicate-metadata.scm +++ b/tests/runtime/test-predicate-metadata.scm @@ -32,8 +32,8 @@ USA. (lambda () (let ((np (lambda (object) #f))) (assert-false (predicate? np)) - (assert-wta-error (lambda () (predicate->tag np))) - (assert-wta-error (lambda () (predicate-name np))) + (assert-type-error (lambda () (predicate->tag np))) + (assert-type-error (lambda () (predicate-name np))) (assert-true (string? (predicate-description np)))))) (define-test 'simple-predicate diff --git a/tests/unit-testing.scm b/tests/unit-testing.scm index 523a91ccf..3353ef39f 100644 --- a/tests/unit-testing.scm +++ b/tests/unit-testing.scm @@ -436,9 +436,12 @@ USA. (define-for-tests assert-simple-error (error-assertion condition-type:simple-error)) -(define-for-tests assert-wta-error +(define-for-tests assert-type-error (error-assertion condition-type:wrong-type-argument)) +(define-for-tests assert-range-error + (error-assertion condition-type:bad-range-argument)) + (define-for-tests keep-it-fast!? (let ((v (get-environment-variable "FAST"))) (if (or (eq? v #f) (string-null? v))