ignore.lsp 756 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sat May 21 07:59:24 2005
;;;; Contains: Tests of the IGNORE declarations

(in-package :cl-test)

(deftest ignore.1
  (let ((x 'foo)) (declare (ignore x)))
  nil)

(deftest ignore.2
  (let ((x 'foo)) (declare (ignore x)) x)
  foo)

(deftest ignore.3
  (flet ((%f () 'foo))
    (declare (ignore (function %f))))
  nil)
sds's avatar
sds committed
20

21 22 23 24 25 26
(deftest ignore.4
  (flet ((%f () 'foo))
    (declare (ignore (function %f)))
    (%f))
  foo)

27 28
(deftest ignore.5
  (flet (((setf %f) (x y) (setf (car y) x)))
sds's avatar
sds committed
29 30
        (declare (ignore (function (setf %f))))
        :good)
31
  :good)
32

33 34
(deftest ignore.6
  (labels (((setf %f) (x y) (setf (car y) x)))
sds's avatar
sds committed
35 36
          (declare (ignore (function (setf %f))))
          :good)
37
  :good)