mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Turn ShowDurations into an enum class
This commit is contained in:
parent
6dc8345261
commit
60cc4c293d
@ -70,7 +70,7 @@ namespace Catch {
|
|||||||
bool Config::includeSuccessfulResults() const { return m_data.showSuccessfulTests; }
|
bool Config::includeSuccessfulResults() const { return m_data.showSuccessfulTests; }
|
||||||
bool Config::warnAboutMissingAssertions() const { return !!(m_data.warnings & WarnAbout::NoAssertions); }
|
bool Config::warnAboutMissingAssertions() const { return !!(m_data.warnings & WarnAbout::NoAssertions); }
|
||||||
bool Config::warnAboutNoTests() const { return !!(m_data.warnings & WarnAbout::NoTests); }
|
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; }
|
double Config::minDuration() const { return m_data.minDuration; }
|
||||||
RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; }
|
RunTests::InWhatOrder Config::runOrder() const { return m_data.runOrder; }
|
||||||
unsigned int Config::rngSeed() const { return m_data.rngSeed; }
|
unsigned int Config::rngSeed() const { return m_data.rngSeed; }
|
||||||
|
@ -43,7 +43,7 @@ namespace Catch {
|
|||||||
|
|
||||||
Verbosity verbosity = Verbosity::Normal;
|
Verbosity verbosity = Verbosity::Normal;
|
||||||
WarnAbout::What warnings = WarnAbout::Nothing;
|
WarnAbout::What warnings = WarnAbout::Nothing;
|
||||||
ShowDurations::OrNot showDurations = ShowDurations::DefaultForReporter;
|
ShowDurations showDurations = ShowDurations::DefaultForReporter;
|
||||||
double minDuration = -1;
|
double minDuration = -1;
|
||||||
RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder;
|
RunTests::InWhatOrder runOrder = RunTests::InDeclarationOrder;
|
||||||
UseColour::YesOrNo useColour = UseColour::Auto;
|
UseColour::YesOrNo useColour = UseColour::Auto;
|
||||||
@ -94,7 +94,7 @@ namespace Catch {
|
|||||||
bool includeSuccessfulResults() const override;
|
bool includeSuccessfulResults() const override;
|
||||||
bool warnAboutMissingAssertions() const override;
|
bool warnAboutMissingAssertions() const override;
|
||||||
bool warnAboutNoTests() const override;
|
bool warnAboutNoTests() const override;
|
||||||
ShowDurations::OrNot showDurations() const override;
|
ShowDurations showDurations() const override;
|
||||||
double minDuration() const override;
|
double minDuration() const override;
|
||||||
RunTests::InWhatOrder runOrder() const override;
|
RunTests::InWhatOrder runOrder() const override;
|
||||||
unsigned int rngSeed() const override;
|
unsigned int rngSeed() const override;
|
||||||
|
@ -29,11 +29,11 @@ namespace Catch {
|
|||||||
NoTests = 0x02
|
NoTests = 0x02
|
||||||
}; };
|
}; };
|
||||||
|
|
||||||
struct ShowDurations { enum OrNot {
|
enum class ShowDurations {
|
||||||
DefaultForReporter,
|
DefaultForReporter,
|
||||||
Always,
|
Always,
|
||||||
Never
|
Never
|
||||||
}; };
|
};
|
||||||
struct RunTests { enum InWhatOrder {
|
struct RunTests { enum InWhatOrder {
|
||||||
InDeclarationOrder,
|
InDeclarationOrder,
|
||||||
InLexicographicalOrder,
|
InLexicographicalOrder,
|
||||||
@ -66,7 +66,7 @@ namespace Catch {
|
|||||||
virtual bool warnAboutNoTests() const = 0;
|
virtual bool warnAboutNoTests() const = 0;
|
||||||
virtual int abortAfter() const = 0;
|
virtual int abortAfter() const = 0;
|
||||||
virtual bool showInvisibles() const = 0;
|
virtual bool showInvisibles() const = 0;
|
||||||
virtual ShowDurations::OrNot showDurations() const = 0;
|
virtual ShowDurations showDurations() const = 0;
|
||||||
virtual double minDuration() const = 0;
|
virtual double minDuration() const = 0;
|
||||||
virtual TestSpec const& testSpec() const = 0;
|
virtual TestSpec const& testSpec() const = 0;
|
||||||
virtual bool hasTestFilters() const = 0;
|
virtual bool hasTestFilters() const = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user