Commit b700de21 authored by pfdietz's avatar pfdietz
Browse files

Added tests for RETURN-FROM in DEFUN.

parent 94fee32e
......@@ -5,9 +5,6 @@
(in-package :cl-test)
;;; DEFUN is used extensively elsewhere, so I'm just putting error
;;; case tests here
(deftest defun.error.1
(classify-error (defun))
......@@ -17,3 +14,45 @@
(classify-error (defun ignored-defun-name))
;;; Tests for implicit blocks
(defun defun-test-fun-1 ()
(return-from defun-test-fun-1 'good))
(deftest defun.1
(defun defun-test-fun-2 ()
(return-from defun-test-fun-2 (values)))
(deftest defun.2
(defun defun-test-fun-3 ()
(return-from defun-test-fun-3 (values 'a 'b 'c 'd 'e 'f)))
(deftest defun.3
a b c d e f)
(defun defun-test-fun-4 (x)
(car x))
(eval-when (load eval compile)
(defun (setf defun-test-fun-4) (newval x)
(return-from defun-test-fun-4 (setf (car x) newval)))))
(deftest defun.4
(let ((x (list 'a 'b)))
(setf (defun-test-fun-4 x) 'c)
(c b))
Supports Markdown
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