From 4f176076873f68d8d47e31d274f7cd42619688c2 Mon Sep 17 00:00:00 2001
From: pfdietz <pfdietz@localhost>
Date: Tue, 17 Jun 2003 13:24:39 +0000
Subject: [PATCH] Enhanced the bad method qualifier tests to call the generic
 function, in case the error is signaled at effective method computation time.

---
 ansi-tests/define-method-combination.lsp | 51 +++++++++++++-----------
 1 file changed, 27 insertions(+), 24 deletions(-)

diff --git a/ansi-tests/define-method-combination.lsp b/ansi-tests/define-method-combination.lsp
index 102e086a..b045d0f8 100644
--- a/ansi-tests/define-method-combination.lsp
+++ b/ansi-tests/define-method-combination.lsp
@@ -66,36 +66,39 @@
 (defgeneric dmc-gf-03 (x) (:method-combination times))
 
 (deftest define-method-combination-03.1
-  (handler-case
-   (progn
-     (eval '(defmethod dmc-gf-03 ((x integer)) t))
-     :bad)
-   (error ()
-	  (dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 1)))
-	    (remove-method #'dmc-gf-03 meth))
-	  :good))
+  (prog1
+      (handler-case
+       (progn
+	 (eval '(defmethod dmc-gf-03 ((x integer)) t))
+	 (eval '(dmc-gf-03 1))
+	 :bad)
+       (error () :good))
+    (dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 1)))
+      (remove-method #'dmc-gf-03 meth)))
   :good)
 
 (deftest define-method-combination-03.2
-  (handler-case
-   (progn
-     (eval '(defmethod dmc-gf-03 :before ((x cons)) t))
-     :bad)
-   (error ()
-     (dolist (meth (compute-applicable-methods #'dmc-gf-03 (list '(a))))
-       (remove-method #'dmc-gf-03 meth))
-     :good))
+  (prog1
+      (handler-case
+       (progn
+	 (eval '(defmethod dmc-gf-03 :before ((x cons)) t))
+	 (eval '(dmc-gf-03 (cons 'a 'b)))
+	 :bad)
+       (error () :good))
+    (dolist (meth (compute-applicable-methods #'dmc-gf-03 (list '(a))))
+      (remove-method #'dmc-gf-03 meth)))
   :good)
 
 (deftest define-method-combination-03.3
-  (handler-case
-   (progn
-     (eval '(defmethod dmc-gf-03 :after ((x symbol)) t))
-     :bad)
-   (error ()
-     (dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 'a)))
-       (remove-method #'dmc-gf-03 meth))
-     :good))
+  (prog1
+      (handler-case
+       (progn
+	 (eval '(defmethod dmc-gf-03 :after ((x symbol)) t))
+	 (eval '(dmc-gf-03 'a))
+	 :bad)
+       (error () :good))
+    (dolist (meth (compute-applicable-methods #'dmc-gf-03 (list 'a)))
+      (remove-method #'dmc-gf-03 meth)))
   :good)
 
 (define-method-combination times2
-- 
GitLab