This repository contains unit test code samples for embedded software. I use GoogleTest as a testing framework for C. It includes examples of using test doubles such as dummy, stub, and mock to isolate hardware dependencies specific to embedded software.
Install GoogleTest and GoogleMock. Please refer to the official GoogleTest documentation.
https://google.github.io/googletest/quickstart-cmake.html
Install other tools
sudo apt install cmake build-essential lcov
./runTests.sh
./runTests.sh --coverage