Closed tcbrindle closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.22%. Comparing base (
c957fc3
) to head (ffac8f3
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Catch2 v3 is no longer a header-only library, and requires a build step. If it was just a single file taking a couple of seconds this would be no problem, but instead it's annoyingly slow -- building Catch takes far longer than actually building our own tests.
Even this might be worth it if we used all of Catch's advanced functionality, but really we barely scratch the surface of what it can do, just using the basic macros.
Instead of using Catch, this PR migrates to using Doctest instead, hopefully leading to faster build times.
Because Doctest uses (mostly) the same macro names as Catch, migration is pretty easy -- most of the diff is just changing headers. The only other difference is changing Catch's
SECTION(...)
to Doctest'sSUBCASE(...)
It's worth noting that Doctest may be unmaintained. I don't consider this a huge risk at the moment because the library seems very stable, and it's well used within the C++ community. But if things start to bit-rot in future we can always move back to Catch, or some other test framework.
Some numbers on my system...
With Clang 18, using Flux module:
With GCC 14: