From f561ccad33e4ca95670d88351715abcdc078c9f2 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 6 Jan 2017 20:19:45 -0800 Subject: [PATCH] Implement assert-range-error. Also rename assert-wta-error to assert-type-error. --- tests/runtime/test-parametric-predicate.scm | 2 +- tests/runtime/test-predicate-metadata.scm | 4 ++-- tests/unit-testing.scm | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) 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)) -- 2.25.1