* Re: [Emacs-diffs] master 8e84383: * lisp/subr.el (when): Use `macroexp-progn'
[not found] ` <E1ZtxcN-0000Qd-LD@vcs.savannah.gnu.org>
@ 2015-11-04 14:38 ` Juanma Barranquero
2015-11-04 15:56 ` Artur Malabarba
0 siblings, 1 reply; 3+ messages in thread
From: Juanma Barranquero @ 2015-11-04 14:38 UTC (permalink / raw)
To: Emacs developers, Artur Malabarba
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
On Wed, Nov 4, 2015 at 1:56 PM, Artur Malabarba <bruce.connor.am@gmail.com>
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?
[-- Attachment #2: Type: text/html, Size: 676 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] master 8e84383: * lisp/subr.el (when): Use `macroexp-progn'
2015-11-04 14:38 ` [Emacs-diffs] master 8e84383: * lisp/subr.el (when): Use `macroexp-progn' Juanma Barranquero
@ 2015-11-04 15:56 ` Artur Malabarba
2015-11-04 16:36 ` Juanma Barranquero
0 siblings, 1 reply; 3+ messages in thread
From: Artur Malabarba @ 2015-11-04 15:56 UTC (permalink / raw)
To: Juanma Barranquero; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 820 bytes --]
On 4 Nov 2015 2:38 pm, "Juanma Barranquero" <lekktu@gmail.com> wrote:
>
> On Wed, Nov 4, 2015 at 1:56 PM, Artur Malabarba <bruce.connor.am@gmail.com>
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.
[-- Attachment #2: Type: text/html, Size: 1144 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Emacs-diffs] master 8e84383: * lisp/subr.el (when): Use `macroexp-progn'
2015-11-04 15:56 ` Artur Malabarba
@ 2015-11-04 16:36 ` Juanma Barranquero
0 siblings, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2015-11-04 16:36 UTC (permalink / raw)
To: bruce.connor.am; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 297 bytes --]
On Wed, Nov 4, 2015 at 4:56 PM, Artur Malabarba <bruce.connor.am@gmail.com>
wrote:
> It tests that 1 is not the only value for which the macro works properly?
:-D
> My attitude with tests is that redundancy is approximately 100x better
than the risk of not testing something.
I tend to agree.
[-- Attachment #2: Type: text/html, Size: 475 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-11-04 16:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20151104125647.1613.37859@vcs.savannah.gnu.org>
[not found] ` <E1ZtxcN-0000Qd-LD@vcs.savannah.gnu.org>
2015-11-04 14:38 ` [Emacs-diffs] master 8e84383: * lisp/subr.el (when): Use `macroexp-progn' Juanma Barranquero
2015-11-04 15:56 ` Artur Malabarba
2015-11-04 16:36 ` Juanma Barranquero
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).