Skip to content

Releases: snitch-org/snitch

v1.3.1

02 Dec 08:42
2a59433
Compare
Choose a tag to compare

Small changes and bug fixes:

  • [Build] Fixed #199: Compilation error when including snitch.hpp (missing snitch_main.hpp). Thanks @tocic!

v1.3.0

30 Nov 10:40
f40e2df
Compare
Choose a tag to compare

Main changes:

  • [API] It is now possible to completely disable snitch at compile-time, for example so the test code can be placed alongside the application code (#186). Thank you @NicoMuleo for contributing the feature!

Small changes and bug fixes:

  • [Reporter] Fixed #167: --list-test output format with default reporter was not compatible with Catch2 (prevented some IDE integrations to work, e.g. CLion).
  • [Reporter] Fixed #170: Catch2 XML reporter would not report sections properly, and use an old format (v2). Thanks @CrustyAuklet!
  • [Internal] Fixed #171: Reporters would require shared global state.
  • [Reporter] Fixed #177: Capture and section information was not always reported correctly with unhandled exceptions.
  • [Build] Fixed #185: Reporters were not disabled when requested in build options.
  • [Build] Fixed #190: Build failures in tests when disabling reporters.
  • [Reporter] Fixed #193: Double numbers with exponents between 1e-86 and 1e-99 contained a null character when converted to string.
  • [Build] Fixes #196: Install prefix was incorrect when using cmake --install ... --prefix ... instead of setting -DCMAKE_INSTALL_PREFIX at configure time.

v1.2.5

09 May 11:16
86d18cb
Compare
Choose a tag to compare

Small changes and bug fixes:

  • Fixed #158: Add option to disable multi-threading support for embedded use.
  • Fixed #158: Compilation would fail if SNITCH_MAX_MESSAGE_LENGTH and SNITCH_MAX_EXPR_LENGTH were not the same.
  • Fixed #158 and #18: Use std::to_chars to avoid using std::snprintf which is not always fully implemented. If std::to_chars isn't available, fallback to our own (slower but portable) implementation.
  • Fixed #164: Escaped characters could sometimes be truncated incorrectly if hitting the max message length.

v1.2.4

16 Jan 21:13
2f62308
Compare
Choose a tag to compare

Small changes and bug fixes:

  • Fixed #143: Extraneous failures were reported for REQUIRE_THROWS_* macros in case no exception is thrown.
  • Fixed #145: CONSTEVAL_* macros were evaluating their expressions at runtime if the expression was not decomposable.
  • Fixed #147: color codes were used in the console output in some cases even when --color never was specified.
  • Fixed #149: following sections were sometimes executed after an uncaught exception.
  • [Reporter] When an exception is thrown unexpectedly in the test code, the resulting assertion now reports the file/line of the CHECK* or REQUIRE* call that triggered the exception. If the exception is not triggered inside a check macro, then the file/line of the enclosing SECTION is used instead. If no section is used, then the assertion reverts to the previous behavior (file/line of the test case). See #141.
  • [Build] Meson scripts now properly set the default symbol visibility with GCC/clang (thanks @topazus)
  • [Internal] Renamed small_function into function_ref (thanks @tocic)

v1.2.3

05 Oct 07:27
c0a910c
Compare
Choose a tag to compare

Small changes and bug fixes:

  • Fixed #129: harmless narrowing cast warning reported in MSVC 17.8.0.

v1.2.2

05 Sep 20:51
87260ed
Compare
Choose a tag to compare

Small changes and bug fixes:

  • [Build] Fixed header-only build not working with CMake 3.14.
  • [Build] Added Dockerfile for locally testing Conan builds.
  • [CI] Added CMake 3.14 CI runs to test the full build + install + consume process.

v1.2.1

03 Sep 10:37
4e8842a
Compare
Choose a tag to compare

Small changes and bug fixes:

  • [Build] Reverted the change to the CMake target name for the header-only build. It is now back to snitch::snitch-header-only.
  • [Build] Lowered the minimum CMake version to what is strictly needed (3.14 instead of 3.19).
  • [Build] Fixed #120: CMake error when enabling --warn-uninitialized -Werror=dev.

v1.2.0

01 Sep 15:30
8542d48
Compare
Choose a tag to compare

Main changes:

  • [API] Added REQUIRE_NOTHROW(EXPR) and CHECK_NOTHROW(EXPR).
  • [API] Added SUCCEED(MESSAGE).
  • [API] Added REGISTER_REPORTER(...) (from Catch2) for registering multiple reporters that can be selected from the command line.
  • [CLI] Added support for --out to save test report to a file.
  • [CLI] Added support for filtering the output of --list-tests (#114).
  • [Reporter] Added the Catch2 XML reporter (#100).
  • [Reporter] Added file/line information for test cases and sections.
  • [Reporter] Added fixture class name information for test cases ("method" test cases only).
  • [Reporter] Added test filtering criteria to the test_run_started event.
  • [Reporter] Expression data is no longer concatenated into a single message when sent to the reporter.
  • [Reporter] Added events for listing tests (listing started, ended, and test case listed).

As a result, the following Catch2 IDE integrations now work with snitch:

  • Visual Studio Code & C++ TestMate
  • Visual Studio 2022 & Catch2 Test Adapter
  • CLion Catch2 configuration

Small changes and bug fixes:

  • [API] Fixed #105: small_function copy construction from a non-const object was ambiguous.
  • [API] Fixed #107: crash when evaluating a check containing a const char* equal to nullptr.
  • [Reporter] Fixed: the Teamcity reporter was reporting failures in [!mayfail] and [!shouldfail] as actual failures.
  • [Reporter] Fixed: long outputs in registry::print and all reporters was too easily truncated; the risk of this is now largely reduced.
  • [CLI] Fixed: unsupported Catch2 command line parameters were not parsed correctly.
  • [CLI] Fixed #110: the output of --list-tests did not contain the full test name.
  • [CLI] Fixed #113: the test filtering algorithm did not match Catch2 v3.
  • [Build] snitch can now build as a shared library.
  • [Build] The CMake scripts will now build either a compiled library or a header-only library, but not both.
  • [Docs] Fixed #108: clarify how to write your own append() function for serialisation
  • [Internal] Fixed: small_vector_span<const T> was unsafe when not initialized with a valid backing small_vector.
  • [Internal] Fixed: small_function compilation error when assigning a member function (or stateful lambda) when the function parameters contain l-value references.
  • [Internal] Added file_writer.
  • [Tests] Added approval tests for all reporters.
  • [Tests] Reduced memory usage of mock_framework in tests by ~x3.
  • [Tests] Reduced stack usage in tests by allocating large data on the heap (reduce risk of stack overflow).
  • [Tests] Fixed stack size for tests not set correctly on Windows.

v1.1.1

02 May 15:57
5ad2fff
Compare
Choose a tag to compare

Small changes and bug fixes:

  • Fixed #90: missing snitch_registry.hpp header in the installed package.
  • Fixed #92: unable to build with CMake or Meson when building from source tarball (no git repo).

Thanks @tocic for the swift bug reports!

v1.1.0

01 May 10:52
d040b89
Compare
Choose a tag to compare

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.