aboutsummaryrefslogtreecommitdiff
path: root/contributing.md
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-20 14:01:04 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-20 14:01:04 +0100
commitd79148947bc43764b041687b7c6ad2d6c944f70b (patch)
tree0781e6960f040662d03788ea6e2d7dce2828a087 /contributing.md
parent4d1c6f1831e0a95029ff7af4cf8097e837dc2a5d (diff)
parentf78e8011ee77ba5303a5e608cc81c3b303d35943 (diff)
merge `master` into `loek/util`
Diffstat (limited to 'contributing.md')
-rw-r--r--contributing.md23
1 files changed, 22 insertions, 1 deletions
diff --git a/contributing.md b/contributing.md
index e4f075f..77a2908 100644
--- a/contributing.md
+++ b/contributing.md
@@ -24,7 +24,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>
@@ -803,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: