From 5f39dc386cce357a7c71a81c523a90496f7b1e67 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Mon, 18 Nov 2024 18:18:27 +0100 Subject: update contributing.md --- contributing.md | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'contributing.md') diff --git a/contributing.md b/contributing.md index 5b0c79d..e4f075f 100644 --- a/contributing.md +++ b/contributing.md @@ -15,7 +15,11 @@ 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 + # Code style @@ -790,6 +794,7 @@ that you can click on to open them. } ``` +- Do not implement new classes as singletons ## CMakeLists-specific -- cgit v1.2.3 From 26ddec125cd93e9613331872f8e22c79c6f3a720 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 20 Nov 2024 13:30:33 +0100 Subject: update contributing.md --- contributing.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'contributing.md') 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`) -
ASCII only
GoodBad
@@ -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 +-
+ Private/protected members may be accessed using preprocessor tricks + + + ```cpp + // include unrelated headers before + + #define private public + #define protected public + + // headers included after *will* be affected + ``` +
+- 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: -- cgit v1.2.3