Mercurial > hg > xemacs-beta
diff tests/automated/lisp-tests.el @ 5889:bd644055ef44
Correct a bug in #'check-type, non-setf'able PLACEs
lisp/ChangeLog addition:
2015-04-11 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el:
* cl-macs.el (check-type):
Correct the sense of the type test here when PLACE is not
setf'able, something which gave confusing errors with literal
fixnums or, e.g., (+ 30 40).
tests/ChangeLog addition:
2015-04-11 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Check for a bug just fixed in cl-macs.el.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sat, 11 Apr 2015 18:06:17 +0100 |
parents | c96000075e49 |
children | 053ef01b71a8 |
line wrap: on
line diff
--- a/tests/automated/lisp-tests.el Thu Apr 09 14:54:37 2015 +0100 +++ b/tests/automated/lisp-tests.el Sat Apr 11 18:06:17 2015 +0100 @@ -3796,4 +3796,17 @@ (Assert (eql ?\x09 (digit-char 9 nil binary-table)) "checking `digit-char' reflects RADIX-TABLE, 9, base 10")) +;; Check that a bug in #'check-type with non-setfable PLACE (something not +;; actually specified by Common Lisp) has been fixed. +(Assert (prog1 t (check-type 300 fixnum)) + "checking #'check-type OK, fixnum literal PLACE") +(Check-Error wrong-type-argument + (check-type 300 (integer -1 100)) + "checking #'check-type errors properly on fixnum literal PLACE") +(Assert (prog1 t (check-type (+ 100 200) fixnum)) + "checking #'check-type OK, non-setfable PLACE") +(Check-Error wrong-type-argument + (check-type (+ 600 1000) (integer 0 20)) + "checking #'check-type errors properly, non-setfable PLACE") + ;;; end of lisp-tests.el