rollbear / trompeloeil

Header only C++14 mocking framework
Boost Software License 1.0
811 stars 86 forks source link

Update Catch2 to 2.13.5 or later #261

Closed AndrewPaxie closed 3 years ago

AndrewPaxie commented 3 years ago

The unit tests for Trompeloeil use Catch2 as their unit testing framework. The current version in use is Catch2 2.9.2 as at Trompeloeil version 41. This version fails to compile with glibc 2.34 or later, e.g. on systems such as Ubuntu 21.10 (Impish Indri). See: https://github.com/catchorg/Catch2/issues/2178 This was fixed in Catch2 2.13.5. The latest version of Catch2 is 2.13.7, which is the version recommended to update.

rollbear commented 3 years ago

Good, um, catch (sorry). Should be easy enough to fix.

Incidentally, I'll probably meet with Martin Hořeňovský in a few days, at the NDC TechTown conference, where I will definitely attend his presentation about the state and future of Catch2 (https://ndctechtown.com/agenda/catching-up-with-catch2-changes-recent-and-future-0wlv/05vlton416s). Anything I should ask him about?

AndrewPaxie commented 3 years ago

Here's a question that is starting to plague me: What are Martin's thoughts, in general, as to how to unit test constexpr functions with traditional unit testing frameworks?

rollbear commented 3 years ago

Martin recommends STATIC_REQUIRE https://github.com/catchorg/Catch2/blob/devel/docs/other-macros.md#top for testing constexpr functions with Catch2, especially since, in the case of unexpected failures that needs debugging, can easily be turned into a run-time test.