diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3ced37d6..166cc6d8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,7 +74,7 @@ DEALINGS IN THE SOFTWARE. */ ``` -#### Documenting and testing +#### Documenting It is not strictly necessary to document code, but if you do, use [ddoc syntax](https://dlang.org/spec/ddoc.html). Each documented module should be accompanied by a description block (if you don't do that, documentation generators may ignore the module): ```d @@ -84,13 +84,15 @@ It is not strictly necessary to document code, but if you do, use [ddoc syntax]( * Description: * * - * Copyright: Your Name 2020. + * Copyright: Your Name 2023. * License: $(LINK2 https://boost.org/LICENSE_1_0.txt, Boost License 1.0). * Authors: Your Name */ module dlib.something.something; ``` +#### Testing + It is advisable to write unit tests for new code, if they can be written. Sometimes functionality needs particular external environment or special conditions to run; in these cases tests are not required. It is recommended to add one `unittest` block per function, method, or class. Test block should be formatted in the following way: