X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ftype.impure.lisp;h=be9e55b3da9df35bf7ed323eae98d5f968e664ba;hb=607f3e366b0e5b5fb4606202a6a5f625c05c3838;hp=0b7bb17d22bc970ad3f800a6490d66096c3b119f;hpb=175c318c892b0627b36fa3c4db66f59680242204;p=sbcl.git diff --git a/tests/type.impure.lisp b/tests/type.impure.lisp index 0b7bb17..be9e55b 100644 --- a/tests/type.impure.lisp +++ b/tests/type.impure.lisp @@ -11,6 +11,7 @@ (load "assertoid.lisp") (use-package "ASSERTOID") +(use-package "TEST-UTIL") (defmacro assert-nil-nil (expr) `(assert (equal '(nil nil) (multiple-value-list ,expr)))) @@ -353,7 +354,6 @@ (mapcar #'find-class '(simple-condition condition sb-pcl::slot-object - sb-kernel:instance t)))) ;; stream classes @@ -371,18 +371,15 @@ 'fundamental-stream)) (mapcar #'find-class '(fundamental-stream standard-object - sb-pcl::std-object sb-pcl::slot-object stream - sb-kernel:instance t)))) (assert (equal (sb-pcl:class-precedence-list (find-class 'fundamental-stream)) (mapcar #'find-class '(fundamental-stream standard-object - sb-pcl::std-object sb-pcl::slot-object stream - sb-kernel:instance t)))) + t)))) (assert (subtypep (find-class 'stream) (find-class t))) (assert (subtypep (find-class 'fundamental-stream) 'stream)) (assert (not (subtypep 'stream 'fundamental-stream))))) @@ -429,4 +426,23 @@ (assert-t-t (subtypep `(not ,t2) `(not ,t1))) (assert-nil-t (subtypep `(not ,t1) `(not ,t2)))) +;;; not easily visible to user code, but this used to be very +;;; confusing. +(with-test (:name (:ctor :typep-function)) + (assert (eval '(typep (sb-pcl::ensure-ctor + (list 'sb-pcl::ctor (gensym)) nil nil) + 'function)))) +(with-test (:name (:ctor :functionp)) + (assert (functionp (sb-pcl::ensure-ctor + (list 'sb-pcl::ctor (gensym)) nil nil)))) + +;;; from PFD ansi-tests +(let ((t1 '(cons (cons (cons (real -744833699 -744833699) cons) + (integer -234496 215373)) + integer)) + (t2 '(cons (cons (cons integer integer) + (integer -234496 215373)) + t))) + (assert (null (values (subtypep `(not ,t2) `(not ,t1)))))) + ;;; success