diff options
| author | Martin Hořeňovský | 2023-05-06 11:48:25 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2023-05-06 11:48:41 +0200 |
| commit | d84777c9cbf5b1b7d0e9ef2e14606ece254adf7a (patch) | |
| tree | fcf806ea44c6822ba8202f9ba5a922bab629d2a2 /docs | |
| parent | 51fdbedd1337955bedc02b570bb2a7fb19061f2e (diff) | |
| download | catch3-d84777c9cbf5b1b7d0e9ef2e14606ece254adf7a.tar.gz | |
Fix assertionStarting events being sent after the expr is evaluated
Closes #2678
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/reporter-events.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/reporter-events.md b/docs/reporter-events.md index 32a0ae50..015f67be 100644 --- a/docs/reporter-events.md +++ b/docs/reporter-events.md @@ -96,12 +96,12 @@ void assertionStarting( AssertionInfo const& assertionInfo ); void assertionEnded( AssertionStats const& assertionStats ); ``` -`assertionStarting` is called after the expression is captured, but before -the assertion expression is evaluated. This might seem like a minor -distinction, but what it means is that if you have assertion like -`REQUIRE( a + b == c + d )`, then what happens is that `a + b` and `c + d` -are evaluated before `assertionStarting` is emitted, while the `==` is -evaluated after the event. +The `assertionStarting` event is emitted before the expression in the +assertion is captured or evaluated and `assertionEnded` is emitted +afterwards. This means that given assertion like `REQUIRE(a + b == c + d)`, +Catch2 first emits `assertionStarting` event, then `a + b` and `c + d` +are evaluated, then their results are captured, the comparison is evaluated, +and then `assertionEnded` event is emitted. ## Benchmarking events |