[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] CONTRIBUTE - writing tests for understanding internals
From: |
Stephen Leake |
Subject: |
Re: [PATCH] CONTRIBUTE - writing tests for understanding internals |
Date: |
Thu, 12 Nov 2015 14:03:35 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (windows-nt) |
Eli Zaretskii <address@hidden> writes:
>> Date: Thu, 12 Nov 2015 08:16:47 +0100
>> From: Andreas Röhler <address@hidden>
>> CC: Eli Zaretskii <address@hidden>
>>
>> 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
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, (continued)
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Eli Zaretskii, 2015/11/11
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Przemysław Wojnowski, 2015/11/11
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Eli Zaretskii, 2015/11/11
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, John Wiegley, 2015/11/11
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Eli Zaretskii, 2015/11/11
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Przemysław Wojnowski, 2015/11/11
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Andreas Röhler, 2015/11/12
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Eli Zaretskii, 2015/11/12
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals,
Stephen Leake <=
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Andreas Röhler, 2015/11/12
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Eli Zaretskii, 2015/11/12
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Przemysław Wojnowski, 2015/11/12
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Eli Zaretskii, 2015/11/13
- Re: [PATCH] CONTRIBUTE - writing tests for understanding internals, Andreas Röhler, 2015/11/13