IAP GITLAB

Update Guidelines for Unit Tests authored by Ralf Ulrich's avatar Ralf Ulrich
...@@ -8,7 +8,7 @@ In catch2, testing is particularly easy. For details, see the catch2 documentati ...@@ -8,7 +8,7 @@ In catch2, testing is particularly easy. For details, see the catch2 documentati
- see also the "coverage", which indicates the number of actual code lines that are tested by unit tests. We want this to converge to 100%. - see also the "coverage", which indicates the number of actual code lines that are tested by unit tests. We want this to converge to 100%.
- Unit tests should be robust and run very fast. - Unit tests should be robust and run very fast.
- no extensive physics tests - avoid extensive physics tests
- no statistical analysis with large number of events - avoid statistical analysis with large number of events
- if needed, complicated input-output data/objects must be replaced with simplified (empty) testing counterparts to basically **only** test the basic expectations, not complex behavior. - if needed, complicated input-output data/objects must be replaced with simplified (empty) testing counterparts to basically **only** test the basic expectations, not complex behavior.
- unit tests must be as independent of each other as possible. Ideally they only depend on exactly the code they are testing. - unit tests must be as independent of each other as possible. Ideally they only depend on exactly the code they are testing.