Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Removed deprecated message code

Commit
ad654867f1c5a78b4d9f892e7ac68352bbc2ffda
Author
Phil Nash ·
Parents
207b27b3c5ff

Files · Download .tar.gz

Changes

 include/internal/catch_interfaces_capture.h |  3 ---
 include/internal/catch_runner_impl.hpp      | 36 ++---------------------------
 include/internal/catch_totals.hpp           |  5 +---
 3 files changed, 3 insertions(+), 41 deletions(-)

diff --git a/include/internal/catch_interfaces_capture.h b/include/internal/catch_interfaces_capture.h
index 2c52e90f..c6c327a6 100644
--- a/include/internal/catch_interfaces_capture.h
+++ b/include/internal/catch_interfaces_capture.h
@@ -16,7 +16,6 @@
 namespace Catch {
 
     class TestCase;
-    class ScopedInfo;
     class ExpressionResultBuilder;
     class AssertionResult;
     struct AssertionInfo;
@@ -32,8 +31,6 @@ namespace Catch {
         virtual bool sectionStarted(    SectionInfo const& sectionInfo,
                                         Counts& assertions ) = 0;
         virtual void sectionEnded( SectionInfo const& name, Counts const& assertions ) = 0;
-        virtual void pushScopedInfo( ScopedInfo* scopedInfo ) = 0; // !TBD Deprecated
-        virtual void popScopedInfo( ScopedInfo* scopedInfo ) = 0; // !TBD Deprecated
         virtual void pushScopedMessage( ScopedMessageBuilder const& _builder ) = 0;
         virtual void popScopedMessage( ScopedMessageBuilder const& _builder ) = 0;
         
diff --git a/include/internal/catch_runner_impl.hpp b/include/internal/catch_runner_impl.hpp
index eceb92cf..7ff442c2 100644
--- a/include/internal/catch_runner_impl.hpp
+++ b/include/internal/catch_runner_impl.hpp
@@ -170,32 +170,11 @@ namespace Catch {
             }
             else if( !result.isOk() ) {
                 m_totals.assertions.failed++;
-
-//                {
-//                    std::vector<ScopedInfo*>::const_iterator it = m_scopedInfos.begin();
-//                    std::vector<ScopedInfo*>::const_iterator itEnd = m_scopedInfos.end();
-//                    for(; it != itEnd; ++it )
-//                        m_reporter->assertionEnded( AssertionStats( (*it)->buildResult( m_lastAssertionInfo ), m_totals ) );
-//                }
-//                {
-//                    std::vector<AssertionResult>::const_iterator it = m_assertionResults.begin();
-//                    std::vector<AssertionResult>::const_iterator itEnd = m_assertionResults.end();
-//                    for(; it != itEnd; ++it )
-//                        m_reporter->assertionEnded( AssertionStats( *it, m_totals ) );
-//                }
-//                m_assertionResults.clear();
             }
             
-            if( result.getResultType() == ResultWas::Info ) {
-                // !TBD: deprecated? - what does this even do?
-                m_assertionResults.push_back( result );
-                m_totals.assertions.info++;
-            }
-            else {
-                m_reporter->assertionEnded( AssertionStats( result, m_messages, m_totals ) );
-            }
+            m_reporter->assertionEnded( AssertionStats( result, m_messages, m_totals ) );
 
-            // Reset AssertionInfo
+            // Reset working state
             m_lastAssertionInfo = AssertionInfo( "", m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition );
             m_messages.clear();            
         }
@@ -238,14 +217,6 @@ namespace Catch {
             m_messages.clear();
         }
 
-        virtual void pushScopedInfo( ScopedInfo* scopedInfo ) {
-            m_scopedInfos.push_back( scopedInfo );
-        }
-
-        virtual void popScopedInfo( ScopedInfo* scopedInfo ) {
-            if( m_scopedInfos.back() == scopedInfo )
-                m_scopedInfos.pop_back();
-        }
         virtual void pushScopedMessage( ScopedMessageBuilder const& _builder ) {
             m_messages.push_back( _builder.build() );
         }
@@ -314,7 +285,6 @@ namespace Catch {
                 exResult << translateActiveException();
                 actOnCurrentResult( exResult.buildResult( m_lastAssertionInfo )  );
             }
-            m_assertionResults.clear();
         }
 
     private:
@@ -326,8 +296,6 @@ namespace Catch {
         const Config& m_config;
         Totals m_totals;
         Ptr<IStreamingReporter> m_reporter;
-        std::vector<ScopedInfo*> m_scopedInfos; // !TBD: deprecated
-        std::vector<AssertionResult> m_assertionResults; // !TBD: deprecated
         std::vector<MessageInfo> m_messages;
         IRunner* m_prevRunner;
         IResultCapture* m_prevResultCapture;
diff --git a/include/internal/catch_totals.hpp b/include/internal/catch_totals.hpp
index 9f854580..03832a2e 100644
--- a/include/internal/catch_totals.hpp
+++ b/include/internal/catch_totals.hpp
@@ -13,19 +13,17 @@
 namespace Catch {
 
     struct Counts {
-        Counts() : passed( 0 ), failed( 0 ), info( 0 ) {}
+        Counts() : passed( 0 ), failed( 0 ) {}
 
         Counts operator - ( const Counts& other ) const {
             Counts diff;
             diff.passed = passed - other.passed;
             diff.failed = failed - other.failed;
-            diff.info = info - other.info;
             return diff;
         }
         Counts& operator += ( const Counts& other ) {
             passed += other.passed;
             failed += other.failed;
-            info += other.info;
             return *this;
         }
         
@@ -35,7 +33,6 @@ namespace Catch {
         
         std::size_t passed;
         std::size_t failed;
-        std::size_t info;
     };
     
     struct Totals {