Commit 346dd7e7 authored by pfdietz's avatar pfdietz
Browse files

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

parent 89a3d4f0
...@@ -82,4 +82,20 @@ ...@@ -82,4 +82,20 @@
(return-from done :bad2))) (return-from done :bad2)))
:good) :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))))
;;; Default return is NIL
(deftest do-all-symbols.10
(do-all-symbols (s) (declare (ignore s)))
...@@ -74,6 +74,13 @@ ...@@ -74,6 +74,13 @@
(declare (optimize))) (declare (optimize)))
nil) nil)
(deftest with-hash-table-iterator.8a
(%x (make-hash-table))
(declare (optimize))
(declare (optimize)))
(deftest with-hash-table-iterator.9 (deftest with-hash-table-iterator.9
(with-hash-table-iterator (with-hash-table-iterator
(%x (make-hash-table)) (%x (make-hash-table))
...@@ -19,6 +19,12 @@ ...@@ -19,6 +19,12 @@
(with-input-from-string (s "abc") (declare (optimize speed))) (with-input-from-string (s "abc") (declare (optimize speed)))
nil) nil)
(deftest with-input-from-string.3a
(with-input-from-string (s "abc")
(declare (optimize speed))
(declare (optimize space)))
(deftest with-input-from-string.4 (deftest with-input-from-string.4
(with-input-from-string (with-input-from-string
(s "abc") (s "abc")
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
(delete-all-versions pn) (delete-all-versions pn)
(with-open-file (with-open-file
(s pn :direction :output) (s pn :direction :output)
(declare (ignore s)))) (declare (ignore s))
(declare (optimize))))
nil) nil)
(deftest with-open-file.6 (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