/[gcl]/gcl/ansi-tests/structures-03.lsp
ViewVC logotype

Diff of /gcl/ansi-tests/structures-03.lsp

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

revision 1.5 by pfdietz, Fri Jan 10 04:07:00 2003 UTC revision 1.6 by pfdietz, Sat Jan 11 02:12:09 2003 UTC
# Line 157  Line 157 
157  ;;; Keyword arguments  ;;; Keyword arguments
158    
159  (defstruct* (sbt-08 (:constructor sbt-08-con  (defstruct* (sbt-08 (:constructor sbt-08-con
160                                   (&key ((foo a)))))                                   (&key ((:foo a)))))
161    a)    a)
162    
163  (deftest structure-boa-test-08/1  (deftest structure-boa-test-08/1
# Line 166  Line 166 
166    
167  (defstruct* (sbt-09 (:constructor sbt-09-con  (defstruct* (sbt-09 (:constructor sbt-09-con
168                                   (&key (a 'p a-p)                                   (&key (a 'p a-p)
169                                         ((x b) 'q)                                         ((:x b) 'q)
170                                         (c 'r)                                         (c 'r)
171                                         d                                         d
172                                         ((y e))                                         ((:y e))
173                                         ((z f) 's z-p)                                         ((:z f) 's z-p)
174                                         &aux (g (list (notnot a-p)                                         &aux (g (list (notnot a-p)
175                                                       (notnot z-p))))))                                                       (notnot z-p))))))
176    a b c d e f g)    a b c d e f g)
# Line 307  Line 307 
307    (sbt-slots 'sbt-14 (sbt-14-con :d 9) :a :b :c)    (sbt-slots 'sbt-14 (sbt-14-con :d 9) :a :b :c)
308    (1 2 3))    (1 2 3))
309    
310    ;;; Keywords are in the correct package, and slot names are not
311    ;;; keyword parameters if not specified.
312    
313    (defstruct* (sbt-15 (:constructor sbt-15-con
314                                      (&key ((:x a) nil)
315                                            ((y  b) nil)
316                                            (c nil))))
317      a b c)
318    
319    (deftest structure-boa-test-15/1
320      (sbt-slots 'sbt-15 (sbt-15-con :x 1 'y 2 :c 3) :a :b :c)
321      (1 2 3))
322    
323    (deftest structure-boa-test-15/2
324      (classify-error (sbt-15-con :a 1))
325      program-error)
326    
327    (deftest structure-boa-test-15/3
328      (classify-error (sbt-15-con :b 1))
329      program-error)
330    
331    (deftest structure-boa-test-15/4
332      (classify-error (sbt-15-con 'x 1))
333      program-error)
334    
335    (deftest structure-boa-test-15/5
336      (classify-error (sbt-15-con :y 1))
337      program-error)
338    
339    (deftest structure-boa-test-15/6
340      (classify-error (sbt-15-con 'c 1))
341      program-error)
342    
343    (deftest structure-boa-test-15/7
344      (classify-error (sbt-15-con 'a 1))
345      program-error)
346    
347    (deftest structure-boa-test-15/8
348      (classify-error (sbt-15-con 'b 1))
349      program-error)
350    
351    

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

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