Skip to content

Commit 1e69e97

Browse files
authored
Add paragraph describing use of discretion on value parameterized tests
1 parent 245f3d3 commit 1e69e97

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

technical/automated_testing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,3 +197,4 @@ add_subdirectory(src/Mod/Sketcher)
197197
target_include_directories(Sketcher_tests_run PUBLIC ${EIGEN3_INCLUDE_DIR})
198198
target_link_libraries(Sketcher_tests_run gtest_main ${Google_Tests_LIBS} Sketcher)
199199
```
200+
Note that it can be tempting to further group functionality using [value parameterized tests](https://google.github.io/googletest/advanced.html#value-parameterized-tests). A key measure here is to assess whether the grouping benefits the writer or the reader of the tests. Since a test is for use by a future programmer to figure out why it failed, it's okay and often preferred to be more pedantic and more repetitive rather than super efficient. The reader should be able to figure out your test just by reading it, and maybe the test fixture. If more work is required then the test is likely too complex.

0 commit comments

Comments
 (0)