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

Made sorting functors const

Commit
6492560394131a2a77b6b1eff4a369c5268fe30b
Author
Phil Nash ·
Parents
9630454b0f26

Files · Download .tar.gz

Changes

 include/internal/catch_test_case_registry_impl.hpp |  9 +++++----
 single_include/catch.hpp                           | 11 +++++------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/internal/catch_test_case_registry_impl.hpp b/include/internal/catch_test_case_registry_impl.hpp
index 7756b0bc..9e3ef11b 100644
--- a/include/internal/catch_test_case_registry_impl.hpp
+++ b/include/internal/catch_test_case_registry_impl.hpp
@@ -60,13 +60,14 @@ namespace Catch {
             return m_nonHiddenFunctions;
         }
 
-        struct LexSort {
-            bool operator() (TestCase i,TestCase j) { return (i<j);}
-        };
+
 
         virtual void getFilteredTests( TestSpec const& testSpec, IConfig const& config, std::vector<TestCase>& matchingTestCases ) const {
+            struct LexSort {
+                bool operator() (TestCase i,TestCase j) const { return (i<j);}
+            };
             struct RandomNumberGenerator {
-                int operator()( int n ) { return std::rand() % n; }
+                int operator()( int n ) const { return std::rand() % n; }
             };
 
             for( std::vector<TestCase>::const_iterator  it = m_functionsInOrder.begin(),
diff --git a/single_include/catch.hpp b/single_include/catch.hpp
index eb102586..0c3c5825 100644
--- a/single_include/catch.hpp
+++ b/single_include/catch.hpp
@@ -1,6 +1,6 @@
 /*
  *  CATCH v1.1 build 4 (develop branch)
- *  Generated: 2014-09-15 23:31:31.318013
+ *  Generated: 2014-09-15 23:36:12.995567
  *  ----------------------------------------------------------
  *  This file has been merged from multiple headers. Please don't edit it directly
  *  Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved.
@@ -5679,13 +5679,12 @@ namespace Catch {
             return m_nonHiddenFunctions;
         }
 
-        struct LexSort {
-            bool operator() (TestCase i,TestCase j) { return (i<j);}
-        };
-
         virtual void getFilteredTests( TestSpec const& testSpec, IConfig const& config, std::vector<TestCase>& matchingTestCases ) const {
+            struct LexSort {
+                bool operator() (TestCase i,TestCase j) const { return (i<j);}
+            };
             struct RandomNumberGenerator {
-                int operator()( int n ) { return std::rand() % n; }
+                int operator()( int n ) const { return std::rand() % n; }
             };
 
             for( std::vector<TestCase>::const_iterator  it = m_functionsInOrder.begin(),