- Linux -
sudo apt-get install cpputest lcov
- OSX -
brew install cpputest lcov
make
├── Makefile // Invokes all the unit tests
├── build
│ [...] // Where all the tests wind up
├── fakes
│ // fakes for unit tests
├── mocks
│ // mocks for unit tests
├── src // test source files
└── vertices_ports // HTTP Request
- Make sure you have set
CPPUTEST_HOME
ontests/CMakeLists.txt
.- Linux -
set(CPPUTEST_HOME /home/ubuntu/cpputest)
- Linux -
- Add a new test file under tests/src for the module you want to test
make
Based on the work of our friends at Memfault (SDK). For more, checkout the Interrupt blog.