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

Changed branchName to char*, as per #266

Commit
7303b2b60ef4b5bf01d7eda5da62beb243ce7a75
Author
Phil Nash ·
Parents
cfc37b5fe970

Files · Download .tar.gz

Changes

 include/catch_runner.hpp                     |  2 +-
 include/internal/catch_version.h             | 10 +++++-----
 include/reporters/catch_reporter_console.hpp |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/catch_runner.hpp b/include/catch_runner.hpp
index 97a65b2e..98f160a0 100644
--- a/include/catch_runner.hpp
+++ b/include/catch_runner.hpp
@@ -132,7 +132,7 @@ namespace Catch {
             std::cout << "\nCatch v"    << libraryVersion.majorVersion << "."
                                         << libraryVersion.minorVersion << " build "
                                         << libraryVersion.buildNumber;
-            if( libraryVersion.branchName != "master" )
+            if( libraryVersion.branchName != std::string( "master" ) )
                 std::cout << " (" << libraryVersion.branchName << " branch)";
             std::cout << "\n";
 
diff --git a/include/internal/catch_version.h b/include/internal/catch_version.h
index bca0f8bb..ca2feef3 100644
--- a/include/internal/catch_version.h
+++ b/include/internal/catch_version.h
@@ -15,17 +15,17 @@ namespace Catch {
         Version(    unsigned int _majorVersion,
                     unsigned int _minorVersion,
                     unsigned int _buildNumber,
-                    std::string const& _branchName )
+                    char const* const _branchName )
         :   majorVersion( _majorVersion ),
             minorVersion( _minorVersion ),
             buildNumber( _buildNumber ),
             branchName( _branchName )
         {}
 
-        const unsigned int majorVersion;
-        const unsigned int minorVersion;
-        const unsigned int buildNumber;
-        const std::string branchName;
+        unsigned int const majorVersion;
+        unsigned int const minorVersion;
+        unsigned int const buildNumber;
+        char const* const branchName;
 
     private:
         void operator=( Version const& );
diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp
index 60ada648..71ca8905 100644
--- a/include/reporters/catch_reporter_console.hpp
+++ b/include/reporters/catch_reporter_console.hpp
@@ -262,7 +262,7 @@ namespace Catch {
                     << " is a Catch v"  << libraryVersion.majorVersion << "."
                     << libraryVersion.minorVersion << " b"
                     << libraryVersion.buildNumber;
-            if( libraryVersion.branchName != "master" )
+            if( libraryVersion.branchName != std::string( "master" ) )
                 stream << " (" << libraryVersion.branchName << ")";
             stream  << " host application.\n"
                     << "Run with -? for options\n\n";