Commit bdc60a0b authored by Evan Hunt's avatar Evan Hunt
Browse files

[master] update developer guide, expanding on comments and unit tests

parent 447591a4
...@@ -61,12 +61,19 @@ practices. Third, the contribution is checked for correctness and ...@@ -61,12 +61,19 @@ practices. Third, the contribution is checked for correctness and
completness. completness.
Obvious bottlenecks and places where performance or reliability may suffer Obvious bottlenecks and places where performance or reliability may suffer
are noted as part of the review. Tricky code needs to be commented well are noted as part of the review.
enough. A patch is much more likely to be accepted quickly if it includes
New functions must be adequately commented. Public API functions are
documented in the corresponding header file, static functions in the C
file, above the function header. Particularly complex code should be
commented throughout the function body as well.
A patch is much more likely to be accepted quickly if it includes
tests providing good coverage of the new code. Tests for bugfix code tests providing good coverage of the new code. Tests for bugfix code
should fail when run against the unmodified code; tests for new feature should fail when run against the unmodified code; tests for new feature
code should have good code coverage and address corner cases and error code should have good code coverage and address corner cases and error
cases. (See [testing](#testing).) cases. Newly added API functions should have unit tests if possible.
(See [testing](#testing).)
Documentation is also reviewed. This includes all user-facing text, Documentation is also reviewed. This includes all user-facing text,
including log messages, manual pages, user manuals and sometimes even including log messages, manual pages, user manuals and sometimes even
...@@ -249,6 +256,9 @@ redirected: ...@@ -249,6 +256,9 @@ redirected:
Information on writing ATF tests can be found at the Information on writing ATF tests can be found at the
[NetBSD site](http://wiki.netbsd.org/tutorials/atf/). [NetBSD site](http://wiki.netbsd.org/tutorials/atf/).
New unit tests should be added whenever significant new API
functionality is added to libdns or libisc.
Each unit test file contains at least one unit test case, and Each unit test file contains at least one unit test case, and
a list of test cases to execute when the test is run. These a list of test cases to execute when the test is run. These
will look like the following: will look like the following:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment