Mercurial > hg > xemacs-beta
comparison tests/automated/weak-tests.el @ 4021:cef5f57bb9e2
[xemacs-hg @ 2007-06-21 13:39:08 by aidan]
'(lambda ...) -> #'(lambda ...), for the sake of style and the byte
compiler.
author | aidan |
---|---|
date | Thu, 21 Jun 2007 13:39:36 +0000 |
parents | aa0db78e67c4 |
children | 7b628daa39d4 |
comparison
equal
deleted
inserted
replaced
4020:77df2f1e36fd | 4021:cef5f57bb9e2 |
---|---|
53 | 53 |
54 ;; tests for ephemerons | 54 ;; tests for ephemerons |
55 (let* ((p (cons 3 4)) | 55 (let* ((p (cons 3 4)) |
56 (finalized-p nil) | 56 (finalized-p nil) |
57 (eph1 (make-ephemeron (cons 1 2) p | 57 (eph1 (make-ephemeron (cons 1 2) p |
58 '(lambda (value) | 58 #'(lambda (value) |
59 (setq finalized-p t)))) | 59 (setq finalized-p t)))) |
60 (eph2 (make-ephemeron p p))) | 60 (eph2 (make-ephemeron p p))) |
61 (Assert (eq p (ephemeron-ref (make-ephemeron (cons 1 2) p)))) | 61 (Assert (eq p (ephemeron-ref (make-ephemeron (cons 1 2) p)))) |
62 (Assert (ephemeron-p (make-ephemeron (cons 1 2) p))) | 62 (Assert (ephemeron-p (make-ephemeron (cons 1 2) p))) |
63 | 63 |
64 (garbage-collect) | 64 (garbage-collect) |
231 (let* ((inner_cons (cons 1 2)) | 231 (let* ((inner_cons (cons 1 2)) |
232 (weak1 (make-ephemeron inner_cons | 232 (weak1 (make-ephemeron inner_cons |
233 (make-ephemeron inner_cons | 233 (make-ephemeron inner_cons |
234 (cons 1 2) | 234 (cons 1 2) |
235 '(lambda (v) t)) | 235 '(lambda (v) t)) |
236 '(lambda (v) t)))) | 236 #'(lambda (v) t)))) |
237 (Assert (ephemeron-ref (ephemeron-ref weak1))) | 237 (Assert (ephemeron-ref (ephemeron-ref weak1))) |
238 (garbage-collect) | 238 (garbage-collect) |
239 ;; assure the inner ephis are still there | 239 ;; assure the inner ephis are still there |
240 (Assert (ephemeron-ref (ephemeron-ref weak1))) | 240 (Assert (ephemeron-ref (ephemeron-ref weak1))) |
241 ;; delete the key reference and force cleaning up the garbage | 241 ;; delete the key reference and force cleaning up the garbage |