diff options
| author | Leitwolf11 | 2026-11-01 19:04:52 +0300 |
|---|---|---|
| committer | Leitwolf11 | 2026-11-01 19:04:52 +0300 |
| commit | c51d15273e87267215e5877edc268e7db354187b (patch) | |
| tree | bc314b97cbb793ea136ceabecc3d565240ae7cf2 /tests/TestScripts/testConfigureExperimentalRedirect.py | |
| parent | 26a1588ae3ae183ae5c900caf3c294bdcb3f8855 (diff) | |
| download | catch3-c51d15273e87267215e5877edc268e7db354187b.tar.gz | |
Add mocks that report through the assertion path
Step 3 of the roadmap. MockFunction checks the calls of one function
against its expectations; CATCH3_MOCK_METHOD declares one for a virtual
member, and CATCH3_MOCK_FUNCTION and ScopedSeam serve free functions
behind a seam.
Expectations take values, Catch matchers, Any or Where; count calls with
Times, Between, AtLeast, AtMost, AnyTimes and Never; answer with Returns,
Does or Throws; and order calls across mocks with Sequence. A failure
goes through AssertionHandler at the line of the expectation, so every
report of the runner shows it. Met expectations count as passed
assertions. A test case that is already being left does not get unmet
expectations on top of its own failure.
Composed matchers refer to temporaries, so they are rejected at compile
time rather than left dangling. A call that fails returns a
value-initialized result, or leaves the test case when no such result
exists.
The failure paths are tested through the runner fixture, reading the
messages from its JSON report.
Diffstat (limited to 'tests/TestScripts/testConfigureExperimentalRedirect.py')
0 files changed, 0 insertions, 0 deletions