/[gcl]/gcl/ansi-tests/every.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/every.lsp

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

revision 1.11 by pfdietz, Sat Jan 17 12:44:01 2004 UTC revision 1.12 by pfdietz, Fri Aug 27 13:26:33 2004 UTC
# Line 78  Line 78 
78    (notnot-mv (every 'null '(nil nil nil nil)))    (notnot-mv (every 'null '(nil nil nil nil)))
79    t)    t)
80    
81    ;;; Other specialized sequences
82    
83    (deftest every.17
84      (let ((v (make-array '(10) :initial-contents '(0 0 0 0 1 2 3 4 5 6)
85                           :fill-pointer 4)))
86        (loop for j from 0 to 9
87              do (setf (fill-pointer v) j)
88              collect (notnot (every #'zerop v))))
89      (t t t t t nil nil nil nil nil))
90    
91    (deftest every.18
92      (loop for i from 1 to 40
93            for type = `(unsigned-byte ,i)
94            unless
95            (let ((v (make-array '(10) :initial-contents '(0 0 0 0 1 1 1 1 1 1)
96                                 :element-type type
97                                 :fill-pointer 4)))
98              (equal (loop for j from 0 to 9
99                           do (setf (fill-pointer v) j)
100                           collect (notnot (every #'zerop v)))
101                     '(t t t t t nil nil nil nil nil)))
102            collect i)
103      nil)
104    
105    (deftest every.19
106      (loop for i from 1 to 40
107            for type = `(signed-byte ,i)
108            unless
109            (let ((v (make-array '(10) :initial-contents '(0 0 0 0 -1 -1 -1 -1 -1 -1)
110                                 :element-type type
111                                 :fill-pointer 4)))
112              (equal (loop for j from 0 to 9
113                           do (setf (fill-pointer v) j)
114                           collect (notnot (every #'zerop v)))
115                     '(t t t t t nil nil nil nil nil)))
116            collect i)
117      nil)
118    
119    (deftest every.20
120      (let ((v (make-array '(10) :initial-contents "abcd012345"
121                           :element-type 'character
122                           :fill-pointer 4)))
123        (loop for j from 0 to 9
124              do (setf (fill-pointer v) j)
125              collect (notnot (every #'alpha-char-p v))))
126      (t t t t t nil nil nil nil nil))
127    
128    (deftest every.21
129      (let ((v (make-array '(10) :initial-contents "abcd012345"
130                           :element-type 'base-char
131                           :fill-pointer 4)))
132        (loop for j from 0 to 9
133              do (setf (fill-pointer v) j)
134              collect (notnot (every #'alpha-char-p v))))
135      (t t t t t nil nil nil nil nil))
136    
137    (deftest every.22
138      (let ((v (make-array '(5) :initial-contents "abcde"
139                           :element-type 'base-char)))
140        (values
141         (notnot (every #'alpha-char-p v))
142         (setf (aref v 2) #\0)
143         (every #'alpha-char-p v)))
144      t #\0 nil)
145    
146    ;;; Order of arguments
147    
148  (deftest every.order.1  (deftest every.order.1
149    (let ((i 0) x y)    (let ((i 0) x y)
150      (values      (values

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

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