X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Flist.pure.lisp;h=0abbdea906e0783d0acade57a53b77f850b80cd5;hb=a260738d7a71680079d972b102b4e4db4e8dc3ae;hp=e1270e15a71e109f71334e9627e7f9f45e41a22e;hpb=25070981025894faaef260a38b83fd0bbcfdc80d;p=sbcl.git diff --git a/tests/list.pure.lisp b/tests/list.pure.lisp index e1270e1..0abbdea 100644 --- a/tests/list.pure.lisp +++ b/tests/list.pure.lisp @@ -55,3 +55,20 @@ ;;; reported by Paul Dietz on cmucl-imp: LDIFF does not check type of ;;; its first argument (assert (not (ignore-errors (ldiff 1 2)))) + +;;; evaluation order in PUSH, PUSHNEW +(let ((a (map 'vector #'list '(a b c)))) + (let ((i 0)) + (pushnew (incf i) (aref a (incf i))) + (assert (equalp a #((a) (b) (1 c)))))) + +(symbol-macrolet ((s (aref a (incf i)))) + (let ((a (map 'vector #'list '(a b c)))) + (let ((i 0)) + (push t s) + (assert (equalp a #((a) (t b) (c)))) + (pushnew 1 s) + (assert (equalp a #((a) (t b) (1 c)))) + (setq i 0) + (assert (eql (pop s) 't)) + (assert (equalp a #((a) (b) (1 c)))))))