0.8.13.15: Oh Bother, Where Art Thou?
[sbcl.git] / contrib / sb-introspect / test-driver.lisp
1 (defpackage :sb-introspect-test
2   (:use "SB-INTROSPECT" "CL"))
3 (load (compile-file (merge-pathnames "test.lisp" *load-pathname*)))
4
5 (assert (equal (function-arglist 'cl-user::one)
6                '(cl-user::a cl-user::b cl-user::c)))
7 (assert (equal (function-arglist 'the)
8                '(type sb-c::value)))
9
10 (defun matchp (object form-number)
11   (let ((ds (sb-introspect:find-definition-source object)))
12     (and (pathnamep (sb-introspect:definition-source-pathname ds))
13          (= form-number (sb-introspect:definition-source-form-number ds)))))
14
15 (assert (matchp 'cl-user::one 2))
16 (assert (matchp #'cl-user::one 2))
17 ; (assert (matchp 'two 2)) ; defgenerics don't work yet
18 (assert (matchp (car (sb-pcl:generic-function-methods #'cl-user::two)) 4))