From a4411d419d2faaa552e8844719fd15e61b6a622c Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Thu, 9 Jun 2005 13:37:01 +0000 Subject: [PATCH] More error tests associated with keyword parameters --- ansi-tests/defmethod.lsp | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/ansi-tests/defmethod.lsp b/ansi-tests/defmethod.lsp index 4971b6bc..d4d5e3c9 100644 --- a/ansi-tests/defmethod.lsp +++ b/ansi-tests/defmethod.lsp @@ -210,10 +210,21 @@ (eval `(signals-error (,sym 1 2) program-error)))) t t) +(deftest defmethod.error.14 + (let ((sym (gensym))) + (eval `(locally (declare (optimize safety)) (defmethod ,sym ((x t) &key) x))) + (values (eval `(signals-error (,sym) program-error)) + (eval `(signals-error (,sym 1 2) program-error)) + (eval `(signals-error (,sym 1 :bogus t) program-error)) + (eval `(signals-error (,sym 1 :allow-other-keys nil :allow-other-keys t :bogus t) program-error)))) + t t t t) - - - - +(deftest defmethod.error.15 + (let ((sym (gensym))) + (eval `(locally (declare (optimize safety)) (defmethod ,sym ((x t) &key y) x))) + (values (eval `(signals-error (,sym 1 :bogus t) program-error)) + (eval `(signals-error (,sym 1 :y) program-error)) + (eval `(signals-error (,sym 1 3 nil) program-error)))) + t t t) -- GitLab