[ansi-test-devel] Wrong test?

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Mon Dec 26 16:36:04 UTC 2011


On Mon, Dec 26, 2011 at 5:29 PM, Ville Voutilainen <
ville.voutilainen at gmail.com> wrote:

> On 26 December 2011 17:26, Juan Jose Garcia-Ripoll
> <juanjose.garciaripoll at googlemail.com> wrote:
> > (MACROLET ((%M (Z)
> >                    Z))
> >         (CTYPECASE (EXPAND-IN-CURRENT-ENV (%M :FOO))
> >           (INTEGER :BAD1)
> >           (KEYWORD :GOOD)
> >           (SYMBOL :BAD2)))
> > What is this supposed to check? In ECL this leads to the following code
> > (CTYPECASE :FOO
> >           (INTEGER :BAD1)
> >           (KEYWORD :GOOD)
> >           (SYMBOL :BAD2)))
>
> I'm no expert, but this looks like it checks that a macrolet-ted
> identity macro doesn't
> change the identity of its argument, when expanded with the current
> environment.
>

The test is named CTYPECASE.14 in the test suite, so I doubt that it is
actually checking MACROLET, but rather how CTYPECASE treats the evaluated
form, and which is the active environment in which it is evaluated.
Otherwise the test could have been simply a TYPECASE with an otherwise
clause.

Juajo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ansi-test-devel/attachments/20111226/7b3922e1/attachment.html>


More information about the ansi-test-devel mailing list