Changeset 9670 for trunk/tests


Ignore:
Timestamp:
Jun 4, 2008, 1:02:52 PM (11 years ago)
Author:
gz
Message:

Regression test for eql method hack problem. Also fix typo 350->305

File:
1 edited

Legend:

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

    r9645 r9670  
    223223
    224224
    225 (deftest ccl.bug#350
     225(deftest ccl.bug#305
    226226    (let* ((file (test-source-file "
    227227  (in-package :cl-test)
    228   (defclass ccl.bug#350-inner () ((ccl.bug#350-inner-slot :accessor ccl.bug#350-inner-slot)))
     228  (defclass ccl.bug#305-inner () ((ccl.bug#305-inner-slot :accessor ccl.bug#305-inner-slot)))
    229229  (macrolet ((generator ()
    230                `(defclass ccl.bug#350 (ccl.bug#350-inner)
     230               `(defclass ccl.bug#305 (ccl.bug#305-inner)
    231231                  ,(loop for i from 0 to 600
    232                          for slot = (intern (format nil \"CCL.BUG#350-SLOT-~~A\" i) :cl-user)
     232                         for slot = (intern (format nil \"CCL.BUG#305-SLOT-~~A\" i) :cl-user)
    233233                         collect `(,slot :initform ,i)))))
    234234    (generator))
    235   (defmethod initialize-instance :after ((x ccl.bug#350-inner) &key)
    236     (setf (ccl.bug#350-inner-slot x) 42))
    237   (defun ccl.bug#350-test () (make-instance 'ccl.bug#350))"))
     235  (defmethod initialize-instance :after ((x ccl.bug#305-inner) &key)
     236    (setf (ccl.bug#305-inner-slot x) 42))
     237  (defun ccl.bug#305-test () (make-instance 'ccl.bug#305))"))
    238238           (fasl (test-compile file)))
    239239      (load fasl :verbose nil)
    240       (ccl.bug#350-inner-slot (ccl.bug#350-test)))
     240      (ccl.bug#305-inner-slot (ccl.bug#305-test)))
    241241  42)
     242
     243(deftest ccl.42923
     244    (progn
     245      (fmakunbound 'ccl.42923)
     246      (defmethod ccl.42923 ((x (eql 'x)) &key y &allow-other-keys)
     247        (list x y) 'x)
     248      (defmethod ccl.42923 ((x (eql 'foo)) &key y &allow-other-keys)
     249        (list x y) 'foo)
     250      (defmethod ccl.42923 ((x (eql 'bar)) &key y z a b c)
     251        (list x y z (list a b c)) 'bar)
     252      (ccl::maybe-hack-eql-methods #'ccl.42923)
     253      (ccl:advise ccl.42923 'advise)
     254      (ccl.42923 'foo :y 1 :z 2 :a 1 :b 2 :c 3))
     255  foo)
Note: See TracChangeset for help on using the changeset viewer.