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
18 tmpfilename="$TEST_FILESTEM.lisp"
20 # This should fail, but didn't until sbcl-0.6.12.7, with Martin
21 # Atzmueller's port of Pierre Mai's fixes.
22 cat > $tmpfilename <<EOF
24 ;; This definition has too many qualifiers, so loading the
25 ;; DEFMETHOD should fail.
26 (defmethod zut progn :around ((x integer)) (print "integer"))
29 expect_load_error $tmpfilename
31 # Even before sbcl-0.6.12.7, this would fail as it should. Let's
32 # make sure that it still does.
33 cat > $tmpfilename <<EOF
35 (defgeneric zut (x) (:method-combination progn))
36 ;; This definition is missing the PROGN qualifier, and so the
37 ;; DEFMETHOD should fail.
38 (defmethod zut ((x integer)) (print "integer"))
41 expect_load_error $tmpfilename
43 # Even before sbcl-0.6.12.7, this would fail as it should, but Martin
44 # Atzmueller's port of Pierre Mai's fixes caused it to generate more
45 # correct text in the error message. We can't check that in a regression
46 # test until AI gets a mite stronger, but at least we can check that
47 # the problem is still detected.
48 cat > $tmpfilename <<EOF
50 (defgeneric zut (x) (:method-combination progn))
51 ;; This definition has too many qualifiers, so loading the
52 ;; DEFMETHOD should fail.
53 (defmethod zut progn :around ((x integer)) (print "integer"))
56 expect_load_error $tmpfilename
58 # Until sbcl-0.7.6.21, PCL signalled spurious STYLE-WARNINGs on
59 # compilation of this form; the report (bug #191a.) and a patch
60 # suppressing these were provided by Alexey Dejenka in quick
62 cat > $tmpfilename <<EOF
64 (defclass another-class-with-slots ()
67 (values (setf (slot-value x 'a-new-slot-name) 2)
68 (slot-value x 'a-new-slot-name)))
70 expect_clean_compile $tmpfilename