source: trunk/source/tests/ansi-tests/cons-test-03.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: 719 bytes
Line 
1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sat Mar 28 07:32:20 1998
4;;;; Contains: Testing of CL Features related to "CONS", part 3
5
6(in-package :cl-test)
7
8(compile-and-load "cons-aux.lsp")
9
10;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11;;; (typep <obj> 'list)
12
13;;; These tests are now somewhat redundant
14
15(deftest typep-nil-list
16  (notnot-mv (typep nil 'list))
17  t)
18
19(deftest typep-symbol-list
20  (typep 'a 'list)
21  nil)
22
23(deftest typep-singleton-list-list
24  (notnot-mv (typep '(a) 'list))
25  t)
26
27(deftest typep-circular-list-list
28  (let ((x (cons nil nil)))
29    (setf (cdr x) x)
30    (notnot-mv (typep x 'list)))
31  t)
32
33(deftest typep-longer-list-list
34  (notnot-mv (typep '(a b c d e f g h) 'list))
35  t)
Note: See TracBrowser for help on using the repository browser.