mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 21:35:40 +02:00

This costs us about 1% perf in Debug build and 3% in Release build, but it is worth it for more precise information during unexpected exceptions or fatal errors. Given a simple test case like this ```cpp TEST_CASE("Hard fail") { REQUIRE( 1 == 1 ); REQUIRE( 2 == 2 ); throw 1; REQUIRE( 3 == 3 ); } ``` Catch2 before this change would report the line info from the `TEST_CASE` macro as the last seen expression before error. With this change, it will correctly report the line info from the `REQUIRE(2 == 2)` assertion as the last seen expression before error.