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

General cleanup

Commit
9de729b515ec129c5436d2da46d54c1cdca2fc83
Author
Martin Hořeňovský ·
Parents
1a96175bb290

Files · Download .tar.gz

Changes

 CMakeLists.txt                                | 1 +
 include/internal/catch_commandline.cpp        | 1 -
 include/internal/catch_context.cpp            | 5 -----
 include/internal/catch_option.hpp             | 2 --
 include/internal/catch_result_builder.cpp     | 6 ++++++
 include/internal/catch_result_builder.h       | 6 +-----
 include/internal/catch_tag_alias.h            | 2 +-
 include/internal/catch_tag_alias_registry.cpp | 9 ---------
 include/internal/catch_test_case_info.cpp     | 1 -
 include/internal/catch_test_case_info.h       | 2 --
 include/internal/catch_tostring.h             | 9 +++------
 11 files changed, 12 insertions(+), 32 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5ce481e..6489e3a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -222,6 +222,7 @@ set(IMPL_SOURCES
         ${HEADER_DIR}/internal/catch_stringdata.cpp
         ${HEADER_DIR}/internal/catch_stringref.cpp
         ${HEADER_DIR}/internal/catch_string_manip.cpp
+        ${HEADER_DIR}/internal/catch_tag_alias.cpp
         ${HEADER_DIR}/internal/catch_tag_alias_registry.cpp
         ${HEADER_DIR}/internal/catch_test_case_info.cpp
         ${HEADER_DIR}/internal/catch_test_case_tracker.cpp
diff --git a/include/internal/catch_commandline.cpp b/include/internal/catch_commandline.cpp
index 484b7740..b94bc2d2 100644
--- a/include/internal/catch_commandline.cpp
+++ b/include/internal/catch_commandline.cpp
@@ -8,7 +8,6 @@
 
 #include "catch_commandline.hpp"
 
-#include "catch_common.h"
 #include "catch_string_manip.h"
 
 #include <fstream>
diff --git a/include/internal/catch_context.cpp b/include/internal/catch_context.cpp
index 7a4518bf..3d406dda 100644
--- a/include/internal/catch_context.cpp
+++ b/include/internal/catch_context.cpp
@@ -5,9 +5,6 @@
  *  Distributed under the Boost Software License, Version 1.0. (See accompanying
  *  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  */
-#ifndef TWOBLUECUBES_CATCH_CONTEXT_IMPL_HPP_INCLUDED
-#define TWOBLUECUBES_CATCH_CONTEXT_IMPL_HPP_INCLUDED
-
 #include "catch_context.h"
 #include "catch_common.h"
 
@@ -63,5 +60,3 @@ namespace Catch {
         currentContext = nullptr;
     }
 }
-
-#endif // TWOBLUECUBES_CATCH_CONTEXT_IMPL_HPP_INCLUDED
diff --git a/include/internal/catch_option.hpp b/include/internal/catch_option.hpp
index 6653649e..d790b245 100644
--- a/include/internal/catch_option.hpp
+++ b/include/internal/catch_option.hpp
@@ -8,8 +8,6 @@
 #ifndef TWOBLUECUBES_CATCH_OPTION_HPP_INCLUDED
 #define TWOBLUECUBES_CATCH_OPTION_HPP_INCLUDED
 
-#include "catch_common.h"
-
 namespace Catch {
 
     // An optional type
diff --git a/include/internal/catch_result_builder.cpp b/include/internal/catch_result_builder.cpp
index 838c43da..a1fed54e 100644
--- a/include/internal/catch_result_builder.cpp
+++ b/include/internal/catch_result_builder.cpp
@@ -168,4 +168,10 @@ namespace Catch {
         m_guardException = false;
     }
 
+    CopyableStream& ResultBuilder::m_stream() {
+        static CopyableStream s;
+        return s;
+    }
+
+
 } // end namespace Catch
diff --git a/include/internal/catch_result_builder.h b/include/internal/catch_result_builder.h
index 4c5c5d80..45bc8920 100644
--- a/include/internal/catch_result_builder.h
+++ b/include/internal/catch_result_builder.h
@@ -75,11 +75,7 @@ namespace Catch {
         AssertionInfo m_assertionInfo;
         AssertionResultData m_data;
 
-        static CopyableStream &m_stream()
-        {
-            static CopyableStream s;
-            return s;
-        }
+        static CopyableStream& m_stream();
 
         bool m_shouldDebugBreak = false;
         bool m_shouldThrow = false;
diff --git a/include/internal/catch_tag_alias.h b/include/internal/catch_tag_alias.h
index bb23bc8d..7dd6337f 100644
--- a/include/internal/catch_tag_alias.h
+++ b/include/internal/catch_tag_alias.h
@@ -15,7 +15,7 @@
 namespace Catch {
 
     struct TagAlias {
-        TagAlias( std::string const& _tag, SourceLineInfo _lineInfo ) : tag( _tag ), lineInfo( _lineInfo ) {}
+        TagAlias(std::string const& _tag, SourceLineInfo _lineInfo);
 
         std::string tag;
         SourceLineInfo lineInfo;
diff --git a/include/internal/catch_tag_alias_registry.cpp b/include/internal/catch_tag_alias_registry.cpp
index c0969445..921740e0 100644
--- a/include/internal/catch_tag_alias_registry.cpp
+++ b/include/internal/catch_tag_alias_registry.cpp
@@ -53,13 +53,4 @@ namespace Catch {
         return getRegistryHub().getTagAliasRegistry();
     }
 
-    RegistrarForTagAliases::RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ) {
-        try {
-            getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo);
-        } catch (...) {
-            // Do not throw when constructing global objects, instead register the exception to be processed later
-            getMutableRegistryHub().registerStartupException(std::current_exception());
-        }
-    }
-
 } // end namespace Catch
diff --git a/include/internal/catch_test_case_info.cpp b/include/internal/catch_test_case_info.cpp
index 0e4ac1d2..6f6b141d 100644
--- a/include/internal/catch_test_case_info.cpp
+++ b/include/internal/catch_test_case_info.cpp
@@ -9,7 +9,6 @@
 #include "catch_test_spec.hpp"
 #include "catch_test_case_info.h"
 #include "catch_interfaces_testcase.h"
-#include "catch_common.h"
 #include "catch_string_manip.h"
 
 #include <cctype>
diff --git a/include/internal/catch_test_case_info.h b/include/internal/catch_test_case_info.h
index 7f6d5a85..ebb1f406 100644
--- a/include/internal/catch_test_case_info.h
+++ b/include/internal/catch_test_case_info.h
@@ -8,8 +8,6 @@
 #ifndef TWOBLUECUBES_CATCH_TEST_CASE_INFO_H_INCLUDED
 #define TWOBLUECUBES_CATCH_TEST_CASE_INFO_H_INCLUDED
 
-#include "catch_common.h"
-
 #include <string>
 #include <set>
 #include <memory>
diff --git a/include/internal/catch_tostring.h b/include/internal/catch_tostring.h
index e4cded72..81d122d6 100644
--- a/include/internal/catch_tostring.h
+++ b/include/internal/catch_tostring.h
@@ -8,21 +8,18 @@
 #ifndef TWOBLUECUBES_CATCH_TOSTRING_H_INCLUDED
 #define TWOBLUECUBES_CATCH_TOSTRING_H_INCLUDED
 
-#include "catch_common.h"
 
 #include <sstream>
 #include <vector>
 #include <cstddef>
+#include <tuple>
+#include <type_traits>
+#include <string>
 
 #ifdef __OBJC__
 #include "catch_objc_arc.hpp"
 #endif
 
-#include <tuple>
-
-#include <type_traits>
-
-#include <string>
 
 // We need a dummy global operator<< so we can bring it into Catch namespace later
 struct Catch_global_namespace_dummy;