The current unit tests are all built against the library’s internal source code directly. That means they have the advantage of being to test internal functions that aren’t exposed from the library, but it also means the tests cannot actually run against the normal release build of the library.
To improve this:
- Split the tests into separate public API tests, and internal tests.
- A public test binary: public API tests, linked against the release build of the library (no -DVERIFY).
- An internal test binary: #include’s the library code directly, plus public API tests, plus internal test (compiled with -DVERIFY).