www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Bug fixes must come with unit tests

reply =?ISO-8859-1?Q?Ali_=C7ehreli?= <acehreli yahoo.com> writes:
I notice that some dmd and Phobos bugs are fixed without any supporting 
unit tests.

The following approach is very effective in code quality:

1) A bug is discovered; two issues are exposed:

   i) the bug itself

  ii) the lack of a unit test that could have caught the bug

2) Write a unit test that exposes the bug

3) Finally make corrections to the code to pass the unit tests

There are cases where it is not practical but the approach above is very 
effective in reducing regressions.

Feb 24 2011
parent Andrej Mitrovic <andrej.mitrovich gmail.com> writes:
Regressions? Why.. we don't have those in D!

See http://d.puremagic.com/issues/buglist.cgi?query_format=advanced&bug_severity=regression&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED
Feb 24 2011