source: trunk/source/tests/ansi-tests/copy-list.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 11 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 825 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Apr 19 21:55:19 2003
4;;;; Contains: Tests of COPY-LIST
5
6(in-package :cl-test)
7
8(compile-and-load "cons-aux.lsp")
9
10(deftest copy-list.1
11  (check-copy-list '(a b c d))
12  (a b c d))
13
14;; Check that copy-list works on dotted lists
15
16(deftest copy-list.2
17  (check-copy-list '(a . b))
18 (a . b))
19
20(deftest copy-list.3
21  (check-copy-list '(a b c . d))
22  (a b c . d))
23
24(deftest copy-list.4
25  (let ((i 0))
26    (values (copy-list (progn (incf i) '(a b c)))
27            i))
28  (a b c) 1)
29
30(def-fold-test copy-list.fold.1 (copy-list '(a b c d)))
31(def-fold-test copy-list.fold.2 (copy-list '(a . b)))
32
33;;; Error tests
34
35(deftest copy-list.error.1
36  (signals-error (copy-list) program-error)
37  t)
38
39(deftest copy-list.error.2
40  (signals-error (copy-list nil nil) program-error)
41  t)
Note: See TracBrowser for help on using the repository browser.