Apply "search for cp" patch by Hraban Luyat
[sbcl.git] / tests / mop-7.impure-cload.lisp
blob18dcbe39fdcef43578350ec7843c3d258b269ad6
1 ;;;; miscellaneous side-effectful tests of the MOP
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.
14 ;;; This file contains the simplest test that the multiple subclasses
15 ;;; of generic function metacircle is gone.
17 (defclass g1 (standard-generic-function)
19 (:metaclass sb-mop:funcallable-standard-class))
20 (defclass g2 (standard-generic-function)
22 (:metaclass sb-mop:funcallable-standard-class))
24 (defgeneric f1 ()
25 (:generic-function-class g1))
26 (defgeneric f2 ()
27 (:generic-function-class g2))
29 (with-test (:name :mop-7)
30 (assert (plusp (length (with-output-to-string (stream)
31 (print #'f1 stream)))))
32 (assert (plusp (length (with-output-to-string (stream)
33 (print #'f2 stream))))))