/[gcl]/gcl/ansi-tests/map-into.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/map-into.lsp

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

revision 1.2 by pfdietz, Wed Oct 23 03:10:23 2002 UTC revision 1.3 by pfdietz, Sun Nov 3 13:21:47 2002 UTC
# Line 123  Line 123 
123    (let ((a (make-array 6 :initial-element 'x    (let ((a (make-array 6 :initial-element 'x
124                         :fill-pointer 3)))                         :fill-pointer 3)))
125      (map-into a #'identity '(1 2 3 4 5))      (map-into a #'identity '(1 2 3 4 5))
126      a)      (and (eqlt (fill-pointer a) 5)
127             a))
128    #(1 2 3 4 5))    #(1 2 3 4 5))
129    
130  (deftest map-into-array.10  (deftest map-into-array.10
131    (let ((a (make-array 6 :initial-element 'x    (let ((a (make-array 6 :initial-element 'x
132                         :fill-pointer 3)))                         :fill-pointer 3)))
133      (map-into a #'(lambda () 'y))      (map-into a #'(lambda () 'y))
134      a)      (and (eqlt (fill-pointer a) 6)
135             a))
136    #(y y y y y y))    #(y y y y y y))
137    
138  ;;; mapping into strings  ;;; mapping into strings
# Line 156  Line 158 
158    t    t
159    "1234")    "1234")
160    
161    (deftest map-into-string.4
162      (let ((a (make-array 6 :initial-element #\x
163                           :element-type 'character
164                           :fill-pointer 3)))
165        (map-into a #'identity "abcde")
166        (values
167         (fill-pointer a)
168         (aref a 5)
169         a))
170      5
171      #\x
172      "abcde")
173    
174    (deftest map-into-string.5
175      (let ((a (make-array 6 :initial-element #\x
176                           :element-type 'character
177                           :fill-pointer 3)))
178        (map-into a #'(lambda () #\y))
179        (values (fill-pointer a)
180                a))
181      6
182      "yyyyyy")
183    
184    (deftest map-into-string.6
185      (let ((a (make-array 6 :initial-element #\x
186                           :element-type 'character)))
187        (map-into a #'(lambda () #\y))
188        a)
189      "yyyyyy")
190    
191    (deftest map-into-string.7
192      (let ((a (make-array 6 :initial-element #\x
193                           :element-type 'base-char
194                           :fill-pointer 3)))
195        (map-into a #'identity "abcde")
196        (values (fill-pointer a)
197                (aref a 5)
198                a))
199      5
200      #\x
201      "abcde")
202    
203    (deftest map-into-string.8
204      (let ((a (make-array 6 :initial-element #\x
205                           :element-type 'base-char
206                           :fill-pointer 3)))
207        (map-into a #'(lambda () #\y))
208        (values (fill-pointer a)
209                a))
210      6
211      "yyyyyy")
212    
213    (deftest map-into-string.9
214      (let ((a (make-array 6 :initial-element #\x
215                           :element-type 'base-char)))
216        (map-into a #'(lambda () #\y))
217        a)
218      "yyyyyy")
219    
220  (deftest map-into-error.1  (deftest map-into-error.1
221    (classify-error (map-into 'a #'(lambda () nil)))    (classify-error (map-into 'a #'(lambda () nil)))
222    type-error)    type-error)
# Line 167  Line 228 
228  (deftest map-into-error.3  (deftest map-into-error.3
229    (classify-error (map-into (copy-seq '(a b c)) #'cons '(d e f) 100))    (classify-error (map-into (copy-seq '(a b c)) #'cons '(d e f) 100))
230    type-error)    type-error)
231    

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

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