emacs-devel
[Top][All Lists]
Advanced

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

Re: call for more ert tests


From: Juanma Barranquero
Subject: Re: call for more ert tests
Date: Tue, 25 Jun 2013 14:11:13 +0200

On Tue, Jun 25, 2013 at 1:06 PM, Lars Magne Ingebrigtsen <address@hidden> wrote:

> I think the bar to contributing to Emacs is high enough as it is without
> adding further requirements.

Agreed.

> ert is fine, but, I think, somewhat misguided.  It allows us to test the
> functions we have Lisp interfaces for, but not the deep internal C
> bits.  And that's kinda backward.

Tests for C internals would be nice, yes.

> When I write Lisp code, I'm testing it interactively all the time.  What
> should this function return?  Does it return what I'm expecting?  No?
> *hack hack*  Now?  Yes.  Done.

Tests as specifications are great, but they do not cease to be useful
once the code is ready. Regression tests exist because it is easy to
break unexpected things with apparently unrelated changes. Nobody can
test every possible outcome by hand. So if you spend the time writing
the test, someone will likely benefit from it in the long run.

> If I could have called that function from Lisp directly, I would have
> tested a much larger variety of combinations than I ended up doing.

You could have written a Lisp API for it. Even if you #ifdef 0
afterwards, it wouldn't be time wasted IMHO.

> So my feeling about adding more ert tests is: Meh.  More work to write,
> more work to maintain, doesn't really give us that much.

With this I disagree.

   J



reply via email to

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