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

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

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

revision 1.2 by pfdietz, Thu Oct 17 13:16:56 2002 UTC revision 1.3 by pfdietz, Mon Nov 4 04:31:48 2002 UTC
# Line 260  Line 260 
260           :test #'(lambda (x y) t))           :test #'(lambda (x y) t))
261    5)    5)
262    
263    (deftest count-filled-vector.17
264      (count 1 (make-array 8 :initial-contents '(1 1 1 1 1 1 1 1)
265                           :fill-pointer 6))
266      6)
267    
268    (deftest count-filled-vector.18
269      (count 1 (make-array 8 :initial-contents '(1 1 1 1 1 1 1 1)
270                           :fill-pointer 6)
271             :start 2)
272      4)
273    (deftest count-filled-vector.19
274      (count 1 (make-array 8 :initial-contents '(1 1 1 1 1 1 1 1)
275                           :fill-pointer 6)
276             :from-end 'foo)
277      6)
278    
279    (deftest count-filled-vector.20
280      (count 1 (make-array 8 :initial-contents '(1 1 1 1 1 1 1 1)
281                           :fill-pointer 6)
282             :start 2 :from-end 'yes)
283      4)
284    
285    
286    
287  ;;; Tests on bit vectors  ;;; Tests on bit vectors
288    
289  (deftest count-bit-vector.1  (deftest count-bit-vector.1
# Line 332  Line 356 
356           :test #'(lambda (x y) t))           :test #'(lambda (x y) t))
357    5)    5)
358    
359    (deftest count-bit-vector.17
360      (count 1 (make-array 8 :initial-contents '(1 0 1 1 1 1 1 1)
361                           :element-type 'bit
362                           :fill-pointer 5))
363      4)
364    
365    (deftest count-bit-vector.18
366      (count 1 (make-array 8 :initial-contents '(1 0 1 1 1 1 1 1)
367                           :element-type 'bit
368                           :fill-pointer 5)
369             :start 1)
370      3)
371    
372    (deftest count-bit-vector.19
373      (count 1 (make-array 8 :initial-contents '(1 0 1 1 1 1 1 1)
374                           :element-type 'bit
375                           :fill-pointer 5)
376             :end nil)
377      4)
378    
379    
380    (deftest count-bit-vector.20
381      (count 1 (make-array 8 :initial-contents '(1 0 1 1 1 1 1 1)
382                           :element-type 'bit
383                           :fill-pointer 6)
384             :end 4)
385      3)
386    
387    
388  ;;; Tests on strings  ;;; Tests on strings
389    
390  (deftest count-string.1  (deftest count-string.1
# Line 406  Line 459 
459           :test #'(lambda (x y) t))           :test #'(lambda (x y) t))
460    5)    5)
461    
462    (deftest count-string.17
463      (count #\a (make-array 10 :initial-contents (coerce "abaaacaaaa" 'list)
464                             :fill-pointer 7
465                             :element-type 'character))
466      5)
467    
468    (deftest count-string.18
469      (count #\a (make-array 10 :initial-contents (coerce "abaaacaaaa" 'list)
470                             :fill-pointer 7
471                             :element-type 'character)
472             :start 1)
473      4)
474    
475    (deftest count-string.19
476      (count #\a (make-array 10 :initial-contents (coerce "abaaacaaaa" 'list)
477                             :fill-pointer 7
478                             :element-type 'character)
479             :end nil)
480      5)
481    
482    (deftest count-string.20
483      (count #\a (make-array 10 :initial-contents (coerce "abaaacaaaa" 'list)
484                             :fill-pointer 7
485                             :element-type 'character)
486             :start 2 :end 5)
487      3)
488    
489  ;;; Error tests  ;;; Error tests
490    
491  (deftest count-error.1  (deftest count-error.1

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