Skip to content

v1.2.0

Compare
Choose a tag to compare
@cschreib cschreib released this 01 Sep 15:30
· 202 commits to main since this release
8542d48

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.