Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/extras
diff options
context:
space:
mode:
authorLeitwolf112026-11-01 20:05:56 +0300
committerLeitwolf112026-11-01 20:05:56 +0300
commit8603d31fd8c1a72e30cb444f278d7a0592383ba7 (patch)
tree496d26ff659e92cdf4e6fe27a4aa47bf52818052 /extras
parent2aea9dafd283d69bec459ea0d495c25d1f6a0f94 (diff)
downloadcatch3-feature/mocking.tar.gz
Answer the review of the mocksfeature/mocking
A report no longer throws, so a noexcept mock survives an aborting run. A call that has nothing to return still leaves the test case, which ends the process in a noexcept function; the documentation says so. RunContext clears the result capture when it goes, so a mock of static lifetime finds none and writes to standard error. Decision owns its source line, since Verify can free the expectation while a call is on its way. Moving a result out takes the lock. Vector matchers refer to their vector, so they are rejected at compile time like composed ones. A null text expectation accepts only null, and integers compare by value, so 256 no longer accepts an unsigned char.
Diffstat (limited to 'extras')
-rw-r--r--extras/catch_amalgamated.cpp7
-rw-r--r--extras/catch_amalgamated.hpp2
-rw-r--r--extras/catch_amalgamated_third_party.hpp2
3 files changed, 8 insertions, 3 deletions
diff --git a/extras/catch_amalgamated.cpp b/extras/catch_amalgamated.cpp
index 78782e44..fb73d0b2 100644
--- a/extras/catch_amalgamated.cpp
+++ b/extras/catch_amalgamated.cpp
@@ -7,7 +7,7 @@
// SPDX-License-Identifier: BSL-1.0
// Catch3 v0.3.0.1, on the Catch2 v3.16.1 engine
-// Generated: 2026-11-01 16:09:52.594301
+// Generated: 2026-11-01 20:05:03.089807
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
@@ -5189,6 +5189,11 @@ namespace Catch {
RunContext::~RunContext() {
updateTotalsFromAtomics();
m_reporter->testRunEnded(TestRunStats(m_runInfo, m_totals, aborting()));
+ // What outlives the run, such as a mock of static lifetime, must not
+ // find a capture that is gone.
+ if ( getCurrentContext().getResultCapture() == this ) {
+ getCurrentMutableContext().setResultCapture( nullptr );
+ }
}
Totals RunContext::runTest(TestCaseHandle const& testCase) {
diff --git a/extras/catch_amalgamated.hpp b/extras/catch_amalgamated.hpp
index ed4340cf..2572e065 100644
--- a/extras/catch_amalgamated.hpp
+++ b/extras/catch_amalgamated.hpp
@@ -7,7 +7,7 @@
// SPDX-License-Identifier: BSL-1.0
// Catch3 v0.3.0.1, on the Catch2 v3.16.1 engine
-// Generated: 2026-11-01 16:09:52.447462
+// Generated: 2026-11-01 20:05:02.974375
// ----------------------------------------------------------
// This file is an amalgamation of multiple different files.
// You probably shouldn't edit it directly.
diff --git a/extras/catch_amalgamated_third_party.hpp b/extras/catch_amalgamated_third_party.hpp
index f76ef223..77980d07 100644
--- a/extras/catch_amalgamated_third_party.hpp
+++ b/extras/catch_amalgamated_third_party.hpp
@@ -1,5 +1,5 @@
// Catch3 v0.3.0.1: yyjson and pugixml for catch_amalgamated.cpp
-// Generated: 2026-11-01 16:09:52.737649
+// Generated: 2026-11-01 20:05:03.275425
// ----------------------------------------------------------
// This file is an amalgamation of src/Progmasoft/Runner/Yyjson.inl,
// src/Progmasoft/PugiXml.inl and the libraries they include from