Commit 170d55a8 authored by pfdietz's avatar pfdietz
Browse files

Added tests for VALUES, NTH-VALUE

parent 3331fe90
......@@ -52,6 +52,7 @@
(load "not-and-null.lsp")
(load "notany.lsp")
(load "notevery.lsp")
(load "nth-value.lsp")
(load "or.lsp")
(load "progv.lsp")
(load "some.lsp")
......@@ -60,6 +61,7 @@
(load "typecase.lsp")
(load "unless.lsp")
(load "unwind-protect.lsp")
(load "values.lsp")
(load "when.lsp")
......
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Oct 19 08:24:14 2002
;;;; Contains: Tests of NTH-VALUE
(in-package :cl-test)
(deftest nth-value.1
(nth-value 0 'a)
a)
(deftest nth-value.2
(nth-value 1 'a)
nil)
(deftest nth-value.3
(nth-value 0 (values))
nil)
(deftest nth-value.4
(loop for i from 0 to 19
collect (nth-value i (values 'a 'b 'c 'd 'e 'f 'g 'h 'i 'j 'k
'l 'm 'n 'o 'p 'q 'r 's)))
(a b c d e f g h i j k l m n o p q r s nil))
(deftest nth-value.5
(nth-value 100 'a)
nil)
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sat Oct 19 08:18:50 2002
;;;; Contains: Tests of VALUES
(in-package :cl-test)
(deftest values.0
(values))
(deftest values.1
(values 1)
1)
(deftest values.2
(values 1 2)
1 2)
(deftest values.3
(values 1 2 3)
1 2 3)
(deftest values.4
(values 1 2 3 4)
1 2 3 4)
(deftest values.10
(values 1 2 3 4 5 6 7 8 9 10)
1 2 3 4 5 6 7 8 9 10)
(deftest values.15
(values 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15)
(deftest values.19
(values 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19)
(deftest values.A
(values (values 1 2) (values 3 4 5) (values) (values 10))
1 3 nil 10)
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