Skip to content

Latest commit

 

History

History

tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Unit tests

Setup

  • Linux - sudo apt-get install cpputest lcov
  • OSX - brew install cpputest lcov

Running tests

make

Directory structure

├── 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

Adding a test

  • Make sure you have set CPPUTEST_HOME on tests/CMakeLists.txt.
    • Linux - set(CPPUTEST_HOME /home/ubuntu/cpputest)
  • 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.