Unit tests / Selftests
To build unit tests you need to install additional dependency (Google Test framework):
# Fedora
sudo dnf install gtest-devel# Debian, Ubuntu
sudo apt install libgtest-dev# Arch, Manjaro
sudo pacman -S gtestUse --enable-tests config flag:
./autogen.sh
./configure --enable-tests
make -j$(nproc)Run tests:
./tests/tests
Additional options (selectve test run, shuffling tests order, etc) are
documented in the test binary itself: ./tests/tests --help.
Writing tests
See tests/example.cpp for brief tutorial (with examples) on writing tests
using Google Test framework.