mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
Add FAQ page to the documentation
This commit is contained in:
parent
726fdd7f8e
commit
acdb85c398
@ -25,10 +25,9 @@ Running:
|
|||||||
* [Command line](command-line.md#top)
|
* [Command line](command-line.md#top)
|
||||||
|
|
||||||
Odds and ends:
|
Odds and ends:
|
||||||
|
* [Frequently Asked Questions (FAQ)](faq.md#top)
|
||||||
* [CMake integration](cmake-integration.md#top)
|
* [CMake integration](cmake-integration.md#top)
|
||||||
* [CI and other miscellaneous pieces](ci-and-misc.md#top)
|
* [CI and other miscellaneous pieces](ci-and-misc.md#top)
|
||||||
|
|
||||||
FAQ:
|
|
||||||
* [Known limitations](limitations.md#top)
|
* [Known limitations](limitations.md#top)
|
||||||
|
|
||||||
Other:
|
Other:
|
||||||
|
27
docs/faq.md
Normal file
27
docs/faq.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
<a id="top"></a>
|
||||||
|
# Frequently Asked Questions (FAQ)
|
||||||
|
|
||||||
|
## How do I run global setup/teardown only if tests will be run?
|
||||||
|
|
||||||
|
Write a custom [event listener](event-listeners.md#top) and place the
|
||||||
|
global setup/teardown code into the `testRun*` events.
|
||||||
|
|
||||||
|
|
||||||
|
## How do I clean up global state between running different tests?
|
||||||
|
|
||||||
|
Write a custom [event listener](event-listeners.md#top) and place the
|
||||||
|
cleanup code into either `testCase*` or `testCasePartial*` events,
|
||||||
|
depending on how often the cleanup needs to happen.
|
||||||
|
|
||||||
|
|
||||||
|
## Why cannot I derive from the built-in reporters?
|
||||||
|
|
||||||
|
They are not made to be overriden, in that we do not attempt to maintain
|
||||||
|
a consistent internal state if a member function is overriden, and by
|
||||||
|
forbidding users from using them as a base class, we can refactor them
|
||||||
|
as needed later.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
[Home](Readme.md#top)
|
Loading…
Reference in New Issue
Block a user