Skip to content

v1.1.0

Compare
Choose a tag to compare
@cschreib cschreib released this 01 May 10:52
· 308 commits to main since this release
d040b89

Main changes:

  • Added CONSTEVAL_* and CONSTEXPR_* macros for compile-time (or combined compile- and run-time) testing.
  • Added test event reporting for successful assertions (available only with verbosity "full").
  • Added SKIP_CHECK() to mark a test case as skipped without aborting (useful only if exceptions are turned off).
  • Previously, verbosity only controlled the output of the default reporter. This was not documented. Now, verbosity selects which tests events are sent to the reporter interface. This will speed things up, however you may have to increase the verbosity level if your custom reporter requires events that aren't emitted at the default verbosity (e.g., test case start/end events require verbosity "high").
  • Fixed major bug #83: the last section at any level is only ever entered once, even if it has multiple child sections.

Small changes and bug fixes:

  • Fixed #61: support expressions containing commas in REQUIRE, CHECK, REQUIRE_FALSE, and CHECK_FALSE
  • Fixed #62: do not include absolute path to build directory in uncaught exception messages
  • Fixed #66: incorrect static assert in implementation (internal only; does not affect user code)
  • Fixed #67: REQUIRE_THAT and CHECK_THAT would not compile
  • Fixed #68: preserve matcher state in REQUIRE_THROWS_MATCHES and CHECK_THROWS_MATCHES
  • Fixed #74: incorrect formatting for uncaught std::exception
  • Fixed #77: extra semicolon warning with -Wpedantic
  • Fixed #82: corrupted terminal output if assertion message exceeds SNITCH_MAX_MESSAGE_LENGTH.
  • (build) Added support for meson.
  • (utilities) Refactored snitch::small_function to have stronger invariants (always contains a function to call).
  • (internal) Split the code into multiple files. This is fully backward-compatible, just makes maintenance a bit easier.
  • (internal) Refactored the default reporter to use the standard reporter interface, rather than receiving special treatment.
  • (internal) Fixed the snitch_all target being sometimes out of date when building tests.
  • (internal) Fixed WebAssembly tests not configured with as much stack space as other platforms.
  • (internal) Fixed tests not compiling/failing when exceptions are forcefully disabled in the compiler settings.
  • (internal) Replaced several calls to std::terminate with a customizable assertion handler. This terminates by default, so behavior is unchanged, but can be made to throw instead for testing.
  • (internal) Applied the Lakos Rule for noexcept to the whole code. This led to a minor but measurable performance degradation of compilation time.
  • (internal) Added missing tests for exception checking macros.
  • (internal) Reduced code duplication between check macros. This improved compilation time slightly.