From 18e49d01c2cd5c254862946e8b5b77844107f867 Mon Sep 17 00:00:00 2001 From: Stelian Ionescu Date: Sun, 29 Jul 2012 17:38:51 +0200 Subject: [PATCH] Create named test lambdas LP #1024772 --- src/test.lisp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/test.lisp b/src/test.lisp index a8269c6..2712d6a 100644 --- a/src/test.lisp +++ b/src/test.lisp @@ -74,19 +74,23 @@ If PROFILE is T profiling information will be collected as well." (destructuring-bind (name &rest args) (ensure-list fixture) `((with-fixture ,name ,args ,@body))) - body))) + body)) + (lambda-name + (format-symbol t "%~A-~A" '#:test name)) + (inner-lambda-name + (format-symbol t "%~A-~A" '#:inner-test name))) `(progn (setf (get-test ',name) (make-instance 'test-case :name ',name :runtime-package (find-package ,(package-name *package*)) :test-lambda - (lambda () + (named-lambda ,lambda-name () ,@ (ecase compile-at (:run-time `((funcall (let ((*package* (find-package ',(package-name *package*)))) - (compile nil '(lambda () - ,@effective-body)))))) + (compile ',inner-lambda-name + '(lambda () ,@effective-body)))))) (:definition-time effective-body))) :description ,description :depends-on ',depends-on -- 1.7.10.4