Skip to content

Releases: approvals/ApprovalTests.cpp

Single Hpp File - v.8.7.0

15 May 17:51
Compare
Choose a tag to compare

See the v.8.7.0 milestone for the full list of changes.

  • Breaking changes
    • Planned deprecation: The overloads of verify(), verifyAll() and verifyAllCombinations() which take a Reporter have been deprecated.
    • If you happen to have specialised StringUtils::toString(), you would now need to specialize StringMaker::toString() instead.
      • Note: this was previously unsupported behavior, so we are not bumping the major version number.
      • Here is how to update your code:
template <>
-std::string ApprovalTests::StringUtils::toString(const StringMakerPrintable& printable)
+std::string ApprovalTests::StringMaker::toString(const StringMakerPrintable& printable)
  • New features
    • New Scrubber feature for working with non-deterministic output. (#126, thank you @abdulg, @haraldreingruber, @jawn)
    • New Options class provides consistent interface for customising the following in all verify(), verifyAll() and verifyAllCombinations() calls:
    • New mechanics for String conversions (thank you @alepez)
      • The class Approvals is now an alias for TApprovals< ToStringCompileTimeOptions< StringMaker > >
      • CombinationApprovals is now an alias for the class TCombinationApprovals< ToStringCompileTimeOptions<APPROVAL_TESTS_DEFAULT_STREAM_CONVERTER > >, instead of being a namespace.
      • This is a completely backwards-compatible feature.
      • It has been done to support a new feature in a future release. (#124)
    • Our Conan.io package now supports our Boost.Test integration (#121)
  • Bug fixes
    • None
  • Other changes
Old New
APPROVALTESTS_VERSION APPROVAL_TESTS_VERSION
APPROVALTESTS_VERSION_MAJOR APPROVAL_TESTS_VERSION_MAJOR
APPROVALTESTS_VERSION_MINOR APPROVAL_TESTS_VERSION_MINOR
APPROVALTESTS_VERSION_PATCH APPROVAL_TESTS_VERSION_PATCH
APPROVALTESTS_VERSION_STR APPROVAL_TESTS_VERSION_STR
APPROVALS_CATCH_DISABLE_FILE_MACRO_CHECK APPROVAL_TESTS_DISABLE_FILE_MACRO_CHECK

Single Hpp File - v.8.6.0

13 Apr 20:48
Compare
Choose a tag to compare

Single Hpp File - v.8.5.0

06 Apr 18:53
Compare
Choose a tag to compare

See the v.8.5.0 milestone for the full list of changes.

  • Breaking changes
    • None
  • New features
  • Bug fixes
    • Code now compiles in clang and gcc with -Wshadow enabled (#111)
    • Fixed some missing '\' characters in the released header (#118)
  • Other changes
    • Updated to doctest 2.3.7 (#108, thank you @p-podsiadly)
    • New section in documentation: How-to Guides
    • Lots of improvements to our Python release scripts
    • Line-length increased from 80 to 90 characters

Single Hpp File - v.8.4.0

20 Feb 00:59
Compare
Choose a tag to compare
  • Breaking changes
    • None
  • New features
    • Provide a way to launch reporters in foreground (See #98)
    • CI builds now print meaningful differences on failure
  • Bug fixes
    • None
  • Other changes
    • None

Single Hpp File - v.8.3.0

12 Feb 00:21
Compare
Choose a tag to compare

Single Hpp File - v.8.2.0

04 Feb 14:34
Compare
Choose a tag to compare

See the v.8.2.0 milestone for the full list of changes.

  • Breaking changes
    • None
  • New features
  • Bug fixes
    • 3 locations now throw an exception if their system() call failed. Previously they silently ignored the error. (#94, thank you @p-podsiadly)
      • ClipboardReporter
      • SystemLauncher::launch()
      • FileUtilsSystemSpecific::copyFile()
    • Fixed a bug that could break custom comparators, stopping them from taking effect, depending on how their disposers were stored (#93, thank you @p-podsiadly)
  • Other changes
    • Windows.h no longer included in SystemUtils.h (#96, thank you @p-podsiadly)

Single Hpp File - v.8.1.1

01 Feb 14:05
Compare
Choose a tag to compare

Single Hpp File - v.8.1.0

26 Jan 10:00
Compare
Choose a tag to compare

See the v.8.1.0 milestone for the full list of changes.

  • Breaking changes
    • None
  • New features
  • Bug fixes
    • Relaxed the static_assert check on __FILE__ to stop it wrongly triggering in Cygwin builds that don't define _WIN32 (#92)
    • Fixed inability to use project as sub-module on Windows due to long filenames - by shortening the names of some files and folders in the tests. (#38)
  • Other changes
    • Include __FILE__ value in static_assert message, to aid diagnosis
    • Implement check for broken links in documentation (#26)
    • Fixed some broken links in documentation (#26)

Single Hpp File - v.8.0.0

22 Jan 20:35
Compare
Choose a tag to compare

See the v.8.0.0 milestone for the full list of changes.

  • Breaking changes
    • We have fully standardised the way that Approval Tests looks for 3rd-party headers, so users should no longer need to modify their search paths for include directories. This means that:
    • If you are using Catch (#62), and you get build failures, you'll need to change your #include lines like this:
      -#include <catch.hpp>
      +#include <catch2/catch.hpp>
    • If you are using doctest (#68), and you get build failures, you'll need to change your #include lines like this:
      -#include <doctest.h>
      +#include <doctest/doctest.h>
    • If you are using [Boost].UT (#65), and you get build failures, you'll need to change your #include lines like this:
      -#include <ut.hpp>
      +#include <boost/ut.hpp>
    • In order for this to work with our third_party directory, our copies of these header files are now in:
      • third_party/catch2/include/catch2/
      • third_party/doctest/include/doctest
      • third_party/ut/include/boost
    • Catch1 is no longer supported as a test framework, in order to better support more CMake build layouts. (#64)
      • Catch2 remains fully supported.
      • Catch1's main benefit was that it supported pre-C++11 compilers, but as ApprovalTests.cpp requires C++11 or newer, this wasn't useful in practice
  • New features
    • Greatly improved and documented CMake Integration (#69):
      • Approval Tests can now be added to other projects with any of CMake's add_subdirectory(), FetchContent and ExternalProject. (#62, #65, #68, #75, #70, #88, #89)
      • Created wrapper ApprovalTests.hpp
        so that code can work interchangeably with the single header and via CMake integration (#89)
      • Made CMake targets for targets in third_party consistent with those of the original projects, adding Catch2::Catch2, doctest::doctest and boost.ut (#70)
      • Created a namespaced CMake target for ApprovalTests ApprovalTests::ApprovalTests (#75)
      • Don't create third_party targets if they have been created already (#88)
  • Bug fixes
    • Significant effort to improve behaviour with the Ninja build tool:
      • Understood, work-around and documented issues with the Ninja generator. See Troubleshooting Misconfigured Build if you have test failures in your Ninja builds. (#74 - thanks @jwillikers)
      • Added compile-time checks for GoogleTest, Catch2 and doctest, to detect problems with __FILE__ macro caused by the Ninja generator on all platforms (#79 - thanks @jwillikers).
      • Added option to disable the __FILE__ compile-time check (#86)
    • Project now works with Unity builds (#86)
  • Other changes

Single Hpp File - v.7.0.0

21 Dec 00:12
Compare
Choose a tag to compare

See the v.7.0.0 milestone for the full list of changes.

  • Breaking changes
    • If you are using Catch, we have changed the casing of the file that Approval Tests looks for, to be consistent with Catch downloads (#53). If you get build failures, you'll need to change your #include lines like this:
      -#include "Catch.hpp"
      +#include "catch.hpp"
    • If you pass in a reporter to CombinationApprovals::verifyAllCombinations(), the argument order has changed, and is now the first argument: see Passing in a Reporter. (#47 - thanks to @mika-fischer, Mika Fischer)
  • New features
  • Bug fixes
    • Fixed tests failing when using Ninja generator used by Visual Studio 2019 (#55).
    • Fixed unnecessary duplicate static functions. (#54)
    • Fixed ClipboardReporter on macOS. (#51)
    • Fixed inability to use project as sub-module on windows due to long filenames - by shortening the names of some files and folders in the tests. (#38)
  • Other changes
    • Documentation improvements (Thanks to Neil Horlock)
    • Updated our copy of Catch to v2.11.0 (from v2.7.1)
    • Added GitHub actions (#31 - thanks @alastairUK)