title: Unit testing. File structure
body: <p>I have a C++ legacy codebase with 10-15 applications, all sharing several components. </p>
  
  <p>While setting up unittests for both shared components and for applications themselves, I was wondering if there are accepted/common file structures for this.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Is there a more/less accepted way of doing this?</p>