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

summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMartin Hořeňovský2020-08-11 15:03:37 +0200
committerMartin Hořeňovský2020-08-11 15:03:37 +0200
commit60cc4c293d4d7d984a0f01397270ce592a397de5 (patch)
tree5885bc5be2481ae3d9175d14707e25c29a076a1d /src
parent6dc834526103e3b9ee7fab26a69cd7942924bd91 (diff)
downloadcatch3-60cc4c293d4d7d984a0f01397270ce592a397de5.tar.gz
Turn ShowDurations into an enum class
Diffstat (limited to 'src')
-rw-r--r--src/catch2/catch_config.cpp2
-rw-r--r--src/catch2/catch_config.hpp4
-rw-r--r--src/catch2/interfaces/catch_interfaces_config.hpp6
3 files changed, 6 insertions, 6 deletions
diff --git a/src/catch2/catch_config.cpp b/src/catch2/catch_config.cpp
index bd311974..93acc690 100644
--- a/src/catch2/catch_config.cpp
+++ b/src/catch2/catch_config.cpp
@@ -70,7 +70,7 @@ namespace Catch {
bool Config::includeSuccessfulResults() const { return m_data.showSuccessfulTests; }
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; }
+ ShowDurations 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; }
diff --git a/src/catch2/catch_config.hpp b/src/catch2/catch_config.hpp
index 3aa8b210..778d6cdd 100644
--- a/src/catch2/catch_config.hpp
+++ b/src/catch2/catch_config.hpp
@@ -43,7 +43,7 @@ namespace Catch {
Verbosity verbosity = Verbosity::Normal;
WarnAbout::What warnings = WarnAbout::Nothing;
- ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter;
+ ShowDurations showDurations = ShowDurations::DefaultForReporter;
double minDuration = -1;
RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder;
UseColour::YesOrNo useColour = UseColour::Auto;
@@ -94,7 +94,7 @@ namespace Catch {
bool includeSuccessfulResults() const override;
bool warnAboutMissingAssertions() const override;
bool warnAboutNoTests() const override;
- ShowDurations::OrNot showDurations() const override;
+ ShowDurations showDurations() const override;
double minDuration() const override;
RunTests::InWhatOrder runOrder() const override;
unsigned int rngSeed() const override;
diff --git a/src/catch2/interfaces/catch_interfaces_config.hpp b/src/catch2/interfaces/catch_interfaces_config.hpp
index 8f3926f5..39cc2bf7 100644
--- a/src/catch2/interfaces/catch_interfaces_config.hpp
+++ b/src/catch2/interfaces/catch_interfaces_config.hpp
@@ -29,11 +29,11 @@ namespace Catch {
NoTests = 0x02
}; };
- struct ShowDurations { enum OrNot {
+ enum class ShowDurations {
DefaultForReporter,
Always,
Never
- }; };
+ };
struct RunTests { enum InWhatOrder {
InDeclarationOrder,
InLexicographicalOrder,
@@ -66,7 +66,7 @@ namespace Catch {
virtual bool warnAboutNoTests() const = 0;
virtual int abortAfter() const = 0;
virtual bool showInvisibles() const = 0;
- virtual ShowDurations::OrNot showDurations() const = 0;
+ virtual ShowDurations showDurations() const = 0;
virtual double minDuration() const = 0;
virtual TestSpec const& testSpec() const = 0;
virtual bool hasTestFilters() const = 0;