Changeset 11140 for trunk/tests


Ignore:
Timestamp:
Oct 17, 2008, 5:38:07 PM (11 years ago)
Author:
gz
Message:

Add regression test for bug #254

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/ansi-tests/ccl.lsp

    r11105 r11140  
    456456  :no-error)
    457457
     458
     459(deftest ccl.bug#254
     460  (let ((warnings nil)
     461        (test "
     462(define-method-combination ccl.bug#254 ()
     463         ((around (:around))
     464          (before (:before))
     465          (primary () :required t)
     466          (after (:after)))
     467   (:arguments &optional args)
     468
     469   (flet ((call-methods (methods)
     470            (mapcar #'(lambda (method)
     471                        `(call-method ,method))
     472                    methods)))
     473     (let ((form (if (or before after (rest primary))
     474                     `(multiple-value-prog1
     475                        (progn ,@(call-methods before)
     476                               (call-method ,(first primary)
     477                                            ,(rest primary)))
     478                        ,@(call-methods (reverse after)))
     479                     `(call-method ,(first primary)))))
     480        `(progn (print ,args)
     481       ,(if around
     482           `(call-method ,(first around)
     483                         (,@(rest around)
     484                          (make-method ,form)))
     485           form)))))
     486"))
     487    (handler-bind ((warning (lambda (c)
     488                              (push c warnings)
     489                              (muffle-warning c))))
     490      (test-compile (test-source-file test)))
     491    warnings)
     492  ())
    458493
    459494(defun test-dup-warnings (test1 &optional test2)
Note: See TracChangeset for help on using the changeset viewer.