C++ Tests#
The cuNLS C++ library tests (GoogleTest) are built through CMake when
BUILD_TESTING=ON. For the Python (pycunls) tests, see
Python Tests.
Step-by-step#
Configure:
cmake -S . -B build/tests \
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_TESTING=ON
Build:
cmake --build build/tests -j
Run all tests with CTest:
ctest --test-dir build/tests --output-on-failure
Alternative: Run the aggregated binary directly#
./build/tests/bin/nls_tests
Coverage mode#
The repository supports a coverage build path through scripts/build_cunls.sh
with CMAKE_BUILD_TYPE=Coverage.
./scripts/build_cunls.sh build/coverage Coverage
This triggers the coverage target and emits report assets under:
build/coverage/bin/coverage_report.