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

Fixed string indexing bug

Commit
f7378eebb6ddcc56332ba8addcc29bd076f9b2e5
Author
Phil Nash ·
Parents
04a3364b5a91

Files · Download .tar.gz

Changes

 README.md                                          |  2 +-
 include/internal/catch_test_case_registry_impl.hpp |  2 +-
 include/internal/catch_version.hpp                 |  2 +-
 include/reporters/catch_reporter_console.hpp       |  4 ++++
 projects/SelfTest/Baselines/approvedResults.txt    |  4 ++--
 single_include/catch.hpp                           | 12 ++++++++----
 6 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index fa462506..166a28cb 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 ![catch logo](catch-logo-small.png)
 
-*v1.0 build 8 (master branch)*
+*v1.0 build 9 (master branch)*
 
 # New release with significant changes
 
diff --git a/include/internal/catch_test_case_registry_impl.hpp b/include/internal/catch_test_case_registry_impl.hpp
index a12bb6d5..41714bc8 100644
--- a/include/internal/catch_test_case_registry_impl.hpp
+++ b/include/internal/catch_test_case_registry_impl.hpp
@@ -111,7 +111,7 @@ namespace Catch {
 
     inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) {
         std::string className = classOrQualifiedMethodName;
-        if( className[0] == '&' )
+        if( startsWith( className, "&" ) )
         {
             std::size_t lastColons = className.rfind( "::" );
             std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp
index da70a214..b2311fba 100644
--- a/include/internal/catch_version.hpp
+++ b/include/internal/catch_version.hpp
@@ -13,7 +13,7 @@
 namespace Catch {
 
     // These numbers are maintained by a script
-    Version libraryVersion( 1, 0, 8, "master" );
+    Version libraryVersion( 1, 0, 9, "master" );
 }
 
 #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED
diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp
index 8dd8d902..816f4214 100644
--- a/include/reporters/catch_reporter_console.hpp
+++ b/include/reporters/catch_reporter_console.hpp
@@ -72,6 +72,10 @@ namespace Catch {
                     stream << "Completed in " << _sectionStats.durationInSeconds << "s" << std::endl;
                 m_headerPrinted = false;
             }
+            else {
+                if( m_config->showDurations() == ShowDurations::Always )
+                    stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << "s" << std::endl;
+            }
             StreamingReporterBase::sectionEnded( _sectionStats );
         }
 
diff --git a/projects/SelfTest/Baselines/approvedResults.txt b/projects/SelfTest/Baselines/approvedResults.txt
index 480f802c..5e629d97 100644
--- a/projects/SelfTest/Baselines/approvedResults.txt
+++ b/projects/SelfTest/Baselines/approvedResults.txt
@@ -1,6 +1,6 @@
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-CatchSelfTest is a Catch v1.0 b8 host application.
+CatchSelfTest is a Catch v1.0 b9 host application.
 Run with -? for options
 
 -------------------------------------------------------------------------------
@@ -712,7 +712,7 @@ with expansion:
 
 
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-CatchSelfTest is a Catch v1.0 b8 host application.
+CatchSelfTest is a Catch v1.0 b9 host application.
 Run with -? for options
 
 -------------------------------------------------------------------------------
diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index 02d3c655..e8f2dcf1 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,6 +1,6 @@
 /*
- *  CATCH v1.0 build 8 (master branch)
- *  Generated: 2013-08-16 19:08:52.941769
+ *  CATCH v1.0 build 9 (master branch)
+ *  Generated: 2013-09-07 12:04:25.989589
  *  ----------------------------------------------------------
  *  This file has been merged from multiple headers. Please don't edit it directly
  *  Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -5527,7 +5527,7 @@ namespace Catch {
 
     inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) {
         std::string className = classOrQualifiedMethodName;
-        if( className[0] == '&' )
+        if( startsWith( className, "&" ) )
         {
             std::size_t lastColons = className.rfind( "::" );
             std::size_t penultimateColons = className.rfind( "::", lastColons-1 );
@@ -6352,7 +6352,7 @@ namespace Catch {
 namespace Catch {
 
     // These numbers are maintained by a script
-    Version libraryVersion( 1, 0, 8, "master" );
+    Version libraryVersion( 1, 0, 9, "master" );
 }
 
 // #included from: catch_text.hpp
@@ -7303,6 +7303,10 @@ namespace Catch {
                     stream << "Completed in " << _sectionStats.durationInSeconds << "s" << std::endl;
                 m_headerPrinted = false;
             }
+            else {
+                if( m_config->showDurations() == ShowDurations::Always )
+                    stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << "s" << std::endl;
+            }
             StreamingReporterBase::sectionEnded( _sectionStats );
         }