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

summaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-11-19 15:23:50 +0100
committerMartin Hořeňovský2021-11-19 15:23:50 +0100
commitacdb85c398077a4505fd425a06f7c99f15c7a6d9 (patch)
tree84d0e7b338b8e9cfc2ac22acab3b8e840732673a /docs
parent726fdd7f8e9939ba9975361a0ecab6089e7344cf (diff)
downloadcatch3-acdb85c398077a4505fd425a06f7c99f15c7a6d9.tar.gz
Add FAQ page to the documentation
Diffstat (limited to 'docs')
-rw-r--r--docs/Readme.md3
-rw-r--r--docs/faq.md27
2 files changed, 28 insertions, 2 deletions
diff --git a/docs/Readme.md b/docs/Readme.md
index 262edb5c..dc1eccb9 100644
--- a/docs/Readme.md
+++ b/docs/Readme.md
@@ -25,10 +25,9 @@ Running:
* [Command line](command-line.md#top)
Odds and ends:
+* [Frequently Asked Questions (FAQ)](faq.md#top)
* [CMake integration](cmake-integration.md#top)
* [CI and other miscellaneous pieces](ci-and-misc.md#top)
-
-FAQ:
* [Known limitations](limitations.md#top)
Other:
diff --git a/docs/faq.md b/docs/faq.md
new file mode 100644
index 00000000..a268802d
--- /dev/null
+++ b/docs/faq.md
@@ -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)