all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Leake <stephen_leake@stephe-leake.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Andreas Röhler" <andreas.roehler@online.de>, emacs-devel@gnu.org
Subject: Re: [PATCH] CONTRIBUTE - writing tests for understanding internals
Date: Thu, 12 Nov 2015 14:03:35 -0600	[thread overview]
Message-ID: <86h9krc7e0.fsf@stephe-leake.org> (raw)
In-Reply-To: <8337wbjisw.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 12 Nov 2015 18:15:11 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Thu, 12 Nov 2015 08:16:47 +0100
>> From: Andreas Röhler <andreas.roehler@online.de>
>> CC: Eli Zaretskii <eliz@gnu.org>
>> 
>>   On 11.11.2015 16:40, Eli Zaretskii wrote:
>> > [ ... ]
>> > written by someone who is not the implementor.  I'm sure you are
>> > familiar with the TDD methodology, whose strong point is precisely
>> > that you write tests before implementing anything.
>> 
>> Hmm, looks for me like TDD established a kind of religion too.
>> How to write tests without knowing the types?
>
> The API should be defined when you write the tests, but the
> implementation doesn't yet exist.

I use this style of development myself.

In reality, after you get started, the tests evolve along with the code.
But for every change, you change the tests first.

Often, after a change is implemented, it affects other tests that you
did not change. Then you have to decide whether that is ok, and fix the
tests to match, or if the code needs to be changed more to preserve the
previous behavior.

I have lots of commits of tests in my NASA code that say "match code
change".

-- 
-- Stephe



  reply	other threads:[~2015-11-12 20:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 22:48 [PATCH] CONTRIBUTE - writing tests for understanding internals Przemysław Wojnowski
2015-11-10 22:58 ` John Wiegley
2015-11-11  3:36 ` Eli Zaretskii
2015-11-11  7:45   ` Przemysław Wojnowski
2015-11-11  8:26     ` Andreas Röhler
2015-11-11 15:40       ` Eli Zaretskii
2015-11-11 15:40     ` Eli Zaretskii
2015-11-11 21:08       ` Przemysław Wojnowski
2015-11-11 21:26         ` Eli Zaretskii
2015-11-11 21:36           ` John Wiegley
2015-11-12  3:40             ` Eli Zaretskii
2015-11-11 21:48           ` Przemysław Wojnowski
2015-11-12  7:16       ` Andreas Röhler
2015-11-12 16:15         ` Eli Zaretskii
2015-11-12 20:03           ` Stephen Leake [this message]
2015-11-12 20:40             ` Andreas Röhler
2015-11-12 20:55               ` Eli Zaretskii
2015-11-12 21:42                 ` Przemysław Wojnowski
2015-11-13  7:33                   ` Eli Zaretskii
2015-11-13  8:03                     ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86h9krc7e0.fsf@stephe-leake.org \
    --to=stephen_leake@stephe-leake.org \
    --cc=andreas.roehler@online.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.