1 ;;;; miscellaneous non-side-effectful tests of the MOP
3 ;;;; This software is part of the SBCL system. See the README file for
6 ;;;; While most of SBCL is derived from the CMU CL system, the test
7 ;;;; files (like this one) were written from scratch after the fork
10 ;;;; This software is in the public domain and is provided with
11 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
12 ;;;; more information.
14 ;;;; Note that the MOP is not in an entirely supported state.
15 ;;;; However, this seems a good a way as any of ensuring that we have
18 (assert (subtypep 'sb-mop
:funcallable-standard-object
'standard-object
))
20 (assert (find (find-class 'sb-mop
:funcallable-standard-object
)
21 (sb-mop:class-direct-subclasses
(find-class 'standard-object
))))
23 (assert (find (find-class 'standard-object
)
24 (sb-mop:class-direct-superclasses
25 (find-class 'sb-mop
:funcallable-standard-object
))))
27 (dolist (name '(sb-mop:generic-function
28 sb-mop
:method sb-mop
:method-combination
29 sb-mop
:slot-definition sb-mop
:specializer
))
30 (assert (find (find-class 'sb-mop
:metaobject
)
31 (sb-mop:class-direct-superclasses
(find-class name
))))
32 (assert (subtypep name
'sb-mop
:metaobject
)))