Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2002:
[Freeciv-Dev] Re: It is feature freeze time
Home

[Freeciv-Dev] Re: It is feature freeze time

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: It is feature freeze time
From: "Per I. Mathisen" <Per.Inge.Mathisen@xxxxxxxxxxx>
Date: Thu, 2 May 2002 13:39:30 +0200 (MEST)

On Mon, 29 Apr 2002, Daniel L Speyer wrote:
> I doubt this can achieve much.  The tests listed here are what any
> responcible author already does before submission (occassionally an
> author forgets, but occasionally an author would forget this too).

By requiring unit tests to be added to a patch, the author will not be
allowed to forget. This way the maintainer can see what the author has
tested, and - most importantly - can quickly see what has _not_ been
tested. In addition, the tests ensure that later patches do not wreak
havoc on this particular piece of code.

> The significant part of testing is making sure that *unnexpected*
> things don't mess up.

Forcing yourself to spell out your implicit assumptions into explicit
tests helps a lot in this department. Also, when you have a thousand such
tests they _will_ help you find bugs and help you write patches with
higher quality and you will do so quicker because problems will be more
easily identified.

> Any bug which can be practically included in an automated tester of this
> sort is too easy to test to make this worthwhile.

I had unit testing in the sound patch. It helped me considerably while
coding it. For each change of any size I ran through the unit tests and
sometimes found bugs. Much faster than finding them by playtesting. If I
had made the effects of the gameloss unit flag patch into explicit tests I
would have avoided several embarrassing bugs that Mike had to find through
playtesting. Now working on extending the maximum number of flags, I had
to insert lots of printfs and asserts around the code to catch odd errors.

Yours,
Per

Ask not what you can do for your country
Ask what your country did to you
 -- KMFDM, Dogma





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: It is feature freeze time, Per I. Mathisen <=