[lift-devel] Dynamic Variables?
Gary King
gwking at metabang.com
Sat Aug 16 22:33:37 UTC 2008
Hi Vyacheslav,
You're not doing anything wrong; you are doing something I didn't
anticipate!
LIFT assumes that all the variables listed in the :dynamic-variables
clause will have been previously defined via defvar or defparameter.
Adding
(defvar *foo*)
will make things work the way you expect. I'm not sure whether to
think of this as a bug or a feature. What do you think?
On Aug 15, 2008, at 6:02 PM, Vyacheslav Akhmechet wrote:
> Hello,
>
> I have the latest asdf-installable version of Lift. I am trying the
> following example:
>
> (deftestsuite my-test-suite ()
> ()
> (:dynamic-variables
> (*foo* t)))
>
> (defun foo ()
> (declare (special *foo*))
> *foo*)
>
> (addtest (my-test-suite)
> some-test
> (ensure-same (foo) t))
>
> When I run the test with (describe (run-test)) I get the following
> result:
>
> Test Report for MY-TEST-SUITE: 1 test run, 1 Error.
>
> ERROR : my-test-suite : some-test
> Condition: The variable *FOO* is unbound.
> Code : "
> ((ENSURE-SAME (FOO) T))"
>
> Test Report for MY-TEST-SUITE: 1 test run, 1 Error.; No value
>
> Why is *foo* unbound? Am I doing something wrong?
> _______________________________________________
> lift-devel mailing list
> lift-devel at common-lisp.net
> http://common-lisp.net/cgi-bin/mailman/listinfo/lift-devel
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM
More information about the lift-devel
mailing list