diff options
| author | Phil Nash | 2013-05-29 18:34:11 +0100 |
|---|---|---|
| committer | Phil Nash | 2013-05-29 18:34:11 +0100 |
| commit | 3c3beb57c36b5d55c05f4af164f28d7fd76db249 (patch) | |
| tree | f3a51718b6d3bdcef335fb5f95c3c49efdc9e14d /include | |
| parent | be8fd82f2021b48299d170e0f4f54df35e742328 (diff) | |
| download | catch3-3c3beb57c36b5d55c05f4af164f28d7fd76db249.tar.gz | |
More config refactoring
Diffstat (limited to 'include')
| -rw-r--r-- | include/internal/catch_commandline.hpp | 4 | ||||
| -rw-r--r-- | include/internal/catch_config.hpp | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/include/internal/catch_commandline.hpp b/include/internal/catch_commandline.hpp index 6c050f55..2eda8912 100644 --- a/include/internal/catch_commandline.hpp +++ b/include/internal/catch_commandline.hpp @@ -466,7 +466,7 @@ namespace Catch { "just pass this option."; } virtual void parseIntoConfig( Command const&, ConfigData& config ) { - config.includeWhichResults = Include::SuccessfulResults; + config.showSuccessfulTests = true; } }; @@ -590,7 +590,7 @@ namespace Catch { } virtual void parseIntoConfig( Command const&, ConfigData& config ) { - config.allowThrows = false; + config.noThrow = true; } }; diff --git a/include/internal/catch_config.hpp b/include/internal/catch_config.hpp index 7c88edd8..141ac437 100644 --- a/include/internal/catch_config.hpp +++ b/include/internal/catch_config.hpp @@ -59,17 +59,17 @@ namespace Catch { ConfigData() : listSpec( List::None ), - includeWhichResults( Include::FailedOnly ), + showSuccessfulTests( false ), shouldDebugBreak( false ), - allowThrows( true ), + noThrow( false ), cutoff( -1 ), warnings( WarnAbout::Nothing ) {} List::What listSpec; // !TBD Split into bools - Include::WhichResults includeWhichResults; // !TBD bool + bool showSuccessfulTests; bool shouldDebugBreak; - bool allowThrows; // !TBD invert + bool noThrow; // bool showHelp; // !TBD int cutoff; @@ -159,10 +159,10 @@ namespace Catch { } // IConfig interface - virtual bool allowThrows() const { return m_data.allowThrows; } + virtual bool allowThrows() const { return !m_data.noThrow; } virtual std::ostream& stream() const { return m_os; } virtual std::string name() const { return m_data.name; } - virtual bool includeSuccessfulResults() const { return m_data.includeWhichResults == Include::SuccessfulResults; } + virtual bool includeSuccessfulResults() const { return m_data.showSuccessfulTests; } virtual bool warnAboutMissingAssertions() const { return m_data.warnings & ConfigData::WarnAbout::NoAssertions; } private: |