From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?UTF-8?Q?Przemys=c5=82aw_Wojnowski?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] CONTRIBUTE - writing tests for understanding internals Date: Thu, 12 Nov 2015 22:42:43 +0100 Message-ID: <564507D3.7080302@cumego.com> References: <87twotqxme.fsf@cumego.com> <83a8qlky1c.fsf@gnu.org> <874mgtgess.fsf@cumego.com> <834mgslf34.fsf@gnu.org> <56443CDF.8030802@online.de> <8337wbjisw.fsf@gnu.org> <86h9krc7e0.fsf@stephe-leake.org> <5644F951.6010700@online.de> <83tworgcoz.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1447364601 25203 80.91.229.3 (12 Nov 2015 21:43:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Nov 2015 21:43:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Nov 12 22:43:15 2015 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 1ZwzeA-0006qQ-L1 for ged-emacs-devel@m.gmane.org; Thu, 12 Nov 2015 22:43:10 +0100 Original-Received: from localhost ([::1]:49908 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwzeA-00034F-1h for ged-emacs-devel@m.gmane.org; Thu, 12 Nov 2015 16:43:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwzdv-000335-0f for emacs-devel@gnu.org; Thu, 12 Nov 2015 16:42:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zwzdr-0004yK-1v for emacs-devel@gnu.org; Thu, 12 Nov 2015 16:42:54 -0500 Original-Received: from smtp23.iq.pl ([86.111.242.228]:60823) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zwzdq-0004x8-OY for emacs-devel@gnu.org; Thu, 12 Nov 2015 16:42:50 -0500 Original-Received: (qmail 11177 invoked from network); 12 Nov 2015 21:42:44 -0000 Original-Received: from unknown (HELO [192.168.0.101]) (esperanto@cumego.com@[46.186.59.37]) (envelope-sender ) by smtp22.iq.pl with AES128-SHA encrypted SMTP for ; 12 Nov 2015 21:42:44 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <83tworgcoz.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 86.111.242.228 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:194289 Archived-At: W dniu 12.11.2015 o 21:55, Eli Zaretskii pisze: > In TDD, they teach you to write a test for a spec that isn't > implemented yet. The test fails, of course (which is a Good Thing: > now you know that your test indeed will catch a non-compliant > implementation), and then you implement the spec to see that it now > succeeds. If you work that way, tests _do_ drive the development. What do you mean by "spec" here? I've never seen nor used TDD (and I use it very often) with "spec". What I've seen, though, was using TDD to implement User Stories (Use Cases), which are descriptions of functionality, but far from formal specifications - if this is what you mean. Anyway, TDD drives design (you implement only as much as is needed to make the tests pass) and, by side effect, gives strong regression test suite, which _enables_ refactoring. Many TDD practitioners say that its result is good API.