2
;;;; Author: Paul Dietz
3
;;;; Created: Sat Oct 19 08:24:14 2002
4
;;;; Contains: Tests of NTH-VALUE
17
(nth-value 0 (values))
21
(loop for i from 0 to 19
22
collect (nth-value i (values 'a 'b 'c 'd 'e 'f 'g 'h 'i 'j 'k
23
'l 'm 'n 'o 'p 'q 'r 's)))
24
(a b c d e f g h i j k l m n o p q r s nil))
30
(deftest nth-value.order.1
33
(nth-value (progn (setf x (incf i)) 3)
34
(progn (setf y (incf i)) (values 'a 'b 'c 'd 'e 'f 'g)))
38
(deftest nth-value.error.1
39
(signals-error (funcall (macro-function 'nth-value))
43
(deftest nth-value.error.2
44
(signals-error (funcall (macro-function 'nth-value)
45
'(nth-value 1 '(a b c)))
49
(deftest nth-value.error.3
50
(signals-error (funcall (macro-function 'nth-value)
51
'(nth-value 1 '(a b c))