X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Finterface.impure.lisp;fp=tests%2Finterface.impure.lisp;h=63e7c7a79e7a50b7bd6e00e4c7d4000380f8fca0;hb=a6c4b66e040824da2fc76e101f92940e8412c6d3;hp=da179ede3f0ee3c2e62c2b33dc50f1c09e7f0571;hpb=a189a69454ef7635149319ae213b337f17c50d20;p=sbcl.git diff --git a/tests/interface.impure.lisp b/tests/interface.impure.lisp index da179ed..63e7c7a 100644 --- a/tests/interface.impure.lisp +++ b/tests/interface.impure.lisp @@ -328,5 +328,18 @@ (declare (ignore x)) nil)))) +(with-test (:name (trace generic-function)) + (defgeneric traced-gf (x)) + (defmethod traced-gf (x) (1+ x)) + (assert (= (traced-gf 3) 4)) + (trace traced-gf) + (let ((output (with-output-to-string (*trace-output*) + (assert (= (traced-gf 3) 4))))) + (assert (> (length output) 0))) + (assert (typep #'traced-gf 'standard-generic-function)) + (untrace traced-gf) + (let ((output (with-output-to-string (*trace-output*) + (assert (= (traced-gf 3) 4))))) + (assert (= (length output) 0)))) ;;;; success