diff options
| author | Martin Hořeňovský | 2020-07-06 20:33:08 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-07-26 10:48:01 +0200 |
| commit | 13917c44b423920397dbf026ef8853f847a4656e (patch) | |
| tree | 3a8c2544f35aa7fac107fc4ddf893e4abf3a2693 /src/catch2 | |
| parent | e6d947f6d4f84713637da5e5b37cd1f84b925403 (diff) | |
| download | catch3-13917c44b423920397dbf026ef8853f847a4656e.tar.gz | |
--min-duration is overriden by -d no
Diffstat (limited to 'src/catch2')
| -rw-r--r-- | src/catch2/reporters/catch_reporter_bases.cpp | 12 | ||||
| -rw-r--r-- | src/catch2/reporters/catch_reporter_bases.hpp | 3 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/catch2/reporters/catch_reporter_bases.cpp b/src/catch2/reporters/catch_reporter_bases.cpp index e875b596..09cec4f0 100644 --- a/src/catch2/reporters/catch_reporter_bases.cpp +++ b/src/catch2/reporters/catch_reporter_bases.cpp @@ -44,10 +44,14 @@ namespace Catch { } bool shouldShowDuration( IConfig const& config, double duration ) { - if( config.showDurations() == ShowDurations::Always ) - return true; - double min = config.minDuration(); - return min >= 0 && duration >= min; + if ( config.showDurations() == ShowDurations::Always ) { + return true; + } + if ( config.showDurations() == ShowDurations::Never ) { + return false; + } + const double min = config.minDuration(); + return min >= 0 && duration >= min; } std::string serializeFilters( std::vector<std::string> const& container ) { diff --git a/src/catch2/reporters/catch_reporter_bases.hpp b/src/catch2/reporters/catch_reporter_bases.hpp index 7e4457e8..d5f22181 100644 --- a/src/catch2/reporters/catch_reporter_bases.hpp +++ b/src/catch2/reporters/catch_reporter_bases.hpp @@ -24,7 +24,8 @@ namespace Catch { // Returns double formatted as %.3f (format expected on output) std::string getFormattedDuration( double duration ); - bool shouldShowDuration( IConfig const &, double duration ); + //! Should the reporter show + bool shouldShowDuration( IConfig const& config, double duration ); std::string serializeFilters( std::vector<std::string> const& container ); |