source: trunk/source/tests/ansi-tests/no-next-method.lsp @ 8991

Last change on this file since 8991 was 8991, checked in by gz, 12 years ago

Check in the gcl ansi test suite (original, in preparation for making local changes)

File size: 1.1 KB
RevLine 
[8991]1;-*- Mode:     Lisp -*-
2;;;; Author:   Paul Dietz
3;;;; Created:  Sun May 11 14:41:50 2003
4;;;; Contains: Tests of NO-NEXT-METHOD
5
6(in-package :cl-test)
7
8(defgeneric no-next-meth-gf-01 (x))
9
10(defmethod no-next-meth-gf-01 ((x integer))
11  (call-next-method))
12
13(defmethod no-next-meth-gf-01 :around ((x character))
14  (call-next-method))
15
16(deftest no-next-method.1
17  (handler-case (progn (no-next-meth-gf-01 10) :bad)
18                (error () :good))
19  :good)
20
21(deftest no-next-method.2
22  (handler-case (progn (no-next-meth-gf-01 ) :bad)
23                (error () :good))
24  :good)
25
26;;; (defparameter *no-next-meth-gf-02*
27;;;   (defgeneric no-next-meth-gf-02 (x)))
28;;;
29;;; (defmethod no-next-meth-gf-02 ((x integer))
30;;;   (call-next-method))
31;;;
32;;; (defmethod no-next-meth-gf-02 :around ((x character))
33;;;   (call-next-method))
34;;;
35;;; (defmethod no-next-method ((gf (eql *no-next-meth-gf-02*))
36;;;                        (method standard-method)
37;;;                        &rest args)
38;;;   (values (copy-list args) :aborted))
39;;;
40;;; (deftest no-next-method.3
41;;;   (no-next-meth-gf-02 10)
42;;;   (10) :aborted)
43;;;
44;;; (deftest no-next-method.4
45;;;   (no-next-meth-gf-02 #\a)
46;;;   (#\a) :aborted)
Note: See TracBrowser for help on using the repository browser.