Commit 346dd7e7 authored by pfdietz's avatar pfdietz

A little extra testing of declarations in some forms that take them

parent 89a3d4f0
......@@ -82,4 +82,20 @@
(return-from done :bad2)))
:good)
;;; Test that do-all-symbols accepts declarations
(deftest do-all-symbols.9
(let ((x 0)
(y 1))
(do-all-symbols (z nil)
(declare (type (integer * 0) x))
(declare (type (integer 1 *) y))
(declare (ignore z))
(when (< x y) (return :good))))
:good)
;;; Default return is NIL
(deftest do-all-symbols.10
(do-all-symbols (s) (declare (ignore s)))
nil)
......@@ -74,6 +74,13 @@
(declare (optimize)))
nil)
(deftest with-hash-table-iterator.8a
(with-hash-table-iterator
(%x (make-hash-table))
(declare (optimize))
(declare (optimize)))
nil)
(deftest with-hash-table-iterator.9
(with-hash-table-iterator
(%x (make-hash-table))
......
......@@ -19,6 +19,12 @@
(with-input-from-string (s "abc") (declare (optimize speed)))
nil)
(deftest with-input-from-string.3a
(with-input-from-string (s "abc")
(declare (optimize speed))
(declare (optimize space)))
nil)
(deftest with-input-from-string.4
(with-input-from-string
(s "abc")
......
......@@ -43,7 +43,8 @@
(delete-all-versions pn)
(with-open-file
(s pn :direction :output)
(declare (ignore s))))
(declare (ignore s))
(declare (optimize))))
nil)
(deftest with-open-file.6
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment