/[gcl]/gcl/ansi-tests/position-if.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/position-if.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, Tue Nov 5 13:51:27 2002 UTC
# Line 207  Line 207 
207     (7 7)     (7 7)
208     (nil)))     (nil)))
209    
210    (deftest position-if-vector.11
211      (let ((a (make-array '(10) :initial-contents '(1 3 1 4 3 1 2 1 8 9)
212                           :fill-pointer 5)))
213        (flet ((%f (x) (eql x 1)))
214          (values (position-if #'%f a)
215                  (position-if #'%f a :from-end t))))
216      0 2)        
217    
218  ;;; Bit vector tests  ;;; Bit vector tests
219    
220  (deftest position-if-bit-vector.1  (deftest position-if-bit-vector.1
# Line 309  Line 317 
317     (7 7)     (7 7)
318     (nil)))     (nil)))
319    
320    (deftest position-if-bit-vector.13
321      (let ((a (make-array '(10) :initial-contents '(1 1 1 1 1 0 0 0 0 0)
322                           :fill-pointer 5
323                           :element-type 'bit)))
324        (values (position-if #'evenp a)
325                (position-if #'evenp a :from-end 'foo)
326                (position-if #'oddp a)
327                (position-if #'oddp a :from-end 'foo)))
328      nil nil 0 4)
329    
330  ;;; string tests  ;;; string tests
331    
332  (deftest position-if-string.1  (deftest position-if-string.1
# Line 411  Line 429 
429     (7 7)     (7 7)
430     (nil)))     (nil)))
431    
432    (deftest position-if-string.13
433      (flet ((%f (c) (eql c #\0))
434             (%g (c) (eql c #\1)))
435        (let ((a (make-array '(10) :initial-contents
436                             (coerce "1111100000" 'list())
437                           :fill-pointer 5
438                           :element-type 'character)))
439        (values (position-if #'%f a)
440                (position-if #'%f a :from-end 'foo)
441                (position-if #'%g a)
442                (position-if #'%g a :from-end 'foo))))
443      nil nil 0 4)
444    
445  ;;; Error tests  ;;; Error tests
446    
447  (deftest position-if-error.1  (deftest position-if-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