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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/catch_config.cpp
diff options
context:
space:
mode:
authorJohn Bytheway2020-04-13 08:34:27 -0400
committerMartin Hořeňovský2020-07-26 10:47:53 +0200
commit80b0d6975c1582d03436ba82146983d557b0a1a6 (patch)
treee9b9cc1e4eb1f5fb6a298eed1c89c16f6076a5d5 /src/catch2/catch_config.cpp
parent36131f7ffa7f6a3e5a54de9fcf4f622e7b97a5a5 (diff)
downloadcatch3-80b0d6975c1582d03436ba82146983d557b0a1a6.tar.gz
Add --min-duration option
A test runner already has a --durations option to print durations. However, this isn't entirely satisfactory. When there are many tests, this produces output spam which makes it hard to find the test failure output. Nevertheless, it is helpful to be informed of tests which are unusually slow. Therefore, introduce a new option --min-duration that causes all durations above a certain threshold to be printed. This allows slow tests to be visible without mentioning every test.
Diffstat (limited to 'src/catch2/catch_config.cpp')
-rw-r--r--src/catch2/catch_config.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/catch2/catch_config.cpp b/src/catch2/catch_config.cpp
index 1f89af56..a5caeb33 100644
--- a/src/catch2/catch_config.cpp
+++ b/src/catch2/catch_config.cpp
@@ -69,6 +69,7 @@ namespace Catch {
bool Config::warnAboutMissingAssertions() const { return !!(m_data.warnings & WarnAbout::NoAssertions); }
bool Config::warnAboutNoTests() const { return !!(m_data.warnings & WarnAbout::NoTests); }
ShowDurations::OrNot Config::showDurations() const { return m_data.showDurations; }
+ double Config::minDuration() const { return m_data.minDuration; }
RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; }
unsigned int Config::rngSeed() const { return m_data.rngSeed; }
UseColour::YesOrNo Config::useColour() const { return m_data.useColour; }