diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-20 13:30:33 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-20 13:30:33 +0100 |
commit | 26ddec125cd93e9613331872f8e22c79c6f3a720 (patch) | |
tree | b9f3c25bc856a07932ffdc7a4f17f423ce00133c /contributing.md | |
parent | d4dd3ceab2b95c26f3b07092a5c80f47eab18110 (diff) |
update contributing.md
Diffstat (limited to 'contributing.md')
-rw-r--r-- | contributing.md | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/contributing.md b/contributing.md index 5b0c79d..9c95851 100644 --- a/contributing.md +++ b/contributing.md @@ -20,7 +20,7 @@ that you can click on to open them. # 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> @@ -798,6 +798,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: |