Files
1NiM-WatingRoom-WatchContro…/test/unitOnHost
gustice 04a8904cbe refactor/bringup: Bringup full project
moving SPIT-App parts to main app
LiveShowDemoProject added
Debugging motor movements
2025-04-08 23:49:05 +02:00
..

Unit Testing - Software

In contrast to test-directory this module demonstrates how unit tests can also be run on host. These unit tests aim to test freestanding software modules with more convenient methods and tools

Setup

make sure you have following packages installed on your host syste

  • gnu compiler
  • cmake
  • generator
  • doctest-dev

Build and test code

  • Start some terminal in uTest-directory that has access to all needed tools (i.e. on windows a mingw environment or WSL)

Run following commands

# run cmake configuration
cmake -S . -B build
# run cmake build
cmake --build build
# run tests
./build/<testprog>
# run all tests with 
cd build && ctest