Rename catch_common.hpp -> catch_source_line_info.hpp

Previous splitting of catch_common.hpp left it containing only one
actual thing, which is the `SourceLineInfo` type. Given that, there
is no reason to keep the old name.

Also found out that it was included in some places for no reason
(primarily Matchers).
This commit is contained in:
Martin Hořeňovský 2020-11-27 11:08:26 +01:00
parent 1982c0d5ee
commit 72525a3053
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
22 changed files with 25 additions and 28 deletions

View File

@ -47,7 +47,7 @@ set(INTERNAL_HEADERS
${SOURCES_DIR}/internal/catch_case_sensitive.hpp
${SOURCES_DIR}/internal/catch_clara.hpp
${SOURCES_DIR}/internal/catch_commandline.hpp
${SOURCES_DIR}/internal/catch_common.hpp
${SOURCES_DIR}/internal/catch_source_line_info.hpp
${SOURCES_DIR}/internal/catch_compiler_capabilities.hpp
${SOURCES_DIR}/catch_config.hpp
${SOURCES_DIR}/internal/catch_config_uncaught_exceptions.hpp
@ -145,7 +145,7 @@ set(IMPL_SOURCES
${SOURCES_DIR}/matchers/internal/catch_matchers_combined_tu.cpp
${SOURCES_DIR}/internal/catch_clara.cpp
${SOURCES_DIR}/internal/catch_commandline.cpp
${SOURCES_DIR}/internal/catch_common.cpp
${SOURCES_DIR}/internal/catch_source_line_info.cpp
${SOURCES_DIR}/catch_config.cpp
${SOURCES_DIR}/internal/catch_console_colour.cpp
${SOURCES_DIR}/internal/catch_context.cpp

View File

@ -49,7 +49,6 @@
#include <catch2/internal/catch_case_sensitive.hpp>
#include <catch2/internal/catch_clara.hpp>
#include <catch2/internal/catch_commandline.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <catch2/internal/catch_config_uncaught_exceptions.hpp>
#include <catch2/internal/catch_console_colour.hpp>
@ -81,6 +80,7 @@
#include <catch2/internal/catch_run_context.hpp>
#include <catch2/internal/catch_section.hpp>
#include <catch2/internal/catch_singletons.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_startup_exception_registry.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/internal/catch_stream_end_stop.hpp>

View File

@ -9,7 +9,7 @@
#define CATCH_ASSERTION_INFO_HPP_INCLUDED
#include <catch2/internal/catch_result_type.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_stringref.hpp>
namespace Catch {

View File

@ -8,13 +8,14 @@
#ifndef CATCH_ASSERTION_RESULT_HPP_INCLUDED
#define CATCH_ASSERTION_RESULT_HPP_INCLUDED
#include <string>
#include <catch2/catch_assertion_info.hpp>
#include <catch2/internal/catch_result_type.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_lazy_expr.hpp>
#include <string>
namespace Catch {
struct AssertionResultData

View File

@ -8,7 +8,7 @@
#ifndef CATCH_SECTION_INFO_HPP_INCLUDED
#define CATCH_SECTION_INFO_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_stringref.hpp>
#include <catch2/catch_totals.hpp>

View File

@ -8,7 +8,7 @@
#ifndef CATCH_TAG_ALIAS_HPP_INCLUDED
#define CATCH_TAG_ALIAS_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <string>

View File

@ -8,7 +8,7 @@
#ifndef CATCH_TAG_ALIAS_AUTOREGISTRAR_HPP_INCLUDED
#define CATCH_TAG_ALIAS_AUTOREGISTRAR_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
namespace Catch {

View File

@ -8,7 +8,7 @@
#ifndef CATCH_TEST_CASE_INFO_HPP_INCLUDED
#define CATCH_TEST_CASE_INFO_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_noncopyable.hpp>
#include <catch2/internal/catch_stringref.hpp>
#include <catch2/internal/catch_test_registry.hpp>

View File

@ -9,7 +9,7 @@
#define CATCH_GENERATORS_HPP_INCLUDED
#include <catch2/interfaces/catch_interfaces_generatortracker.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_stringref.hpp>
#include <vector>

View File

@ -9,7 +9,6 @@
#define CATCH_INTERFACES_REPORTER_HPP_INCLUDED
#include <catch2/catch_section_info.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/catch_totals.hpp>
#include <catch2/catch_assertion_result.hpp>
#include <catch2/internal/catch_message_info.hpp>

View File

@ -8,7 +8,7 @@
#ifndef CATCH_CONSOLE_COLOUR_HPP_INCLUDED
#define CATCH_CONSOLE_COLOUR_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <iosfwd>
namespace Catch {

View File

@ -8,7 +8,7 @@
#ifndef CATCH_ENFORCE_HPP_INCLUDED
#define CATCH_ENFORCE_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <catch2/internal/catch_stream.hpp>

View File

@ -9,7 +9,7 @@
#define CATCH_MESSAGE_INFO_HPP_INCLUDED
#include <catch2/internal/catch_result_type.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <string>

View File

@ -5,7 +5,7 @@
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <cstring>
#include <ostream>

View File

@ -5,11 +5,14 @@
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#ifndef CATCH_COMMON_HPP_INCLUDED
#define CATCH_COMMON_HPP_INCLUDED
#ifndef CATCH_SOURCE_LINE_INFO_HPP_INCLUDED
#define CATCH_SOURCE_LINE_INFO_HPP_INCLUDED
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <cstddef>
#include <iosfwd>
#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line
#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line )
#ifdef CATCH_CONFIG_COUNTER
@ -18,8 +21,6 @@
# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ )
#endif
#include <iosfwd>
// We need a dummy global operator<< so we can bring it into Catch namespace later
struct Catch_global_namespace_dummy {};
std::ostream& operator<<(std::ostream&, Catch_global_namespace_dummy);
@ -53,4 +54,4 @@ namespace Catch {
#define CATCH_INTERNAL_LINEINFO \
::Catch::SourceLineInfo( __FILE__, static_cast<std::size_t>( __LINE__ ) )
#endif // CATCH_COMMON_HPP_INCLUDED
#endif // CATCH_SOURCE_LINE_INFO_HPP_INCLUDED

View File

@ -5,7 +5,6 @@
// https://www.boost.org/LICENSE_1_0.txt)
// SPDX-License-Identifier: BSL-1.0
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/internal/catch_debug_console.hpp>

View File

@ -9,7 +9,7 @@
#define CATCH_TEST_CASE_TRACKER_HPP_INCLUDED
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <string>
#include <vector>

View File

@ -8,7 +8,7 @@
#ifndef CATCH_TEST_REGISTRY_HPP_INCLUDED
#define CATCH_TEST_REGISTRY_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <catch2/internal/catch_noncopyable.hpp>
#include <catch2/interfaces/catch_interfaces_testcase.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>

View File

@ -15,7 +15,7 @@
// and reports that calls to XmlEncode's op << are ambiguous between
// the declaration and definition.
// It also has to be in the header.
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_source_line_info.hpp>
#include <vector>

View File

@ -8,7 +8,6 @@
#ifndef CATCH_MATCHERS_HPP_INCLUDED
#define CATCH_MATCHERS_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/matchers/internal/catch_matchers_impl.hpp>
#include <string>

View File

@ -8,7 +8,6 @@
#ifndef CATCH_MATCHERS_PREDICATE_HPP_INCLUDED
#define CATCH_MATCHERS_PREDICATE_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/internal/catch_meta.hpp>

View File

@ -8,7 +8,6 @@
#ifndef CATCH_MATCHERS_TEMPLATED_HPP_INCLUDED
#define CATCH_MATCHERS_TEMPLATED_HPP_INCLUDED
#include <catch2/internal/catch_common.hpp>
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/internal/catch_stringref.hpp>