comparison tests/automated/lisp-tests.el @ 5346:b4ef3128160c

Fix some testsuite failures, #'delete, #'delq, #'remove, #'remq. lisp/ChangeLog addition: 2011-01-23 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (delete): * cl-macs.el (delq): * cl-macs.el (remove): * cl-macs.el (remq): Don't use the compiler macro if these functions were given the wrong number of arguments, as happens in lisp-tests.el. * cl-seq.el (remove, remq): Removed. I added these to subr.el, and forgot to remove them from here. tests/ChangeLog addition: 2011-01-23 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el (test-fun): #'delete* and friends can now throw a wrong-type-argument if handed a non-sequence; accept this too when checking for an error when passing a fixnum as the SEQUENCE argument. Check #'remove*, #'remove and #'remq too.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 23 Jan 2011 13:13:54 +0000
parents ba62563ec7c7
children fd441b85d760
comparison
equal deleted inserted replaced
5345:db326b8fe982 5346:b4ef3128160c
791 ((test-fun 791 ((test-fun
792 (fun) 792 (fun)
793 `(progn 793 `(progn
794 (Check-Error wrong-number-of-arguments (,fun)) 794 (Check-Error wrong-number-of-arguments (,fun))
795 (Check-Error wrong-number-of-arguments (,fun nil)) 795 (Check-Error wrong-number-of-arguments (,fun nil))
796 (Check-Error malformed-list (,fun nil 1)) 796 (Check-Error (malformed-list wrong-type-argument) (,fun nil 1))
797 ,@(loop for n in '(1 2 2000) 797 ,@(loop for n in '(1 2 2000)
798 collect `(Check-Error circular-list (,fun 1 (make-circular-list ,n)))))) 798 collect `(Check-Error circular-list (,fun 1 (make-circular-list ,n))))))
799 (test-funs (&rest funs) `(progn ,@(loop for fun in funs collect `(test-fun ,fun))))) 799 (test-funs (&rest funs) `(progn ,@(loop for fun in funs collect `(test-fun ,fun)))))
800 800
801 (test-funs member* member old-member 801 (test-funs member* member memq
802 memq old-memq 802 assoc* assoc assq
803 assoc* assoc old-assoc 803 rassoc* rassoc rassq
804 rassoc* rassoc old-rassoc 804 delete* delete delq
805 rassq old-rassq 805 remove* remove remq
806 delete* delete old-delete 806 old-member old-memq
807 delq old-delq 807 old-assoc old-assq
808 remassoc remassq remrassoc remrassq)) 808 old-rassoc old-rassq
809 old-delete old-delq
810 remassoc remassq remrassoc remrassq))
809 811
810 (let ((x '((1 . 2) 3 (4 . 5)))) 812 (let ((x '((1 . 2) 3 (4 . 5))))
811 (Assert (eq (assoc 1 x) (car x))) 813 (Assert (eq (assoc 1 x) (car x)))
812 (Assert (eq (assq 1 x) (car x))) 814 (Assert (eq (assq 1 x) (car x)))
813 (Assert (eq (rassoc 1 x) nil)) 815 (Assert (eq (rassoc 1 x) nil))