Changeset 14051


Ignore:
Timestamp:
08/04/12 11:41:58 (8 years ago)
Author:
ehuelsmann
Message:

Write some of the DMC-TEST-ARGS-WITH-WHOLE as they were meant to
and add a number of DMC-TEST-ARGS-WITH-OPTIONAL to test more D-M-C
cases.

Note: abcl doesn't pass all of them at this time. Though work to
solve that is under way.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/test/lisp/abcl/clos-tests.lisp

    r14050 r14051  
    356356
    357357(deftest dmc-test-args-with-whole.3a
    358     T
     358    (dmc-test-args-with-whole.3a T)
    359359  T)
    360360
     
    371371
    372372(deftest dmc-test-args-with-whole.3b
    373     T
     373    (dmc-test-args-with-whole.3b T)
    374374  T)
    375375
     
    386386
    387387(deftest dmc-test-args-with-whole.3c
    388     T
     388    (dmc-test-args-with-whole.3c T)
    389389  T)
    390390
     
    402402
    403403(deftest dmc-test-args-with-whole.3d
    404     T
     404    (dmc-test-args-with-whole.3d T)
    405405  T)
    406406
     
    417417
    418418(deftest dmc-test-args-with-whole.4
    419     T
     419    (dmc-test-args-with-whole.4 T)
    420420  T)
    421421
     
    432432
    433433(deftest dmc-test-args-with-whole.5
    434     T
    435   T)
    436 
     434    (dmc-test-args-with-whole.5 T)
     435  T)
     436
     437(define-method-combination dmc-test-args-with-optional.1 ()
     438  ((methods ()))
     439  (:arguments &optional a)
     440  `(progn ,@(mapcar (lambda (method) `(call-method ,method))
     441                    methods)
     442          ,a))
     443
     444(defgeneric dmc-test-args-with-optional.1 (x &optional b)
     445  (:method-combination dmc-test-args-with-optional.1)
     446  (:method (x &optional b) (progn x b)))
     447
     448(deftest dmc-test-args-with-optional.1a
     449    (dmc-test-args-with-optional.1 T)
     450  nil)
     451
     452(deftest dmc-test-args-with-optional.1b
     453    (dmc-test-args-with-optional.1 T T)
     454  T)
     455
     456(define-method-combination dmc-test-args-with-optional.2 ()
     457  ((methods *))
     458  (:arguments &optional (a :default))
     459  (print `(progn ,@(mapcar (lambda (method) `(call-method ,method))
     460                           methods)
     461                 ,a)))
     462
     463(defgeneric dmc-test-args-with-optional.2 (x &optional b)
     464  (:method-combination dmc-test-args-with-optional.2)
     465  (:method (x &optional b) (progn x b)))
     466
     467(deftest dmc-test-args-with-optional.2a
     468    :documentation "TODO"
     469    (dmc-test-args-with-optional.2 T)
     470  :default)
     471
     472(deftest dmc-test-args-with-optional.2b
     473    :documentation "Describe what the test does here."
     474    (dmc-test-args-with-optional.2 T T)
     475  T)
     476
     477(define-method-combination dmc-test-args-with-optional.3 ()
     478  ((methods *))
     479  (:arguments &optional (a :default))
     480  (print `(progn ,@(mapcar (lambda (method) `(call-method ,method))
     481                           methods)
     482                 ,a)))
     483
     484(defgeneric dmc-test-args-with-optional.3 (x)
     485  (:method-combination dmc-test-args-with-optional.3)
     486  (:method (x) (progn x)))
     487
     488(deftest dmc-test-args-with-optional.3
     489    :documentation "TODO"
     490    (dmc-test-args-with-optional.3 T)
     491  nil)
     492
     493
     494(define-method-combination dmc-test-args-with-optional.4 ()
     495  ((methods ()))
     496  (:arguments &optional (a :default sup-p))
     497  `(progn ,@(mapcar (lambda (method) `(call-method ,method))
     498                    methods)
     499          (values ,a ,sup-p)))
     500
     501(defgeneric dmc-test-args-with-optional.4a (x &optional b)
     502  (:method-combination dmc-test-args-with-optional.4)
     503  (:method (x &optional b) (progn x b)))
     504
     505(deftest dmc-test-args-with-optional.4a
     506    (dmc-test-args-with-optional.4a T)
     507  :default
     508  nil)
     509
     510(deftest dmc-test-args-with-optional.4b
     511    (dmc-test-args-with-optional.4a T T)
     512  T
     513  T)
     514
     515(defgeneric dmc-test-args-with-optional.4c (x)
     516  (:method-combination dmc-test-args-with-optional.4)
     517  (:method (x) (progn x)))
     518
     519(deftest dmc-test-args-with-optional.4c
     520    :documentation "TODO"
     521    (dmc-test-args-with-optional.4c T)
     522  nil
     523  nil)
Note: See TracChangeset for help on using the changeset viewer.