Add patches from Aymeric Vincent to fix sb-posix on recentish NetBSD.
[sbcl.git] / contrib / sb-introspect / test-driver.lisp
index 0ce7187..276e471 100644 (file)
     (not (find-definition-sources-by-name 'fboundp :type))
   t)
 
+(deftest find-source-stuff.31
+    (matchp-name :function 'cl-user::compile-time-too-fun 28)
+  t)
+
+(deftest find-source-stuff.32
+    (matchp-name :function 'cl-user::loaded-as-source-fun 3)
+  t)
+
 ;;; Check wrt. interplay of generic functions and their methods.
 
 (defgeneric xuuq (gf.a gf.b          &rest gf.rest &key gf.k-X))
       (type-equal (function-type #'nullary)
                   '(function () (values null &optional))))
   t)
+
+;;; Defstruct accessor, copier, and predicate
+
+(deftest defstruct-fun-sources
+    (let ((copier (find-definition-source #'cl-user::copy-three))
+          (accessor (find-definition-source #'cl-user::three-four))
+          (predicate (find-definition-source #'cl-user::three-p)))
+      (values (and (equalp copier accessor)
+                   (equalp copier predicate))
+              (equal "test.lisp"
+                     (file-namestring (definition-source-pathname copier)))
+              (equal '(5)
+                     (definition-source-form-path copier))))
+ t
+ t
+ t)
+
+(deftest defstruct-fun-sources-by-name
+    (let ((copier (car (find-definition-sources-by-name 'cl-user::copy-three :function)))
+          (accessor (car (find-definition-sources-by-name 'cl-user::three-four :function)))
+          (predicate (car (find-definition-sources-by-name 'cl-user::three-p :function))))
+      (values (and (equalp copier accessor)
+                   (equalp copier predicate))
+              (equal "test.lisp"
+                     (file-namestring (definition-source-pathname copier)))
+              (equal '(5)
+                     (definition-source-form-path copier))))
+ t
+ t
+ t)