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

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

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

revision 1.1 by pfdietz, Tue Oct 22 05:37:24 2002 UTC revision 1.2 by pfdietz, Wed Oct 23 03:10:23 2002 UTC
# Line 48  Line 48 
48      (when (> i 10) (return i)))      (when (> i 10) (return i)))
49    11)    11)
50    
51    ;;; Zero iterations
52    (deftest do.6
53      (do ((i 0 (+ i 10)))
54          ((> i -1) i)
55        (return 'bad))
56      0)
57    
58    ;;; Tests of go tags
59    (deftest do.7
60      (let ((x nil))
61        (do ((i 0 (1+ i)))
62            ((>= i 10) x)
63          (go around)
64          small
65          (push 'a x)
66          (go done)
67          big
68          (push 'b x)
69          (go done)
70          around
71          (if (> i 4) (go big) (go small))
72          done))
73      (b b b b b a a a a a))
74    
75    ;;; No increment form
76    (deftest do.8
77      (do ((i 0 (1+ i))
78           (x nil))
79          ((>= i 10) x)
80        (push 'a x))
81      (a a a a a a a a a a))
82    
83    ;;; No do locals
84    (deftest do.9
85      (let ((i 0))
86        (do ()
87            ((>= i 10) i)
88          (incf i)))
89      10)
90    
91    
92      
93    
94    
95    

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

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