emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 8e84383: * lisp/subr.el (when): Use `macroexp-p


From: Artur Malabarba
Subject: Re: [Emacs-diffs] master 8e84383: * lisp/subr.el (when): Use `macroexp-progn'
Date: Wed, 4 Nov 2015 15:56:47 +0000


On 4 Nov 2015 2:38 pm, "Juanma Barranquero" <address@hidden> wrote:
>
> On Wed, Nov 4, 2015 at 1:56 PM, Artur Malabarba <address@hidden> wrote:
>
> > +  (should (equal (when t 1) 1))
> > +  (should (equal (when t 2) 2))
> > +  (should (equal (when nil 1) nil))
> > +  (should (equal (when nil 2) nil))
> > +  (should (equal (when t 'x 1) 1))
> > +  (should (equal (when t 'x 2) 2))
> > +  (should (equal (when nil 'x 1) nil))
> > +  (should (equal (when nil 'x 2) nil))
>
> Why pairs of tests? What does "(when t 2) 2)" test that "(when t 1) 1)" doesn't?

It tests that 1 is not the only value for which the macro works properly? 😀

I didn't think much about it, really. My attitude with tests is that redundancy is approximately 100x better than the risk of not testing something.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]