/[gcl]/gcl/ansi-tests/restart-case.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/restart-case.lsp

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

revision 1.1 by pfdietz, Sun Mar 23 04:46:24 2003 UTC revision 1.2 by pfdietz, Sun Mar 23 05:04:50 2003 UTC
# Line 186  Line 186 
186        (foo () 'good))))        (foo () 'good))))
187    good)    good)
188    
189    (deftest restart-case.26
190      (let ((c2 (make-condition 'error))
191            (c1 (make-condition 'error)))
192        (handler-bind
193         ((error #'(lambda (c) (invoke-restart (find-restart 'foo c)))))
194         (restart-case
195          (restart-case
196           (signal (progn (signal c2) c1))
197           (foo () 'bad))
198          (foo () 'good))))
199      good)
200    
201    (deftest restart-case.27
202      (let ((c2 (make-condition 'error)))
203        (handler-bind
204         ((error #'(lambda (c) (invoke-restart (find-restart 'foo c)))))
205         (restart-case
206          (restart-case
207           (cerror "Boo!" (signal c2))
208           (foo () 'bad))
209          (foo () 'good))))
210      good)
211    
212    (deftest restart-case.28
213      (let ((c2 (make-condition 'warning)))
214        (handler-bind
215         ((warning #'(lambda (c) (invoke-restart (find-restart 'foo c)))))
216         (restart-case
217          (restart-case
218           (warn "Boo!" (signal c2))
219           (foo () 'bad))
220          (foo () 'good))))
221      good)
222    
223    (deftest restart-case.29
224      (macrolet ((%m (&rest args) (cons 'error args)))
225        (let ((c2 (make-condition 'error)))
226          (handler-bind
227           ((error #'(lambda (c) (invoke-restart (find-restart 'foo c)))))
228           (restart-case
229            (restart-case
230             (%m "Boo!" (signal c2))
231             (foo () 'bad))
232            (foo () 'good)))))
233      good)
234    
235    (deftest restart-case.30
236      (symbol-macrolet ((%m (error "Boo!" (signal c2))))
237        (let ((c2 (make-condition 'error)))
238          (handler-bind
239           ((error #'(lambda (c) (invoke-restart (find-restart 'foo c)))))
240           (restart-case
241            (restart-case
242             %m
243             (foo () 'bad))
244            (foo () 'good)))))
245      good)
246    

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