/[gcl]/gcl/ansi-tests/cons-test-10.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/cons-test-10.lsp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by pfdietz, Wed Jan 29 02:11:54 2003 UTC revision 1.4 by pfdietz, Sat Feb 8 06:23:02 2003 UTC
# Line 10  Line 10 
10  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
11  ;;; last  ;;; last
12    
13  (deftest last-1  (deftest last.1
14      (last nil)    (last nil)
15    nil)    nil)
16    
17  (deftest last-2  (deftest last.2
18      (last (copy-tree '(a b)))    (last (copy-tree '(a b)))
19    (b))    (b))
20    
21  (deftest last-3  (deftest last.3
22      (last (copy-tree '(a b . c)))    (last (copy-tree '(a b . c)))
23    (b . c))    (b . c))
24    
25  (deftest last-4  (deftest last.4
26      (last (copy-tree '(a b c d)) 0)    (last (copy-tree '(a b c d)) 0)
27    nil)    nil)
28    
29  (deftest last-5  (deftest last.5
30      (last (copy-tree '(a b c d)) 1)    (last (copy-tree '(a b c d)) 1)
31    (d))    (d))
32    
33  (deftest last-6  (deftest last.6
34      (last (copy-tree '(a b c d)) 2)    (last (copy-tree '(a b c d)) 2)
35    (c d))    (c d))
36    
37  (deftest last-7  (deftest last.7
38      (last (copy-tree '(a b c d)) 5)    (last (copy-tree '(a b c d)) 5)
39    (a b c d))    (a b c d))
40    
41  (deftest last-8  (deftest last.8
42      (last (cons 'a 'b) 0)    (last (cons 'a 'b) 0)
43    b)    b)
44    
45  (deftest last-9  (deftest last.9
46      (last (cons 'a 'b) 1)    (last (cons 'a 'b) 1)
47    (a . b))    (a . b))
48    
49  (deftest last-10  (deftest last.10
50      (last (cons 'a 'b) 2)    (last (cons 'a 'b) 2)
51    (a . b))    (a . b))
52    
53    (deftest last.11
54      (let ((i 0) x y)
55        (values
56         (last (progn (setf x (incf i)) (list 'a 'b 'c 'd))
57               (setf y (incf i)))
58         i x y))
59      (c d) 2 1 2)
60    
61  (deftest last.error.1  (deftest last.error.1
62    (classify-error (last (list 'a 'b 'c) -1))    (classify-error (last (list 'a 'b 'c) -1))
63    type-error)    type-error)

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26