diff options
Diffstat (limited to 'contributing.md')
-rw-r--r-- | contributing.md | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/contributing.md b/contributing.md index 5b0c79d..77a2908 100644 --- a/contributing.md +++ b/contributing.md @@ -15,12 +15,16 @@ that you can click on to open them. `name/feature` (i.e. `loek/dll-so-poc` or `jaro/class2`) - The master branch is considered stable, and should always contain a working/compiling version of the project +- Pull requests for new code include either automated tests for the new code or + an explanation as to why the code can not (reliably) be tested +<!-- - TODO: tagging / versions +--> # Code style - Formatting nitty-gritty is handled by clang-format/clang-tidy (run `make - format` in the root folder of this repository to format all sources files) + format` or `make lint`) - <details><summary> ASCII only </summary><table><tr><th>Good</th><th>Bad</th></tr><tr><td> @@ -790,6 +794,7 @@ that you can click on to open them. } ``` </td></tr></table></details> +- Do not implement new classes as singletons ## CMakeLists-specific @@ -798,6 +803,27 @@ that you can click on to open them. resolving merge conflicts when multiple sources were added by different people to the same CMakeLists.txt easier. +## GoogleTest-specific + +- Unit tests are not *required* to follow all code standards +- <details><summary> + Private/protected members may be accessed using preprocessor tricks + </summary> + + ```cpp + // include unrelated headers before + + #define private public + #define protected public + + // headers included after *will* be affected + ``` + </details> +- Each test source file defines tests within a single test suite (first + parameter of `TEST()` / `TEST_F()` macro) +- Test source files match their suite name (or test fixture name in the case of + tests that use a fixture) + # Structure - Files are placed in the appropriate directory: |