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 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 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 #include #include 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 #include #include +#include +#include +#include #ifdef __OBJC__ #include "catch_objc_arc.hpp" #endif -#include - -#include - -#include // We need a dummy global operator<< so we can bring it into Catch namespace later struct Catch_global_namespace_dummy;