Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Example Project

This directory contains a complete working CMake example project.

This guide will walk you through building the project and generating coverage locally.

  1. Ensure the required tools are installed

The example expects Python 3, GCC/G++, gcov, CMake, Ninja, and lcov/genhtml to be available on your path.

  1. Build the example project with the provided script
$ cd example/
$ ./build.sh
  1. Open the coverage report with a browser

If you have Firefox installed, you can simply do:

$ firefox example/cmake_project/build/coverage_report/index.html
  1. Play around with fastcov's filtering options in build.sh

Fastcov comes with a lot of filtering options. This example uses filtering options that automatically remove system headers, "noisy" branches, and test files. Try removing the various filtering options (or adding new ones) to see how the coverage report changes!

That's it - Happy Testing!