A little background on the project: we as a company receive a spaghetti source code, and into that we add even more spaghetti code. So with that I want to say that
complete restructuring and refactoring of the code and un-spaghettifing it is not really possible
and we also do not have any say in what the other company deliveries,
we just have to deal with what we have.
It is a C/C++11 code with CMake. I chose Google test framework (but I can still change it).
The structure is something like this
src/ModuleA/
├── CMakeLists.txt
├── include
│ ├── Submodule1
│ │ ├── Submodule1.h
│ │ └── SomethingElse
│ │ └── SomethingElse.h
│ └── ModuleA.h
└── src
├── Submodule1
│ ├── Submodule1.c
│ └── SomethingElse
│ └── SomethingElse.c
└── ModuleA.cpp
Naturally there are tons of modules, submodules, headers and source files
And ofcourse they include each other all over the place and between the big Modules!
Now the question
what steps would you recommend to a noob unit-tester (I'm actually a developer, not tester) to isolate tightly coupled functions to unit test them?
In addition to that - what folder structure would you recommend? And what CMake structure would you recommend to make it easily manageable in the future (reusing mocks/fakes, untouched headers) to avoid manually adding tons of code for each unit over and over.