Skip to content
Snippets Groups Projects
Commit 2b39eba6 authored by Raymond Toy's avatar Raymond Toy
Browse files

Correct the tests for the generic function lambda lists.

The check for invalid gf lambda lists happens during macroexpansion,
so update the tests to catch this during macroexpansion.

This fixes three of the issues in ticket:95.
parent 55d04a31
No related branches found
No related tags found
No related merge requests found
......@@ -32,13 +32,12 @@
(in-package "PCL-TESTS")
;; These errors are signaled during macroexpansion of the defgeneric
;; form so catch the errors during macroexpansion.
(defmacro define-gf-lambda-list-test (name lambda-list)
`(deftest ,name
(multiple-value-bind (r c)
(ignore-errors
(defgeneric g ,lambda-list))
(values (null r) (typep c 'error)))
t t))
`(define-test ,name
(assert-error 'program-error
(macroexpand '(defgeneric g ,lambda-list)))))
(define-gf-lambda-list-test defgeneric-lambda-list.0 (a &optional (b 1)))
(define-gf-lambda-list-test defgeneric-lambda-list.1 (a &key (b 1)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment