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

Cosmetic fixes (whitespace and spelling)

Commit
377c9a746d1623ff51f8d48dde72f090ad960cd8
Author
Martin Hořeňovský ·
Parents
ea48ae0f7531

Files · Download .tar.gz

Changes

 contrib/ParseAndAddCatchTests.cmake        | 14 +++++++-------
 include/catch.hpp                          | 20 ++++++++++----------
 include/internal/catch_assertionresult.h   |  4 ++--
 include/internal/catch_capture.hpp         |  2 +-
 include/internal/catch_default_main.hpp    |  2 +-
 include/internal/catch_fatal_condition.hpp |  4 ++--
 include/internal/catch_objc.hpp            |  2 +-
 include/internal/catch_option.hpp          |  2 +-
 include/internal/catch_run_context.hpp     |  2 +-
 include/internal/catch_type_traits.hpp     |  2 +-
 include/reporters/catch_reporter_bases.hpp |  2 +-
 projects/SelfTest/MiscTests.cpp            |  2 +-
 projects/SelfTest/ToStringGeneralTests.cpp |  3 +--
 13 files changed, 30 insertions(+), 31 deletions(-)

diff --git a/contrib/ParseAndAddCatchTests.cmake b/contrib/ParseAndAddCatchTests.cmake
index 6c3e6632..bd1da755 100644
--- a/contrib/ParseAndAddCatchTests.cmake
+++ b/contrib/ParseAndAddCatchTests.cmake
@@ -25,11 +25,11 @@
 #                                                                                                  #
 #        include(ParseAndAddCatchTests)                                                            #
 #        ParseAndAddCatchTests(${PROJECT_NAME})                                                    #
-#                                                                                                  #  
+#                                                                                                  #
 # The following variables affect the behavior of the script:                                       #
 #                                                                                                  #
 #    PARSE_CATCH_TESTS_VERBOSE (Default OFF)                                                       #
-#    -- enabels debug messages                                                                     #
+#    -- enables debug messages                                                                     #
 #                                                                                                  #
 #==================================================================================================#
 
@@ -44,8 +44,8 @@ function(PrintDebugMessage)
 endfunction()
 
 # This removes the contents between
-#  - block comments (i.e. /* ... */) 
-#  - full line comments (i.e. // ... ) 
+#  - block comments (i.e. /* ... */)
+#  - full line comments (i.e. // ... )
 # contents have been read into '${CppCode}'.
 # !keep partial line comments
 function(RemoveComments CppCode)
@@ -61,7 +61,7 @@ endfunction()
 
 # Worker function
 function(ParseFile SourceFile TestTarget)
-    # accroding to CMake docs EXISTS behavior is well-defined only for full paths.
+    # According to CMake docs EXISTS behavior is well-defined only for full paths.
     get_filename_component(SourceFile ${SourceFile} ABSOLUTE)
     if(NOT EXISTS ${SourceFile})
         message(WARNING "Cannot find source file: ${SourceFile}")
@@ -121,9 +121,9 @@ function(ParseFile SourceFile TestTarget)
             string(REPLACE "]" ";" Tags "${Tags}")
             string(REPLACE "[" "" Tags "${Tags}")
         endif()
-        
+
         list(APPEND Labels ${Tags})
-        
+
         PrintDebugMessage("Adding test \"${CTestName}\"")
         if(Labels)
             PrintDebugMessage("Setting labels to ${Labels}")
diff --git a/include/catch.hpp b/include/catch.hpp
index c105d9c8..f2d9f3da 100644
--- a/include/catch.hpp
+++ b/include/catch.hpp
@@ -57,16 +57,16 @@
 #include <crtdbg.h>
 class LeakDetector {
 public:
-	LeakDetector() {
-		int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
-		flag |= _CRTDBG_LEAK_CHECK_DF;
-		flag |= _CRTDBG_ALLOC_MEM_DF;
-		_CrtSetDbgFlag(flag);
-		_CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
-		_CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
-		// Change this to leaking allocation's number to break there
-		_CrtSetBreakAlloc(-1);
-	}
+    LeakDetector() {
+        int flag = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+        flag |= _CRTDBG_LEAK_CHECK_DF;
+        flag |= _CRTDBG_ALLOC_MEM_DF;
+        _CrtSetDbgFlag(flag);
+        _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG);
+        _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+        // Change this to leaking allocation's number to break there
+        _CrtSetBreakAlloc(-1);
+    }
 };
 #else
 class LeakDetector {};
diff --git a/include/internal/catch_assertionresult.h b/include/internal/catch_assertionresult.h
index a193c556..22d1355e 100644
--- a/include/internal/catch_assertionresult.h
+++ b/include/internal/catch_assertionresult.h
@@ -33,8 +33,8 @@ namespace Catch {
         template<typename T> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( T const& );
         template<typename T> STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( T const& );
 
-	private:
-		DecomposedExpression& operator = (DecomposedExpression const&);
+    private:
+        DecomposedExpression& operator = (DecomposedExpression const&);
     };
 
     struct AssertionInfo
diff --git a/include/internal/catch_capture.hpp b/include/internal/catch_capture.hpp
index 928b06c9..a6d25dad 100644
--- a/include/internal/catch_capture.hpp
+++ b/include/internal/catch_capture.hpp
@@ -60,7 +60,7 @@
 // source code rather than in Catch library code
 #define INTERNAL_CATCH_REACT( resultBuilder ) \
     if( resultBuilder.shouldDebugBreak() ) CATCH_BREAK_INTO_DEBUGGER(); \
-    resultBuilder.react(); 
+    resultBuilder.react();
 #endif
 
 
diff --git a/include/internal/catch_default_main.hpp b/include/internal/catch_default_main.hpp
index 69337244..e9f466c0 100644
--- a/include/internal/catch_default_main.hpp
+++ b/include/internal/catch_default_main.hpp
@@ -18,7 +18,7 @@ extern "C" int wmain (int argc, wchar_t * argv[], wchar_t * []) {
 int main (int argc, char * argv[]) {
 #endif
 
-	int result = Catch::Session().run( argc, argv );
+    int result = Catch::Session().run( argc, argv );
     return ( result < 0xff ? result : 0xff );
 }
 
diff --git a/include/internal/catch_fatal_condition.hpp b/include/internal/catch_fatal_condition.hpp
index 1d6674fc..1dcd545d 100644
--- a/include/internal/catch_fatal_condition.hpp
+++ b/include/internal/catch_fatal_condition.hpp
@@ -28,7 +28,7 @@ namespace Catch {
 
 namespace Catch {
     struct FatalConditionHandler {
-        void reset() {}        
+        void reset() {}
     };
 }
 
@@ -106,7 +106,7 @@ namespace Catch {
 
 namespace Catch {
     struct FatalConditionHandler {
-        void reset() {}        
+        void reset() {}
     };
 }
 
diff --git a/include/internal/catch_objc.hpp b/include/internal/catch_objc.hpp
index 616383b1..2e349315 100644
--- a/include/internal/catch_objc.hpp
+++ b/include/internal/catch_objc.hpp
@@ -104,7 +104,7 @@ namespace Catch {
     namespace Matchers {
         namespace Impl {
         namespace NSStringMatchers {
-           
+
             struct StringHolder : MatcherBase<NSString*>{
                 StringHolder( NSString* substr ) : m_substr( [substr copy] ){}
                 StringHolder( StringHolder const& other ) : m_substr( [other.m_substr copy] ){}
diff --git a/include/internal/catch_option.hpp b/include/internal/catch_option.hpp
index 909e5cec..02f849dd 100644
--- a/include/internal/catch_option.hpp
+++ b/include/internal/catch_option.hpp
@@ -69,7 +69,7 @@ namespace Catch {
         T *nullableValue;
         union {
             char storage[sizeof(T)];
-    
+
             // These are here to force alignment for the storage
             long double dummy1;
             void (*dummy2)();
diff --git a/include/internal/catch_run_context.hpp b/include/internal/catch_run_context.hpp
index f9d3607a..572b54d1 100644
--- a/include/internal/catch_run_context.hpp
+++ b/include/internal/catch_run_context.hpp
@@ -300,7 +300,7 @@ namespace Catch {
                 // This just means the test was aborted due to failure
             }
             catch(...) {
-                // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions 
+                // Under CATCH_CONFIG_FAST_COMPILE, unexpected exceptions under REQUIRE assertions
                 // are reported without translation at the point of origin.
                 if (m_shouldReportUnexpected) {
                     makeUnexpectedResultBuilder().useActiveException();
diff --git a/include/internal/catch_type_traits.hpp b/include/internal/catch_type_traits.hpp
index 9be89162..2094ba5b 100644
--- a/include/internal/catch_type_traits.hpp
+++ b/include/internal/catch_type_traits.hpp
@@ -25,7 +25,7 @@ namespace Catch {
 #else
 
     template <typename T>
-    struct add_const { 
+    struct add_const {
         typedef const T type;
     };
 
diff --git a/include/reporters/catch_reporter_bases.hpp b/include/reporters/catch_reporter_bases.hpp
index aca5f355..de7d96d5 100644
--- a/include/reporters/catch_reporter_bases.hpp
+++ b/include/reporters/catch_reporter_bases.hpp
@@ -28,7 +28,7 @@ namespace Catch {
             // + 1 for null terminator
             const size_t maxDoubleSize = DBL_MAX_10_EXP + 1 + 1 + 3 + 1;
             char buffer[maxDoubleSize];
-            
+
             // Save previous errno, to prevent sprintf from overwriting it
             ErrnoGuard guard;
 #ifdef _MSC_VER
diff --git a/projects/SelfTest/MiscTests.cpp b/projects/SelfTest/MiscTests.cpp
index 02099a71..24e3d7d3 100644
--- a/projects/SelfTest/MiscTests.cpp
+++ b/projects/SelfTest/MiscTests.cpp
@@ -403,5 +403,5 @@ static int f() {
 TEST_CASE( "#835 -- errno should not be touched by Catch", "[!shouldfail]" ) {
     errno = 1;
     CHECK(f() == 0);
-    REQUIRE(errno == 1); // Check that f() doesn't touch errno.    
+    REQUIRE(errno == 1); // Check that f() doesn't touch errno.
 }
diff --git a/projects/SelfTest/ToStringGeneralTests.cpp b/projects/SelfTest/ToStringGeneralTests.cpp
index bca913fb..743882b1 100644
--- a/projects/SelfTest/ToStringGeneralTests.cpp
+++ b/projects/SelfTest/ToStringGeneralTests.cpp
@@ -9,7 +9,6 @@
 
 
 TEST_CASE( "Character pretty printing" ){
-    // 
     SECTION("Specifically escaped"){
         char tab = '\t';
         char newline = '\n';
@@ -36,7 +35,7 @@ TEST_CASE( "Character pretty printing" ){
             char c = static_cast<char>(i);
             REQUIRE(c == i);
         }
-    }    
+    }
 }