Commit 0b874fd3 authored by pfdietz's avatar pfdietz

Added tests for NO-NEXT-METHOD. Removed a test for no-applicable-method since...

Added tests for NO-NEXT-METHOD.  Removed a test for no-applicable-method since users are not supposed to directly call this function.
parent bdd481ab
......@@ -22,3 +22,4 @@
(load "slot-value.lsp")
(load "method-qualifiers.lsp")
(load "no-applicable-method.lsp")
(load "no-next-method.lsp")
......@@ -5,10 +5,6 @@
(in-package :cl-test)
(deftest no-applicable-method.error.1
(classify-error (no-applicable-method))
program-error)
(defgeneric no-app-meth-gf-01 (x))
(deftest no-applicable-method.2
......@@ -48,3 +44,14 @@
(deftest no-applicable-method.6
(no-app-meth-gf-03 100000000000000000)
:good)
(defparameter *no-app-meth-gf-04*
(defgeneric no-app-meth-gf-04 (x)))
(defmethod no-applicable-method ((x (eql *no-app-meth-gf-04*)) &rest args)
(and (eql x *no-app-meth-gf-04*)
(copy-list args)))
(deftest no-applicable-method.7
(no-app-meth-gf-04 'a 'b 'c 'd)
(a b c d))
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun May 11 14:41:50 2003
;;;; Contains: Tests of NO-NEXT-METHOD
(in-package :cl-test)
(defgeneric no-next-meth-gf-01 (x))
(defmethod no-next-meth-gf-01 ((x integer))
(call-next-method))
(defmethod no-next-meth-gf-01 :around ((x character))
(call-next-method))
(deftest no-next-method.1
(handler-case (progn (no-next-meth-gf-01 10) :bad)
(error () :good))
:good)
(deftest no-next-method.2
(handler-case (progn (no-next-meth-gf-01 ) :bad)
(error () :good))
:good)
(defparameter *no-next-meth-gf-02*
(defgeneric no-next-meth-gf-02 (x)))
(defmethod no-next-meth-gf-02 ((x integer))
(call-next-method))
(defmethod no-next-meth-gf-02 :around ((x character))
(call-next-method))
(defmethod no-next-method ((gf (eql *no-next-meth-gf-02*))
(method standard-method)
&rest args)
(values args :aborted))
(deftest no-next-method.3
(no-next-meth-gf-02 10)
(10) :aborted)
(deftest no-next-method.4
(no-next-meth-gf-02 #\a)
(#\a) :aborted)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment