DMD 1.018 and 2.002 releases
Walter Bright
newshound1 at digitalmars.com
Tue Jul 3 12:18:22 PDT 2007
Luís Marques wrote:
> Walter: have you considered keeping a large code base of D projects
> which you would try to compile and run its unit tests before each
> release? It would be a akin to dstress, with the added benefit that it
> would check that major projects are OK with new versions.
I don't do that for several reasons:
1) Running the test suite is already an all night affair. Making it a
week long affair makes it fairly unusable.
2) Trying to figure out why some large code base of code I am unfamiliar
with fails is a major effort. It's not practical.
3) I find that people tend to program in "islands" of a particular
language, no matter how large that program becomes, it only tests a
particular "island" of features. So 99.9% of the large program becomes
redundant as a test suite.
4) Nearly all bugs can be boiled down to 10 or less lines of code (even
ones their submitter swears can't be reduced! <g>). Putting these into
the test suite is highly effective. It gives me a very fast check, and
since it is very small, when it fails it is a *lot* less work to figure
out why.
5) The test suite is a gradual accretion of all those 10 liners. Over
time, it gets extremely thorough. The one I have for C/C++ is a
distillation of 25 years of bug reports, and the result is it is very
rare for any regressions.
To sum up, I find it more useful to target with a rifle rather than
carpet bombing!
More information about the Digitalmars-d-announce
mailing list