I have two projects in qtcreator: BiosPatcher - the code & BiosPatcherTest - googletest unit tests for BiosPatcher code. Advice from here:
multiple main declaration in qtcreator project which uses googletest
How to import sources from one project in another and connect builded project as library in qtcreator to another qtcreator project?
BiosPatcher project has:
BiosPatcher\src\bios\Bios.{cpp, hpp} class
and in BiosPatcherTest i have test:
#include "src/bios/Bios.hpp" //not works
...
TEST(BiosTest, testReadMethodReadsFromBiosIO) {
MockBiosIO mockBiosIO;
EXPECT_CALL(mockBiosIO, readAsBytes())
.Times(AtLeast(1));
MockReentrantLock mockReentrantLock;
MockBiosVector mockBiosVector;
MockPatch mockPatch;
MockLog mockLog;
Bios bios;
bios.setBiosIO(&mockBiosIO);
bios.setLock(&mockReentrantLock);
bios.setBiosBytesVector(&mockBiosVector);
bios.setLog(&mockLog);
bios.setPatch(&mockPatch);
bios.read();
}