X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Finfo.impure.lisp;h=113428a50bf9daf7994961ebd39b9de0bb61ee7c;hb=HEAD;hp=ffb3a06cce7a6d0afc73fa89db09497186f2a4c4;hpb=be9eb6c67b5f43a095c3de17bea945c309d662e4;p=sbcl.git diff --git a/tests/info.impure.lisp b/tests/info.impure.lisp index ffb3a06..113428a 100644 --- a/tests/info.impure.lisp +++ b/tests/info.impure.lisp @@ -13,7 +13,7 @@ ;;;; While most of SBCL is derived from the CMU CL system, the test ;;;; files (like this one) were written from scratch after the fork ;;;; from CMU CL. -;;;; +;;;; ;;;; This software is in the public domain and is provided with ;;;; absolutely no warranty. See the COPYING and CREDITS files for ;;;; more information. @@ -37,12 +37,25 @@ ;;; the DEFUN is just LOADed instead of COMPILE-FILEd, and it's ;;; not immediately obvious what's the best way to set up ;;; the COMPILE-FILE test. -#| +#|| (assert (equal (format nil "~A" (sb-int:info :function :type 'foo)) "#")) -|# +||# + +(with-test (:name :bug-458015) + ;; Make sure layouts have sane source-locations + (dolist (env sb-c::*info-environment*) + (sb-c::do-info (env :class class :type type :name info-name :value value) + (when (and (symbolp info-name) + (eql class :type) + (eql type :kind)) + (let* ((classoid (sb-kernel:find-classoid info-name nil)) + (layout (and classoid (sb-kernel:classoid-layout classoid))) + (srcloc (and layout (sb-kernel::layout-source-location layout)))) + (when (and layout) + (assert (or (sb-c::definition-source-location-p srcloc) + (null srcloc))))))))) ;;; success -(quit :unix-status 104)