comparison tests/automated/lisp-tests.el @ 5283:be436ac36ba4

Don't share a counter when checking for circularity, list_merge(). src/ChangeLog addition: 2010-10-12 Aidan Kehoe <kehoea@parhasard.net> * fns.c (list_merge): Circularity checking here needs to be done independently for each list, they can't share a loop counter. Thank you for the bug report, Robert Pluim! tests/ChangeLog addition: 2010-10-12 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-tests.el: Make sure circularity checking with #'merge is sane.
author Aidan Kehoe <kehoea@parhasard.net>
date Tue, 12 Oct 2010 18:14:12 +0100
parents 04811a268716
children 99de5fd48e87
comparison
equal deleted inserted replaced
5282:dcc34e28cd84 5283:be436ac36ba4
2407 (Assert (not (eql '1/2 (read (prin1-to-string (intern "1/2"))))) 2407 (Assert (not (eql '1/2 (read (prin1-to-string (intern "1/2")))))
2408 "checking symbols with ratio-like names are printed distinctly") 2408 "checking symbols with ratio-like names are printed distinctly")
2409 (Assert (not (eql '1/5 (read (prin1-to-string (intern "2/10"))))) 2409 (Assert (not (eql '1/5 (read (prin1-to-string (intern "2/10")))))
2410 "checking symbol named \"2/10\" not eql to ratio 1/5 on read")) 2410 "checking symbol named \"2/10\" not eql to ratio 1/5 on read"))
2411 2411
2412 (let* ((count 0)
2413 (list (map-into (make-list 2048 nil) #'(lambda () (decf count))))
2414 (expected (append list '(1))))
2415 (Assert (equal expected (merge 'list list '(1) #'<))
2416 "checking merge's circularity checks are sane"))
2417
2412 ;;; end of lisp-tests.el 2418 ;;; end of lisp-tests.el