Refactor snitch::small_function to stronger invariants (always contains a function to call). This is technically a breaking change (the class lost its empty() member, and is no longer default-constructible), but this should not affect anyone using snitch as a testing framework.
Refactor the default reporter to use the standard reporter interface, rather than special treatment.
Replace several calls to std::terminate to a customizable assertion handler (terminates by default, but can be made to throw instead for testing).
Apply the Lakos Rule for noexcept to the whole code. This led to a minor but measurable performance degradation (on compilation time mostly).
Add tests for various failure modes which used to unconditionally terminate.
This PR does the following:
snitch::small_function
to stronger invariants (always contains a function to call). This is technically a breaking change (the class lost itsempty()
member, and is no longer default-constructible), but this should not affect anyone using snitch as a testing framework.std::terminate
to a customizable assertion handler (terminates by default, but can be made to throw instead for testing).noexcept
to the whole code. This led to a minor but measurable performance degradation (on compilation time mostly).