Don't define *PSEUDO-ATOMIC-BITS* in three different places
[sbcl.git] / tests / mop-11.impure-cload.lisp
blobf3900b06043290526d1ffaa1137552005f455b62
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 attempts to test possible metacircularity issues arising
15 ;;; from changing discriminating functions.
17 (defpackage "MOP-11"
18 (:use "CL" "SB-MOP"))
19 (in-package "MOP-11")
21 (defclass gf1-class (standard-generic-function) ()
22 (:metaclass funcallable-standard-class))
23 (defgeneric gf1 (x)
24 (:method ((x t)) x)
25 (:generic-function-class gf1-class))
26 (assert (= (gf1 3) 3))
28 (defclass gf2-class (standard-generic-function) ()
29 (:metaclass funcallable-standard-class))
30 (defgeneric gf2 (y)
31 (:method ((x number)) x)
32 (:generic-function-class gf2-class))
33 (assert (= (gf2 4) 4))
35 (defgeneric gf1a (x)
36 (:method ((x symbol)) (symbol-name x))
37 (:generic-function-class gf1-class))
38 (assert (string= (gf1a t) "T"))
40 (defclass gf3-class (standard-generic-function) ()
41 (:metaclass funcallable-standard-class))
42 (defgeneric gf3 (x y)
43 (:method ((x number) (y number)) (+ x y))
44 (:generic-function-class gf3-class))
45 (assert (= (gf3 1 2) 3))