This repository uses a header-only doctest setup with a thin helpers/compat layer.
- Enable:
autobuild configure -c RelWithDebInfoOS -- -DLL_TESTS=ON - Build targets:
llcommon_doctest(subset of llcommon tests),llmath_doctest,llcorehttp_doctest,login_doctest - Run:
ctest -C RelWithDebInfo -R "(llcommon_doctest|llmath_doctest|llcorehttp_doctest|login_doctest)" -V
Notes:
- Hand-authored tests are marked with
// DOCTEST_SKIP_AUTOGENto keep the generator idempotent. LL_CHECK_*helpers provide clearer output for floats, buffers, wide strings, and ranges.- The HTTP fakes layer keeps tests network/IO-free by simulating responses with a monotonic clock and per-handle queues (redirects, retries, cancels).
Assumes a Windows setup with Visual Studio and Autobuild available on PATH.
-
Open a “Developer Command Prompt for VS 2022” (x64).
-
Change to the viewer root, e.g.:
cd D:\Projects\viewer
-
Ensure there is a
build-variablesdirectory next to the source tree.
If you already have.build-variablesin this checkout, clone it locally: xcopy /E /I .build-variables build-variables -
Configure a RelWithDebInfo build with tests enabled: autobuild configure -c RelWithDebInfoOS -- -DLL_TESTS=ON
-
Build the viewer and test binaries: autobuild build -c RelWithDebInfoOS
-
Run the doctest-based targets via CTest (adjust the build directory name if needed): ctest -C RelWithDebInfo ^ -R "(llcommon_doctest|llmath_doctest|llcorehttp_doctest|login_doctest)" ^ -V --test-dir build-vc170-64
The Autobuild configuration name (RelWithDebInfoOS) maps to the Visual Studio configuration RelWithDebInfo, which is the value used with ctest -C.