I have a C++ legacy codebase with 10-15 applications, all sharing several components.
While setting up unittests for both shared components and for applications themselves, I was wondering if there are accepted/common file structures for this.
Because my unit tests have several base classes in order to simplify project/customer specific test setups, there are alot of files that are common for all tests.
To me it seems natural here to create a new directory that contains all the test related files, mocks etc -to have it all centralized, and also keep testing related definitions out of the main make files.
On the other hand I see that it is common practice to have the test files reside together with the code files that they test.
Is there a more/less accepted way of doing this?