X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure-cload.lisp;h=d5d8c30798f992a7fad316b00c2063e9ade7bb20;hb=9c9d6dbdc28a8bfe70be09f35263e9ec02411d0e;hp=3a2e8af6a7bf272754aadcf5e19aaa1d70e4608a;hpb=175c318c892b0627b36fa3c4db66f59680242204;p=sbcl.git diff --git a/tests/clos.impure-cload.lisp b/tests/clos.impure-cload.lisp index 3a2e8af..d5d8c30 100644 --- a/tests/clos.impure-cload.lisp +++ b/tests/clos.impure-cload.lisp @@ -164,3 +164,23 @@ (make-instance 'class-with-symbol-initarg slot arg)) (assert (eql (slot-value (make-thing 1) 'slot) 1)) (assert (eql (slot-value (make-other-thing 'slot 2) 'slot) 2)) + +;;; test that ctors can be used with the literal class +(eval-when (:compile-toplevel) + (defclass ctor-literal-class () ()) + (defclass ctor-literal-class2 () ())) +(defun ctor-literal-class () + (make-instance #.(find-class 'ctor-literal-class))) +(defun ctor-literal-class2 () + (make-instance '#.(find-class 'ctor-literal-class2))) +(with-test (:name (:ctor :literal-class-unquoted)) + (assert (typep (ctor-literal-class) 'ctor-literal-class))) +(with-test (:name (:ctor :literal-class-quoted)) + (assert (typep (ctor-literal-class2) 'ctor-literal-class2))) + +;;; test that call-next-method and eval-when doesn't cause an +;;; undumpable method object to arise in the effective source code. +;;; (from Sascha Wilde sbcl-devel 2007-07-15) +(eval-when (:compile-toplevel :load-toplevel :execute) + (defmethod just-call-next-method (thing) + (call-next-method)))