- how to mock interface with virtual methods
- how to mock global functions which have no class body
- how to make code coverage report in the browser
- how to make cobertura report to integrate with CI Build
sudo apt-get install cmake gcovr lcov
cd test/generator
./gmock_gen.py ../../include/Shape.h
mkdir build
cd build
cmake ..
make gmock-boilerplate_test -j 8
cd build/test
./gmock-boilerplate_test
or
cd build/test
ctest -VV
cd build
make gmock-boilerplate_coverage
- open build/coverage/index.html in your favorite browser
cd build
make gmock-boilerplate_cobertura
- add build/cobertura.xml to Jenkins Job (should install Jenkins Cobertura Plugin)
The code is available under the MIT license.