From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: call for more ert tests Date: Tue, 25 Jun 2013 14:11:13 +0200 Message-ID: References: <838v1zjrnl.fsf@gnu.org> <8361x3jqsy.fsf@gnu.org> <8338s7jp53.fsf@gnu.org> <87bo6vb8uo.fsf@wanadoo.es> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1372162321 26709 80.91.229.3 (25 Jun 2013 12:12:01 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 12:12:01 +0000 (UTC) Cc: Emacs developers To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 25 14:12:02 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrS6M-0001HI-3a for ged-emacs-devel@m.gmane.org; Tue, 25 Jun 2013 14:12:02 +0200 Original-Received: from localhost ([::1]:48937 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrS6L-0003r0-Jm for ged-emacs-devel@m.gmane.org; Tue, 25 Jun 2013 08:12:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrS6H-0003qs-RG for emacs-devel@gnu.org; Tue, 25 Jun 2013 08:11:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrS6E-0005uH-JB for emacs-devel@gnu.org; Tue, 25 Jun 2013 08:11:57 -0400 Original-Received: from mail-ea0-x22b.google.com ([2a00:1450:4013:c01::22b]:42443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrS6E-0005u1-Cz for emacs-devel@gnu.org; Tue, 25 Jun 2013 08:11:54 -0400 Original-Received: by mail-ea0-f171.google.com with SMTP id m14so6803102eaj.30 for ; Tue, 25 Jun 2013 05:11:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ad72W52QwycMSb4iJnwbZAVqUBhAIa2DxrZ2WRW63gw=; b=aiiLvzrZSAZFy9CvAQgiIBIrB9Z2reUt/UXnkwZOGAtCAcn7lmBHgcLQ2uewnzPjBA a3q1Uk8YkbY5fk+YAYyetp5EHhIR4XyjL2pXHsasQWYMISTVz0TbZRHDQ1sBNig1jZ2Q K/Eme9IrLCFnwxuWUqqRY+sP9Ul0ZOkbKLyiZeBFykfsFVrudS5BHAwcRzdVsQhOBt9a 00HsBRj0r7aV7L2BL3CvF9OkI5dIM/GsexbL/4Py2ZAr8B4UJcEYYWvEHzG2+zVI1MW6 LzeJFbmxsWbkatPZMywXeRhmCdn07FvYRqeNJl4ocC30QEtuMd7s52UHlPN0blur84dK S6IA== X-Received: by 10.15.25.2 with SMTP id k2mr29012079eeu.99.1372162313708; Tue, 25 Jun 2013 05:11:53 -0700 (PDT) Original-Received: by 10.14.142.4 with HTTP; Tue, 25 Jun 2013 05:11:13 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::22b X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:161022 Archived-At: On Tue, Jun 25, 2013 at 1:06 PM, Lars Magne Ingebrigtsen 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