mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-15 02:09:53 +01:00
parent
ebf89000f1
commit
f460a7d8f9
@ -124,7 +124,9 @@ The JUnit reporter is an xml format that follows the structure of the JUnit XML
|
||||
## Breaking into the debugger
|
||||
<pre>-b, --break</pre>
|
||||
|
||||
In some IDEs (currently XCode and Visual Studio) it is possible for Catch to break into the debugger on a test failure. This can be very helpful during debug sessions - especially when there is more than one path through a particular test.
|
||||
Under most debuggers Catch2 is capable of automatically breaking on a test
|
||||
failure. This allows the user to see the current state of the test during
|
||||
failure.
|
||||
|
||||
<a id="showing-results-for-successful-tests"></a>
|
||||
## Showing results for successful tests
|
||||
|
@ -153,11 +153,14 @@ these toggles can be disabled by using `_NO_` form of the toggle,
|
||||
e.g. `CATCH_CONFIG_NO_WINDOWS_SEH`.
|
||||
|
||||
### `CATCH_CONFIG_FAST_COMPILE`
|
||||
Defining this flag speeds up compilation of test files by ~20%, by making 2 changes:
|
||||
* The `-b` (`--break`) flag no longer makes Catch break into debugger in the same stack frame as the failed test, but rather in a stack frame *below*.
|
||||
* Non-exception family of macros ({`REQUIRE`,`CHECK`}{`_`,`_FALSE`, `_THAT`}, no longer use local try-catch block. This disables exception translation, but should not lead to false negatives.
|
||||
This compile-time flag speeds up compilation of assertion macros by ~20%,
|
||||
by disabling the generation of assertion-local try-catch blocks for
|
||||
non-exception family of assertion macros ({`REQUIRE`,`CHECK`}{``,`_FALSE`, `_THAT`}).
|
||||
This disables translation of exceptions thrown under these assertions, but
|
||||
should not lead to false negatives.
|
||||
|
||||
`CATCH_CONFIG_FAST_COMPILE` has to be either defined, or not defined, in all translation units that are linked into single test binary, or the behaviour of setting `-b` flag and throwing unexpected exceptions will be unpredictable.
|
||||
`CATCH_CONFIG_FAST_COMPILE` has to be either defined, or not defined,
|
||||
in all translation units that are linked into single test binary.
|
||||
|
||||
### `CATCH_CONFIG_DISABLE_MATCHERS`
|
||||
When `CATCH_CONFIG_DISABLE_MATCHERS` is defined, all mentions of Catch's Matchers are ifdef-ed away from the translation unit. Doing so will speed up compilation of that TU.
|
||||
|
Loading…
Reference in New Issue
Block a user