0.9.4.57:
[sbcl.git] / tests / mop.pure.lisp
1 ;;;; miscellaneous non-side-effectful tests of the MOP
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
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
8 ;;;; from CMU CL.
9 ;;;;
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.
13
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
16 ;;;; no regressions.
17
18 (assert (subtypep 'sb-mop:funcallable-standard-object 'standard-object))
19
20 (assert (find (find-class 'sb-mop:funcallable-standard-object)
21               (sb-mop:class-direct-subclasses (find-class 'standard-object))))
22
23 (assert (find (find-class 'standard-object)
24               (sb-mop:class-direct-superclasses
25                (find-class 'sb-mop:funcallable-standard-object))))
26
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)))