From: Alexey D. <ade...@us...> - 2002-11-28 10:42:47
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1:/tmp/cvs-serv23345/tests Modified Files: character.pure.lisp Log Message: 0.7.10.5: Cleanup of type checking in character functions. ... fixed bug 230. Index: character.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/character.pure.lisp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- character.pure.lisp 7 Feb 2002 20:37:54 -0000 1.2 +++ character.pure.lisp 28 Nov 2002 10:42:44 -0000 1.3 @@ -13,6 +13,8 @@ (cl:in-package :cl-user) +(load "assertoid.lisp") + ;;; ANSI's specification of #'CHAR-NAME imposes these constraints. ;;; ;;; (Obviously, the numeric values in this test implicitly assume @@ -35,3 +37,22 @@ (assert (characterp named-char)) (let ((coded-char-name (char-name coded-char))) (assert (string= name coded-char-name)))))) + +;;; bug 230: CHAR= didn't check types of &REST arguments +(dolist (form '((code-char char-code-limit) + (standard-char-p "a") + (graphic-char-p "a") + (alpha-char-p "a") + (upper-case-p "a") + (lower-case-p "a") + (both-case-p "a") + (digit-char-p "a") + (alphanumericp "a") + (char= #\a "a") + (char/= #\a "a") + (char< #\a #\b "c") + (char-equal #\a #\a "b") + (digit-char -1) + (digit-char 4 1) + (digit-char 4 37))) + (assert (raises-error? (apply (car form) (mapcar 'eval (cdr form))) type-error))) |