We develop a game just for the sake of learning how to do it. Okay, maybe it's more developing a game engine and using a game as its integration test. We have no real goal besides the learning experience.
This will help us to write only neccessary tests, and find out what we've missed.
Use gcov with cmake, like this:
if(CMAKE_COMPILER_IS_GNUCXX)
LIST(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules")
include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()
set(COVERAGE_LCOV_EXCLUDES 'dir1/*' 'dir2/*') // this is optional if you want to exclude some directory from the report
SETUP_TARGET_FOR_COVERAGE_LCOV(NAME foo_coverage EXECUTABLE foo DEPENDENCIES foo)
endif()
This will help us to write only neccessary tests, and find out what we've missed.
Use
gcov
with cmake, like this:cmake module: https://github.com/bilke/cmake-modules/blob/master/CodeCoverage.cmake