1
0
mirror of https://github.com/catchorg/Catch2.git synced 2025-01-16 07:08:01 +00:00

Compare commits

...

8 Commits

Author SHA1 Message Date
Martin Hořeňovský
7c97554565
Remove Obj-C(++) support 2020-04-24 20:42:52 +02:00
Martin Hořeňovský
e1e6872c4c
Standardize header names and file locations
This is both a really big and a really small commit. It is small in
that it only contains renaming, moving and modification of include
directives caused by this.

It is really big in the obvious way of touching something like 200
files.

The new rules for naming files is simple: headers use the `.hpp`
extension. The rules for physical file layout is still kinda in
progress, but the basics are also simple:
 * Significant parts of functionality get their own subfolder
   * Benchmarking is in `catch2/benchmark`
   * Matchers are in `catch2/matchers`
   * Generators are in `catch2/generators`
   * Reporters are in `catch2/reporters`
   * Baseline testing facilities are in `catch2/`
 * Various top level folders also contain `internal` subfolder,
   with files that users probably do not want to include directly,
   at least not until they have to write something like their own
   reporter.
    * The exact files in these subfolders is likely to change later
      on

Note that while some includes were cleaned up in this commit, it
is only the low hanging fruit and further cleanup using automatic
tooling will happen later.

Also note that various include guards, copyright notices and file
headers will also be standardized later, rather than in this commit.
2020-04-24 18:58:44 +02:00
Martin Hořeňovský
3836aa9ceb
Remove catch_user_interfaces
It used to be a file that would collect interfaces we always wanted
to provide to users, so that the single header stitching script
would place them in the common part of the single header version.

As v3 is moving to separate headers model, the file is no longer
useful.
2020-04-24 15:34:12 +02:00
Martin Hořeňovský
3f2ada03d5
Remove unused catch_impl.hpp header
It became useless when we moved away from the single-header model,
because it was used an entry point for stitching CPP into the single
header file.
2020-04-24 14:25:33 +02:00
Martin Hořeňovský
7892954c99
Remove global warning manipulation headers
They were unused except for one test file anyway.
2020-04-05 19:14:16 +02:00
Martin Hořeňovský
54a7eb1aed
Rename reporters to use .hpp suffix
I want to standardize _all_ of Catch2 headers on the `.hpp` suffix.
2020-04-05 19:10:57 +02:00
Martin Hořeňovský
151dccbd31
Remove catch.hpp
This was an old "include all" header, that we no longer want to be
usable, to make the include differences in new versions explicit.

We will introduce new "include all" headers later, in the form of
`catch_all.hpp`, `catch_matchers_all.hpp` and so on...
2020-03-29 21:32:13 +02:00
Martin Hořeňovský
4d63c36402
Update release notes with matcher changes 2020-03-29 14:57:29 +02:00
230 changed files with 701 additions and 1804 deletions

View File

@ -19,10 +19,7 @@ before moving to Catch2. You might also like to read [this blog post](https://le
## What's the Catch?
Catch2 is a multi-paradigm test framework for C++. which also supports
Objective-C (and maybe C).
It is primarily distributed as a single header file, although certain
extensions may require additional headers.
Catch2 is a multi-paradigm test framework for C++.
## How to use it
This documentation comprises these three parts:

View File

@ -61,7 +61,10 @@
* Various classes not designed for user-extension have been made final
* `ListeningReporter` is now `final`
* Concrete Matchers (e.g. `UnorderedEquals` vector matcher) are now `final`
* `ListeningReporter` is now final
* Matcher namespacing has been redone
* Matcher types are no longer in deeply nested namespaces
* Matcher factory functions are no longer brought into `Catch` namespace
* This means that all public-facing matcher-related functionality is now in `Catch::Matchers` namespace
### Improvements

View File

@ -4,7 +4,7 @@
// of a testing binary, and other test files to link against it.
// Let Catch provide main():
#include <catch2/catch_default_main.hpp>
#include <catch2/internal/catch_default_main.hpp>
// That's it

View File

@ -1,10 +1,10 @@
// 010-TestCase.cpp
// Let Catch provide main():
#include <catch2/catch_default_main.hpp>
#include <catch2/internal/catch_default_main.hpp>
// And write tests in the same file:
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
static int Factorial( int number ) {
return number <= 1 ? number : Factorial( number - 1 ) * number; // fail

View File

@ -4,9 +4,9 @@
// source code of Catch itself and reuse the resulting object file for linking.
// Let Catch provide main():
#include <catch2/catch_default_main.hpp>
#include <catch2/internal/catch_default_main.hpp>
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
TEST_CASE( "1: All test cases reside in other .cpp files (empty)", "[multi-file:1]" ) {
}

View File

@ -2,7 +2,7 @@
// main() provided by Catch in file 020-TestCase-1.cpp.
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
static int Factorial( int number ) {
return number <= 1 ? number : Factorial( number - 1 ) * number; // fail

View File

@ -10,7 +10,7 @@
// main() provided in 000-CatchMain.cpp
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
static std::string one() {
return "1";

View File

@ -2,7 +2,7 @@
// main() provided in 000-CatchMain.cpp
#include <catch2/catch.hpp>
#include <catch2/catch_test_macros.hpp>
SCENARIO( "vectors can be sized and resized", "[vector]" ) {

View File

@ -6,7 +6,7 @@
// there is no important difference between having `std::cerr` buffered
// or unbuffered.
#include <catch2/catch_default_main.hpp>
#include <catch2/internal/catch_default_main.hpp>
#include <catch2/catch_test_macros.hpp>

View File

@ -5,8 +5,8 @@
// It will have infinite capacity and settable lower/upper bound
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_generators.hpp>
#include <catch2/catch_generators_generic.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/generators/catch_generators_adapters.hpp>
#include <random>

View File

@ -3,7 +3,7 @@
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_generators_generic.hpp>
#include <catch2/generators/catch_generators_adapters.hpp>
#include <string>
#include <sstream>

View File

@ -7,8 +7,8 @@
// by value directly, or copied by the generators during construction.
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_generators_generic.hpp>
#include <catch2/catch_generators_specific.hpp>
#include <catch2/generators/catch_generators_adapters.hpp>
#include <catch2/generators/catch_generators_random.hpp>
TEST_CASE("Generate random doubles across different ranges",
"[generator][example][advanced]") {

View File

@ -10,8 +10,8 @@
// that.
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_generators_generic.hpp>
#include <catch2/catch_generators_specific.hpp>
#include <catch2/generators/catch_generators_adapters.hpp>
#include <catch2/generators/catch_generators_random.hpp>
TEST_CASE("Generate random doubles across different ranges",
"[generator][example][advanced]") {

View File

@ -33,46 +33,46 @@ set(BENCHMARK_SOURCES
SOURCE_GROUP("benchmark" FILES ${BENCHMARK_HEADERS} ${BENCHMARK_SOURCES})
set(INTERNAL_HEADERS
${SOURCES_DIR}/internal/catch_capture_matchers.h
${SOURCES_DIR}/internal/catch_capture_matchers.hpp
${SOURCES_DIR}/internal/catch_container_nonmembers.hpp
${SOURCES_DIR}/catch.hpp
${SOURCES_DIR}/catch_approx.h
${SOURCES_DIR}/catch_assertionhandler.h
${SOURCES_DIR}/catch_assertioninfo.h
${SOURCES_DIR}/catch_assertionresult.h
${SOURCES_DIR}/catch_capture.hpp
${SOURCES_DIR}/catch_clara.h
${SOURCES_DIR}/catch_commandline.h
${SOURCES_DIR}/catch_common.h
${SOURCES_DIR}/catch_compiler_capabilities.h
${SOURCES_DIR}/catch_approx.hpp
${SOURCES_DIR}/internal/catch_assertionhandler.hpp
${SOURCES_DIR}/catch_assertion_info.hpp
${SOURCES_DIR}/catch_assertion_result.hpp
${SOURCES_DIR}/internal/catch_capture.hpp
${SOURCES_DIR}/internal/catch_clara.hpp
${SOURCES_DIR}/internal/catch_commandline.hpp
${SOURCES_DIR}/internal/catch_common.hpp
${SOURCES_DIR}/internal/catch_compiler_capabilities.hpp
${SOURCES_DIR}/catch_config.hpp
${SOURCES_DIR}/catch_console_colour.h
${SOURCES_DIR}/catch_context.h
${SOURCES_DIR}/catch_debug_console.h
${SOURCES_DIR}/catch_debugger.h
${SOURCES_DIR}/catch_decomposer.h
${SOURCES_DIR}/catch_default_main.hpp
${SOURCES_DIR}/catch_enforce.h
${SOURCES_DIR}/catch_enum_values_registry.h
${SOURCES_DIR}/catch_errno_guard.h
${SOURCES_DIR}/catch_exception_translator_registry.h
${SOURCES_DIR}/catch_fatal_condition.h
${SOURCES_DIR}/catch_generator_exception.hpp
${SOURCES_DIR}/catch_generators.hpp
${SOURCES_DIR}/catch_generators_generic.hpp
${SOURCES_DIR}/catch_generators_specific.hpp
${SOURCES_DIR}/catch_impl.hpp
${SOURCES_DIR}/catch_interfaces_capture.h
${SOURCES_DIR}/catch_interfaces_config.h
${SOURCES_DIR}/catch_interfaces_enum_values_registry.h
${SOURCES_DIR}/catch_interfaces_exception.h
${SOURCES_DIR}/catch_interfaces_registry_hub.h
${SOURCES_DIR}/catch_interfaces_reporter.h
${SOURCES_DIR}/catch_interfaces_runner.h
${SOURCES_DIR}/catch_interfaces_tag_alias_registry.h
${SOURCES_DIR}/catch_interfaces_testcase.h
${SOURCES_DIR}/catch_leak_detector.h
${SOURCES_DIR}/catch_list.h
${SOURCES_DIR}/internal/catch_console_colour.hpp
${SOURCES_DIR}/internal/catch_context.hpp
${SOURCES_DIR}/internal/catch_debug_console.hpp
${SOURCES_DIR}/internal/catch_debugger.hpp
${SOURCES_DIR}/internal/catch_decomposer.hpp
${SOURCES_DIR}/internal/catch_default_main.hpp
${SOURCES_DIR}/internal/catch_enforce.hpp
${SOURCES_DIR}/internal/catch_enum_values_registry.hpp
${SOURCES_DIR}/internal/catch_errno_guard.hpp
${SOURCES_DIR}/internal/catch_exception_translator_registry.hpp
${SOURCES_DIR}/internal/catch_fatal_condition.hpp
${SOURCES_DIR}/generators/catch_generator_exception.hpp
${SOURCES_DIR}/generators/catch_generators.hpp
${SOURCES_DIR}/generators/catch_generators_adapters.hpp
${SOURCES_DIR}/generators/catch_generators_random.hpp
${SOURCES_DIR}/generators/catch_generators_range.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_capture.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_config.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_enum_values_registry.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_exception.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_generatortracker.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_reporter.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_runner.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_tag_alias_registry.hpp
${SOURCES_DIR}/interfaces/catch_interfaces_testcase.hpp
${SOURCES_DIR}/internal/catch_leak_detector.hpp
${SOURCES_DIR}/internal/catch_list.hpp
${SOURCES_DIR}/matchers/catch_matchers.hpp
${SOURCES_DIR}/matchers/catch_matchers_container_properties.hpp
${SOURCES_DIR}/matchers/catch_matchers_contains.hpp
@ -82,82 +82,77 @@ set(INTERNAL_HEADERS
${SOURCES_DIR}/matchers/catch_matchers_string.hpp
${SOURCES_DIR}/matchers/catch_matchers_templated.hpp
${SOURCES_DIR}/matchers/catch_matchers_vector.hpp
${SOURCES_DIR}/catch_message.h
${SOURCES_DIR}/catch_meta.hpp
${SOURCES_DIR}/catch_objc.hpp
${SOURCES_DIR}/catch_objc_arc.hpp
${SOURCES_DIR}/catch_option.hpp
${SOURCES_DIR}/catch_output_redirect.h
${SOURCES_DIR}/catch_platform.h
${SOURCES_DIR}/catch_polyfills.hpp
${SOURCES_DIR}/catch_preprocessor.hpp
${SOURCES_DIR}/catch_random_number_generator.h
${SOURCES_DIR}/catch_reenable_warnings.h
${SOURCES_DIR}/catch_message.hpp
${SOURCES_DIR}/internal/catch_meta.hpp
${SOURCES_DIR}/internal/catch_option.hpp
${SOURCES_DIR}/internal/catch_output_redirect.hpp
${SOURCES_DIR}/internal/catch_platform.hpp
${SOURCES_DIR}/internal/catch_polyfills.hpp
${SOURCES_DIR}/internal/catch_preprocessor.hpp
${SOURCES_DIR}/internal/catch_random_number_generator.hpp
${SOURCES_DIR}/catch_reporter_registrars.hpp
${SOURCES_DIR}/catch_reporter_registry.h
${SOURCES_DIR}/catch_result_type.h
${SOURCES_DIR}/catch_run_context.h
${SOURCES_DIR}/catch_section.h
${SOURCES_DIR}/catch_section_info.h
${SOURCES_DIR}/catch_session.h
${SOURCES_DIR}/catch_singletons.hpp
${SOURCES_DIR}/catch_startup_exception_registry.h
${SOURCES_DIR}/catch_stream.h
${SOURCES_DIR}/catch_stringref.h
${SOURCES_DIR}/catch_string_manip.h
${SOURCES_DIR}/catch_suppress_warnings.h
${SOURCES_DIR}/catch_tag_alias.h
${SOURCES_DIR}/catch_tag_alias_autoregistrar.h
${SOURCES_DIR}/catch_tag_alias_registry.h
${SOURCES_DIR}/catch_test_case_info.h
${SOURCES_DIR}/catch_test_case_registry_impl.h
${SOURCES_DIR}/catch_test_case_tracker.h
${SOURCES_DIR}/internal/catch_reporter_registry.hpp
${SOURCES_DIR}/internal/catch_result_type.hpp
${SOURCES_DIR}/internal/catch_run_context.hpp
${SOURCES_DIR}/internal/catch_section.hpp
${SOURCES_DIR}/catch_section_info.hpp
${SOURCES_DIR}/catch_session.hpp
${SOURCES_DIR}/internal/catch_singletons.hpp
${SOURCES_DIR}/internal/catch_startup_exception_registry.hpp
${SOURCES_DIR}/internal/catch_stream.hpp
${SOURCES_DIR}/catch_stringref.hpp
${SOURCES_DIR}/internal/catch_string_manip.hpp
${SOURCES_DIR}/catch_tag_alias.hpp
${SOURCES_DIR}/catch_tag_alias_autoregistrar.hpp
${SOURCES_DIR}/internal/catch_tag_alias_registry.hpp
${SOURCES_DIR}/catch_test_case_info.hpp
${SOURCES_DIR}/internal/catch_test_case_registry_impl.hpp
${SOURCES_DIR}/internal/catch_test_case_tracker.hpp
${SOURCES_DIR}/catch_test_macros.hpp
${SOURCES_DIR}/catch_test_registry.h
${SOURCES_DIR}/catch_test_spec.h
${SOURCES_DIR}/catch_test_spec_parser.h
${SOURCES_DIR}/catch_text.h
${SOURCES_DIR}/catch_timer.h
${SOURCES_DIR}/catch_to_string.hpp
${SOURCES_DIR}/catch_tostring.h
${SOURCES_DIR}/catch_totals.h
${SOURCES_DIR}/catch_uncaught_exceptions.h
${SOURCES_DIR}/catch_user_interfaces.h
${SOURCES_DIR}/catch_version.h
${SOURCES_DIR}/internal/catch_test_registry.hpp
${SOURCES_DIR}/catch_test_spec.hpp
${SOURCES_DIR}/internal/catch_test_spec_parser.hpp
${SOURCES_DIR}/internal/catch_text.hpp
${SOURCES_DIR}/catch_timer.hpp
${SOURCES_DIR}/internal/catch_to_string.hpp
${SOURCES_DIR}/catch_tostring.hpp
${SOURCES_DIR}/catch_totals.hpp
${SOURCES_DIR}/internal/catch_uncaught_exceptions.hpp
${SOURCES_DIR}/catch_version.hpp
${SOURCES_DIR}/catch_version_macros.hpp
${SOURCES_DIR}/catch_wildcard_pattern.h
${SOURCES_DIR}/catch_windows_h_proxy.h
${SOURCES_DIR}/catch_xmlwriter.h
${SOURCES_DIR}/internal/catch_wildcard_pattern.hpp
${SOURCES_DIR}/internal/catch_windows_h_proxy.hpp
${SOURCES_DIR}/internal/catch_xmlwriter.hpp
)
set(IMPL_SOURCES
${SOURCES_DIR}/catch_approx.cpp
${SOURCES_DIR}/catch_assertionhandler.cpp
${SOURCES_DIR}/catch_assertionresult.cpp
${SOURCES_DIR}/internal/catch_assertionhandler.cpp
${SOURCES_DIR}/catch_assertion_result.cpp
${SOURCES_DIR}/internal/catch_capture_matchers.cpp
${SOURCES_DIR}/catch_commandline.cpp
${SOURCES_DIR}/catch_common.cpp
${SOURCES_DIR}/internal/catch_commandline.cpp
${SOURCES_DIR}/internal/catch_common.cpp
${SOURCES_DIR}/catch_config.cpp
${SOURCES_DIR}/catch_console_colour.cpp
${SOURCES_DIR}/catch_context.cpp
${SOURCES_DIR}/catch_debug_console.cpp
${SOURCES_DIR}/catch_debugger.cpp
${SOURCES_DIR}/catch_decomposer.cpp
${SOURCES_DIR}/catch_enforce.cpp
${SOURCES_DIR}/catch_enum_values_registry.cpp
${SOURCES_DIR}/catch_errno_guard.cpp
${SOURCES_DIR}/catch_exception_translator_registry.cpp
${SOURCES_DIR}/catch_fatal_condition.cpp
${SOURCES_DIR}/catch_generator_exception.cpp
${SOURCES_DIR}/catch_generators.cpp
${SOURCES_DIR}/catch_interfaces_capture.cpp
${SOURCES_DIR}/catch_interfaces_config.cpp
${SOURCES_DIR}/catch_interfaces_exception.cpp
${SOURCES_DIR}/catch_interfaces_generatortracker.h
${SOURCES_DIR}/catch_interfaces_registry_hub.cpp
${SOURCES_DIR}/catch_interfaces_runner.cpp
${SOURCES_DIR}/catch_interfaces_testcase.cpp
${SOURCES_DIR}/catch_list.cpp
${SOURCES_DIR}/catch_leak_detector.cpp
${SOURCES_DIR}/internal/catch_console_colour.cpp
${SOURCES_DIR}/internal/catch_context.cpp
${SOURCES_DIR}/internal/catch_debug_console.cpp
${SOURCES_DIR}/internal/catch_debugger.cpp
${SOURCES_DIR}/internal/catch_decomposer.cpp
${SOURCES_DIR}/internal/catch_enforce.cpp
${SOURCES_DIR}/internal/catch_enum_values_registry.cpp
${SOURCES_DIR}/internal/catch_errno_guard.cpp
${SOURCES_DIR}/internal/catch_exception_translator_registry.cpp
${SOURCES_DIR}/internal/catch_fatal_condition.cpp
${SOURCES_DIR}/generators/catch_generator_exception.cpp
${SOURCES_DIR}/generators/catch_generators.cpp
${SOURCES_DIR}/interfaces/catch_interfaces_capture.cpp
${SOURCES_DIR}/interfaces/catch_interfaces_config.cpp
${SOURCES_DIR}/interfaces/catch_interfaces_exception.cpp
${SOURCES_DIR}/interfaces/catch_interfaces_registry_hub.cpp
${SOURCES_DIR}/interfaces/catch_interfaces_reporter.cpp
${SOURCES_DIR}/interfaces/catch_interfaces_runner.cpp
${SOURCES_DIR}/interfaces/catch_interfaces_testcase.cpp
${SOURCES_DIR}/internal/catch_list.cpp
${SOURCES_DIR}/internal/catch_leak_detector.cpp
${SOURCES_DIR}/matchers/catch_matchers.cpp
${SOURCES_DIR}/matchers/catch_matchers_container_properties.cpp
${SOURCES_DIR}/matchers/catch_matchers_exception.cpp
@ -166,37 +161,36 @@ set(IMPL_SOURCES
${SOURCES_DIR}/matchers/catch_matchers_string.cpp
${SOURCES_DIR}/matchers/catch_matchers_templated.cpp
${SOURCES_DIR}/catch_message.cpp
${SOURCES_DIR}/catch_output_redirect.cpp
${SOURCES_DIR}/internal/catch_output_redirect.cpp
${SOURCES_DIR}/catch_registry_hub.cpp
${SOURCES_DIR}/catch_interfaces_reporter.cpp
${SOURCES_DIR}/catch_polyfills.cpp
${SOURCES_DIR}/catch_random_number_generator.cpp
${SOURCES_DIR}/catch_reporter_registry.cpp
${SOURCES_DIR}/catch_result_type.cpp
${SOURCES_DIR}/catch_run_context.cpp
${SOURCES_DIR}/catch_section.cpp
${SOURCES_DIR}/internal/catch_polyfills.cpp
${SOURCES_DIR}/internal/catch_random_number_generator.cpp
${SOURCES_DIR}/internal/catch_reporter_registry.cpp
${SOURCES_DIR}/internal/catch_result_type.cpp
${SOURCES_DIR}/internal/catch_run_context.cpp
${SOURCES_DIR}/internal/catch_section.cpp
${SOURCES_DIR}/catch_session.cpp
${SOURCES_DIR}/catch_singletons.cpp
${SOURCES_DIR}/catch_startup_exception_registry.cpp
${SOURCES_DIR}/catch_stream.cpp
${SOURCES_DIR}/catch_stringref.cpp
${SOURCES_DIR}/catch_string_manip.cpp
${SOURCES_DIR}/internal/catch_singletons.cpp
${SOURCES_DIR}/internal/catch_startup_exception_registry.cpp
${SOURCES_DIR}/internal/catch_stream.cpp
${SOURCES_DIR}/internal/catch_stringref.cpp
${SOURCES_DIR}/internal/catch_string_manip.cpp
${SOURCES_DIR}/catch_tag_alias.cpp
${SOURCES_DIR}/catch_tag_alias_autoregistrar.cpp
${SOURCES_DIR}/catch_tag_alias_registry.cpp
${SOURCES_DIR}/internal/catch_tag_alias_registry.cpp
${SOURCES_DIR}/catch_test_case_info.cpp
${SOURCES_DIR}/catch_test_case_registry_impl.cpp
${SOURCES_DIR}/catch_test_case_tracker.cpp
${SOURCES_DIR}/catch_test_registry.cpp
${SOURCES_DIR}/internal/catch_test_case_registry_impl.cpp
${SOURCES_DIR}/internal/catch_test_case_tracker.cpp
${SOURCES_DIR}/internal/catch_test_registry.cpp
${SOURCES_DIR}/catch_test_spec.cpp
${SOURCES_DIR}/catch_test_spec_parser.cpp
${SOURCES_DIR}/internal/catch_test_spec_parser.cpp
${SOURCES_DIR}/catch_timer.cpp
${SOURCES_DIR}/catch_tostring.cpp
${SOURCES_DIR}/catch_totals.cpp
${SOURCES_DIR}/catch_uncaught_exceptions.cpp
${SOURCES_DIR}/internal/catch_uncaught_exceptions.cpp
${SOURCES_DIR}/catch_version.cpp
${SOURCES_DIR}/catch_wildcard_pattern.cpp
${SOURCES_DIR}/catch_xmlwriter.cpp
${SOURCES_DIR}/internal/catch_wildcard_pattern.cpp
${SOURCES_DIR}/internal/catch_xmlwriter.cpp
)
set(INTERNAL_FILES ${IMPL_SOURCES} ${INTERNAL_HEADERS})
CheckFileList(INTERNAL_FILES ${SOURCES_DIR}/internal)
@ -205,14 +199,14 @@ CheckFileList(INTERNAL_FILES ${SOURCES_DIR}/internal)
set(REPORTER_HEADERS
${SOURCES_DIR}/reporters/catch_reporter_automake.hpp
${SOURCES_DIR}/reporters/catch_reporter_bases.hpp
${SOURCES_DIR}/reporters/catch_reporter_compact.h
${SOURCES_DIR}/reporters/catch_reporter_console.h
${SOURCES_DIR}/reporters/catch_reporter_junit.h
${SOURCES_DIR}/reporters/catch_reporter_listening.h
${SOURCES_DIR}/reporters/catch_reporter_compact.hpp
${SOURCES_DIR}/reporters/catch_reporter_console.hpp
${SOURCES_DIR}/reporters/catch_reporter_junit.hpp
${SOURCES_DIR}/reporters/catch_reporter_listening.hpp
${SOURCES_DIR}/reporters/catch_reporter_sonarqube.hpp
${SOURCES_DIR}/reporters/catch_reporter_tap.hpp
${SOURCES_DIR}/reporters/catch_reporter_teamcity.hpp
${SOURCES_DIR}/reporters/catch_reporter_xml.h
${SOURCES_DIR}/reporters/catch_reporter_xml.hpp
)
set(REPORTER_SOURCES
${SOURCES_DIR}/reporters/catch_reporter_automake.cpp
@ -275,7 +269,7 @@ target_include_directories(Catch2
add_library(Catch2Main STATIC
${SOURCES_DIR}/catch_main.cpp
${SOURCES_DIR}/internal/catch_main.cpp
)
add_library(Catch2::Catch2Main ALIAS Catch2Main)
target_link_libraries(Catch2Main PUBLIC Catch2)

View File

@ -11,9 +11,8 @@
#define TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
#include <catch2/catch_config.hpp>
#include <catch2/catch_context.h>
#include <catch2/catch_interfaces_reporter.h>
#include <catch2/catch_test_registry.h>
#include <catch2/internal/catch_context.hpp>
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/benchmark/catch_chronometer.hpp>
#include <catch2/benchmark/catch_clock.hpp>

View File

@ -14,7 +14,7 @@
#include <catch2/benchmark/catch_clock.hpp>
#include <catch2/benchmark/catch_optimizer.hpp>
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
#include <catch2/catch_meta.hpp>
#include <catch2/internal/catch_meta.hpp>
namespace Catch {
namespace Benchmark {

View File

@ -13,7 +13,7 @@
#include <catch2/benchmark/catch_chronometer.hpp>
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
#include <catch2/catch_meta.hpp>
#include <catch2/internal/catch_meta.hpp>
#include <cassert>
#include <type_traits>

View File

@ -11,9 +11,9 @@
#ifndef TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
#include <catch2/catch_enforce.h>
#include <catch2/catch_interfaces_capture.h>
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <type_traits>
#include <utility>

View File

@ -7,7 +7,7 @@
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
#include <exception>
#include <catch2/catch_enforce.h>
#include <catch2/internal/catch_enforce.hpp>
namespace Catch {
namespace Benchmark {

View File

@ -16,7 +16,7 @@
#include <catch2/benchmark/detail/catch_measure.hpp>
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
#include <catch2/benchmark/detail/catch_timing.hpp>
#include <catch2/catch_meta.hpp>
#include <catch2/internal/catch_meta.hpp>
#include <utility>
#include <type_traits>

View File

@ -10,7 +10,7 @@
#include <catch2/benchmark/detail/catch_stats.hpp>
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <cassert>
#include <random>

View File

@ -1,56 +0,0 @@
/*
* Created by Phil on 22/10/2010.
* Copyright 2010 Two Blue Cubes Ltd
*
* 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_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
#include <catch2/catch_version_macros.hpp>
#include <catch2/catch_suppress_warnings.h>
#if !defined(CATCH_CONFIG_IMPL_ONLY)
#include <catch2/catch_platform.h>
#include <catch2/catch_user_interfaces.h>
#include <catch2/catch_tag_alias_autoregistrar.h>
#include <catch2/catch_test_registry.h>
#include <catch2/catch_capture.hpp>
#include <catch2/catch_section.h>
#include <catch2/catch_interfaces_exception.h>
#include <catch2/catch_approx.h>
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/catch_string_manip.h>
#include <catch2/catch_generators.hpp>
#include <catch2/catch_generators_generic.hpp>
#include <catch2/catch_generators_specific.hpp>
// These files are included here so the single_include script doesn't put them
// in the conditionally compiled sections
#include <catch2/catch_test_case_info.h>
#include <catch2/catch_interfaces_runner.h>
#ifdef __OBJC__
#include <catch2/catch_objc.hpp>
#endif
#endif // ! CATCH_CONFIG_IMPL_ONLY
#if !defined(CATCH_CONFIG_IMPL_ONLY)
#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED
# undef CLARA_CONFIG_MAIN
#endif
#include <catch2/catch_test_macros.hpp>
#endif // ! CATCH_CONFIG_IMPL_ONLY
#include <catch2/catch_reenable_warnings.h>
#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED

View File

@ -6,8 +6,8 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_approx.h>
#include <catch2/catch_enforce.h>
#include <catch2/catch_approx.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <cmath>
#include <limits>

View File

@ -8,7 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_APPROX_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_APPROX_HPP_INCLUDED
#include <catch2/catch_tostring.h>
#include <catch2/catch_tostring.hpp>
#include <type_traits>
@ -17,9 +17,9 @@ namespace Catch {
class Approx {
private:
bool equalityComparisonImpl(double other) const;
//! Sets and validates the new margin (margin >= 0)
// Sets and validates the new margin (margin >= 0)
void setMargin(double margin);
//! Sets and validates the new epsilon (0 < epsilon < 1)
// Sets and validates the new epsilon (0 < epsilon < 1)
void setEpsilon(double epsilon);
public:

View File

@ -8,9 +8,9 @@
#ifndef TWOBLUECUBES_CATCH_ASSERTIONINFO_H_INCLUDED
#define TWOBLUECUBES_CATCH_ASSERTIONINFO_H_INCLUDED
#include <catch2/catch_result_type.h>
#include <catch2/catch_common.h>
#include <catch2/catch_stringref.h>
#include <catch2/internal/catch_result_type.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/catch_stringref.hpp>
namespace Catch {

View File

@ -6,7 +6,7 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_assertionresult.h>
#include <catch2/catch_assertion_result.hpp>
namespace Catch {
AssertionResultData::AssertionResultData(ResultWas::OfType _resultType, LazyExpression const & _lazyExpression):

View File

@ -9,11 +9,11 @@
#define TWOBLUECUBES_CATCH_ASSERTIONRESULT_H_INCLUDED
#include <string>
#include <catch2/catch_assertioninfo.h>
#include <catch2/catch_result_type.h>
#include <catch2/catch_common.h>
#include <catch2/catch_stringref.h>
#include <catch2/catch_assertionhandler.h>
#include <catch2/catch_assertion_info.hpp>
#include <catch2/internal/catch_result_type.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/catch_stringref.hpp>
#include <catch2/internal/catch_assertionhandler.hpp>
namespace Catch {

View File

@ -6,9 +6,11 @@
*/
#include <catch2/catch_config.hpp>
#include <catch2/catch_enforce.h>
#include <catch2/catch_stream.h>
#include <catch2/catch_stringref.h>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/catch_stringref.hpp>
#include <catch2/internal/catch_string_manip.hpp>
#include <catch2/internal/catch_test_spec_parser.hpp>
namespace Catch {

View File

@ -8,8 +8,8 @@
#ifndef TWOBLUECUBES_CATCH_CONFIG_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_CONFIG_HPP_INCLUDED
#include <catch2/catch_test_spec_parser.h>
#include <catch2/catch_interfaces_config.h>
#include <catch2/catch_test_spec.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <memory>
#include <vector>

View File

@ -1,33 +0,0 @@
/*
* Created by Phil on 5/8/2012.
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
*
* 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_IMPL_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
// Keep these here for external reporters
#include <catch2/catch_test_spec.h>
#include <catch2/catch_test_case_tracker.h>
#include <catch2/catch_leak_detector.h>
// Cpp files will be included in the single-header file here
// ~*~* CATCH_CPP_STITCH_PLACE *~*~
namespace Catch {
LeakDetector leakDetector;
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TWOBLUECUBES_CATCH_IMPL_HPP_INCLUDED

View File

@ -1,5 +0,0 @@
#include <catch2/catch_interfaces_config.h>
namespace Catch {
IConfig::~IConfig() = default;
}

View File

@ -1,5 +0,0 @@
#include <catch2/catch_interfaces_runner.h>
namespace Catch {
IRunner::~IRunner() = default;
}

View File

@ -6,10 +6,10 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_message.h>
#include <catch2/catch_interfaces_capture.h>
#include <catch2/catch_uncaught_exceptions.h>
#include <catch2/catch_enforce.h>
#include <catch2/catch_message.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/internal/catch_uncaught_exceptions.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <cassert>
#include <stack>

View File

@ -8,11 +8,11 @@
#ifndef TWOBLUECUBES_CATCH_MESSAGE_H_INCLUDED
#define TWOBLUECUBES_CATCH_MESSAGE_H_INCLUDED
#include <catch2/catch_result_type.h>
#include <catch2/catch_common.h>
#include <catch2/catch_stream.h>
#include <catch2/catch_interfaces_capture.h>
#include <catch2/catch_tostring.h>
#include <catch2/internal/catch_result_type.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/catch_tostring.hpp>
#include <string>
#include <vector>

View File

@ -1,212 +0,0 @@
/*
* Created by Phil on 14/11/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* 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_OBJC_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_OBJC_HPP_INCLUDED
#include <catch2/catch_objc_arc.hpp>
#import <objc/runtime.h>
#include <string>
// NB. Any general catch headers included here must be included
// in catch.hpp first to make sure they are included by the single
// header for non obj-usage
#include <catch2/catch_test_case_info.h>
#include <catch2/catch_string_manip.h>
#include <catch2/catch_tostring.h>
///////////////////////////////////////////////////////////////////////////////
// This protocol is really only here for (self) documenting purposes, since
// all its methods are optional.
@protocol OcFixture
@optional
-(void) setUp;
-(void) tearDown;
@end
namespace Catch {
class OcMethod : public ITestInvoker {
public:
OcMethod( Class cls, SEL sel ) : m_cls( cls ), m_sel( sel ) {}
virtual void invoke() const {
id obj = [[m_cls alloc] init];
performOptionalSelector( obj, @selector(setUp) );
performOptionalSelector( obj, m_sel );
performOptionalSelector( obj, @selector(tearDown) );
arcSafeRelease( obj );
}
private:
virtual ~OcMethod() {}
Class m_cls;
SEL m_sel;
};
namespace Detail{
inline std::string getAnnotation( Class cls,
std::string const& annotationName,
std::string const& testCaseName ) {
NSString* selStr = [[NSString alloc] initWithFormat:@"Catch_%s_%s", annotationName.c_str(), testCaseName.c_str()];
SEL sel = NSSelectorFromString( selStr );
arcSafeRelease( selStr );
id value = performOptionalSelector( cls, sel );
if( value )
return [(NSString*)value UTF8String];
return "";
}
}
inline std::size_t registerTestMethods() {
std::size_t noTestMethods = 0;
int noClasses = objc_getClassList( nullptr, 0 );
Class* classes = (CATCH_UNSAFE_UNRETAINED Class *)malloc( sizeof(Class) * noClasses);
objc_getClassList( classes, noClasses );
for( int c = 0; c < noClasses; c++ ) {
Class cls = classes[c];
{
u_int count;
Method* methods = class_copyMethodList( cls, &count );
for( u_int m = 0; m < count ; m++ ) {
SEL selector = method_getName(methods[m]);
std::string methodName = sel_getName(selector);
if( startsWith( methodName, "Catch_TestCase_" ) ) {
std::string testCaseName = methodName.substr( 15 );
std::string name = Detail::getAnnotation( cls, "Name", testCaseName );
std::string desc = Detail::getAnnotation( cls, "Description", testCaseName );
const char* className = class_getName( cls );
getMutableRegistryHub().registerTest( makeTestCaseInfo( new OcMethod( cls, selector ), className, NameAndTags( name.c_str(), desc.c_str() ), SourceLineInfo("",0) ) );
noTestMethods++;
}
}
free(methods);
}
}
return noTestMethods;
}
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] ){}
StringHolder() {
arcSafeRelease( m_substr );
}
bool match( NSString* str ) const override {
return false;
}
NSString* CATCH_ARC_STRONG m_substr;
};
struct Equals : StringHolder {
Equals( NSString* substr ) : StringHolder( substr ){}
bool match( NSString* str ) const override {
return (str != nil || m_substr == nil ) &&
[str isEqualToString:m_substr];
}
std::string describe() const override {
return "equals string: " + Catch::Detail::stringify( m_substr );
}
};
struct Contains : StringHolder {
Contains( NSString* substr ) : StringHolder( substr ){}
bool match( NSString* str ) const override {
return (str != nil || m_substr == nil ) &&
[str rangeOfString:m_substr].location != NSNotFound;
}
std::string describe() const override {
return "contains string: " + Catch::Detail::stringify( m_substr );
}
};
struct StartsWith : StringHolder {
StartsWith( NSString* substr ) : StringHolder( substr ){}
bool match( NSString* str ) const override {
return (str != nil || m_substr == nil ) &&
[str rangeOfString:m_substr].location == 0;
}
std::string describe() const override {
return "starts with: " + Catch::Detail::stringify( m_substr );
}
};
struct EndsWith : StringHolder {
EndsWith( NSString* substr ) : StringHolder( substr ){}
bool match( NSString* str ) const override {
return (str != nil || m_substr == nil ) &&
[str rangeOfString:m_substr].location == [str length] - [m_substr length];
}
std::string describe() const override {
return "ends with: " + Catch::Detail::stringify( m_substr );
}
};
} // namespace NSStringMatchers
} // namespace Impl
inline Impl::NSStringMatchers::Equals
Equals( NSString* substr ){ return Impl::NSStringMatchers::Equals( substr ); }
inline Impl::NSStringMatchers::Contains
Contains( NSString* substr ){ return Impl::NSStringMatchers::Contains( substr ); }
inline Impl::NSStringMatchers::StartsWith
StartsWith( NSString* substr ){ return Impl::NSStringMatchers::StartsWith( substr ); }
inline Impl::NSStringMatchers::EndsWith
EndsWith( NSString* substr ){ return Impl::NSStringMatchers::EndsWith( substr ); }
} // namespace Matchers
using namespace Matchers;
} // namespace Catch
///////////////////////////////////////////////////////////////////////////////
#define OC_MAKE_UNIQUE_NAME( root, uniqueSuffix ) root##uniqueSuffix
#define OC_TEST_CASE2( name, desc, uniqueSuffix ) \
+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Name_test_, uniqueSuffix ) \
{ \
return @ name; \
} \
+(NSString*) OC_MAKE_UNIQUE_NAME( Catch_Description_test_, uniqueSuffix ) \
{ \
return @ desc; \
} \
-(void) OC_MAKE_UNIQUE_NAME( Catch_TestCase_test_, uniqueSuffix )
#define OC_TEST_CASE( name, desc ) OC_TEST_CASE2( name, desc, __LINE__ )
#endif // TWOBLUECUBES_CATCH_OBJC_HPP_INCLUDED

View File

@ -1,51 +0,0 @@
/*
* Created by Phil on 1/08/2012.
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
*
* 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_OBJC_ARC_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_OBJC_ARC_HPP_INCLUDED
#import <Foundation/Foundation.h>
#ifdef __has_feature
#define CATCH_ARC_ENABLED __has_feature(objc_arc)
#else
#define CATCH_ARC_ENABLED 0
#endif
void arcSafeRelease( NSObject* obj );
id performOptionalSelector( id obj, SEL sel );
#if !CATCH_ARC_ENABLED
inline void arcSafeRelease( NSObject* obj ) {
[obj release];
}
inline id performOptionalSelector( id obj, SEL sel ) {
if( [obj respondsToSelector: sel] )
return [obj performSelector: sel];
return nil;
}
#define CATCH_UNSAFE_UNRETAINED
#define CATCH_ARC_STRONG
#else
inline void arcSafeRelease( NSObject* ){}
inline id performOptionalSelector( id obj, SEL sel ) {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Warc-performSelector-leaks"
#endif
if( [obj respondsToSelector: sel] )
return [obj performSelector: sel];
#ifdef __clang__
#pragma clang diagnostic pop
#endif
return nil;
}
#define CATCH_UNSAFE_UNRETAINED __unsafe_unretained
#define CATCH_ARC_STRONG __strong
#endif
#endif // TWOBLUECUBES_CATCH_OBJC_ARC_HPP_INCLUDED

View File

@ -1,21 +0,0 @@
/*
* Copyright 2014 Two Blue Cubes Ltd
*
* 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_REENABLE_WARNINGS_H_INCLUDED
#define TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
#ifdef __clang__
# ifdef __ICC // icpc defines the __clang__ macro
# pragma warning(pop)
# else
# pragma clang diagnostic pop
# endif
#elif defined __GNUC__
# pragma GCC diagnostic pop
#endif
#endif // TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED

View File

@ -6,16 +6,16 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/catch_context.h>
#include <catch2/catch_test_case_registry_impl.h>
#include <catch2/catch_reporter_registry.h>
#include <catch2/catch_exception_translator_registry.h>
#include <catch2/catch_tag_alias_registry.h>
#include <catch2/catch_startup_exception_registry.h>
#include <catch2/catch_singletons.hpp>
#include <catch2/catch_enum_values_registry.h>
#include <catch2/internal/catch_context.hpp>
#include <catch2/internal/catch_test_case_registry_impl.hpp>
#include <catch2/internal/catch_reporter_registry.hpp>
#include <catch2/internal/catch_exception_translator_registry.hpp>
#include <catch2/internal/catch_tag_alias_registry.hpp>
#include <catch2/internal/catch_startup_exception_registry.hpp>
#include <catch2/internal/catch_singletons.hpp>
#include <catch2/internal/catch_enum_values_registry.hpp>
namespace Catch {

View File

@ -9,7 +9,7 @@
#ifndef TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
namespace Catch {

View File

@ -8,9 +8,9 @@
#ifndef TWOBLUECUBES_CATCH_SECTION_INFO_H_INCLUDED
#define TWOBLUECUBES_CATCH_SECTION_INFO_H_INCLUDED
#include <catch2/catch_common.h>
#include <catch2/catch_stringref.h>
#include <catch2/catch_totals.h>
#include <catch2/internal/catch_common.hpp>
#include <catch2/catch_stringref.hpp>
#include <catch2/catch_totals.hpp>
#include <string>

View File

@ -5,23 +5,22 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_session.h>
#include <catch2/catch_commandline.h>
#include <catch2/catch_console_colour.h>
#include <catch2/catch_enforce.h>
#include <catch2/catch_list.h>
#include <catch2/catch_context.h>
#include <catch2/catch_run_context.h>
#include <catch2/catch_stream.h>
#include <catch2/catch_test_spec.h>
#include <catch2/catch_version.h>
#include <catch2/catch_interfaces_reporter.h>
#include <catch2/catch_random_number_generator.h>
#include <catch2/catch_startup_exception_registry.h>
#include <catch2/catch_text.h>
#include <catch2/catch_stream.h>
#include <catch2/catch_windows_h_proxy.h>
#include <catch2/reporters/catch_reporter_listening.h>
#include <catch2/catch_session.hpp>
#include <catch2/internal/catch_console_colour.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/internal/catch_list.hpp>
#include <catch2/internal/catch_context.hpp>
#include <catch2/internal/catch_run_context.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/catch_test_spec.hpp>
#include <catch2/catch_version.hpp>
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/internal/catch_random_number_generator.hpp>
#include <catch2/internal/catch_startup_exception_registry.hpp>
#include <catch2/internal/catch_text.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/internal/catch_windows_h_proxy.hpp>
#include <catch2/reporters/catch_reporter_listening.hpp>
#include <cstdlib>
#include <iomanip>

View File

@ -8,9 +8,9 @@
#ifndef TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_RUNNER_HPP_INCLUDED
#include <catch2/catch_commandline.h>
#include <catch2/internal/catch_commandline.hpp>
#include <catch2/catch_config.hpp>
#include <catch2/catch_text.h>
#include <catch2/internal/catch_text.hpp>
#include <memory>

View File

@ -1,27 +0,0 @@
/*
* Copyright 2014 Two Blue Cubes Ltd
*
* 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)
*/
#ifdef __clang__
# ifdef __ICC // icpc defines the __clang__ macro
# pragma warning(push)
# pragma warning(disable: 161 1682)
# else // __ICC
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wpadded"
# pragma clang diagnostic ignored "-Wswitch-enum"
# pragma clang diagnostic ignored "-Wcovered-switch-default"
# endif
#elif defined __GNUC__
// Because REQUIREs trigger GCC's -Wparentheses, and because still
// supported version of g++ have only buggy support for _Pragmas,
// Wparentheses have to be suppressed globally.
# pragma GCC diagnostic ignored "-Wparentheses" // See #674 for details
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wunused-variable"
# pragma GCC diagnostic ignored "-Wpadded"
#endif

View File

@ -1,4 +1,4 @@
#include <catch2/catch_tag_alias.h>
#include <catch2/catch_tag_alias.hpp>
namespace Catch {
TagAlias::TagAlias(std::string const & _tag, SourceLineInfo _lineInfo): tag(_tag), lineInfo(_lineInfo) {}

View File

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

View File

@ -1,6 +1,6 @@
#include <catch2/catch_tag_alias_autoregistrar.h>
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/catch_tag_alias_autoregistrar.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
namespace Catch {

View File

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

View File

@ -6,11 +6,11 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_test_case_info.h>
#include <catch2/catch_enforce.h>
#include <catch2/catch_test_spec.h>
#include <catch2/catch_interfaces_testcase.h>
#include <catch2/catch_string_manip.h>
#include <catch2/catch_test_case_info.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/catch_test_spec.hpp>
#include <catch2/interfaces/catch_interfaces_testcase.hpp>
#include <catch2/internal/catch_string_manip.hpp>
#include <cctype>
#include <exception>

View File

@ -8,9 +8,9 @@
#ifndef TWOBLUECUBES_CATCH_TEST_CASE_INFO_H_INCLUDED
#define TWOBLUECUBES_CATCH_TEST_CASE_INFO_H_INCLUDED
#include <catch2/catch_common.h>
#include <catch2/catch_stringref.h>
#include <catch2/catch_test_registry.h>
#include <catch2/internal/catch_common.hpp>
#include <catch2/catch_stringref.hpp>
#include <catch2/internal/catch_test_registry.hpp>
#include <string>
#include <vector>

View File

@ -6,11 +6,11 @@
#ifndef TWOBLUECUBES_CATCH_TEST_MACROS_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_TEST_MACROS_HPP_INCLUDED
#include <catch2/catch_capture.hpp>
#include <catch2/catch_interfaces_exception.h>
#include <catch2/catch_preprocessor.hpp>
#include <catch2/catch_section.h>
#include <catch2/catch_test_registry.h>
#include <catch2/internal/catch_capture.hpp>
#include <catch2/interfaces/catch_interfaces_exception.hpp>
#include <catch2/internal/catch_preprocessor.hpp>
#include <catch2/internal/catch_section.hpp>
#include <catch2/internal/catch_test_registry.hpp>
#if !defined(CATCH_CONFIG_DISABLE)
//////

View File

@ -5,9 +5,10 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_test_spec.h>
#include <catch2/catch_string_manip.h>
#include <catch2/catch_interfaces_config.h>
#include <catch2/catch_test_spec.hpp>
#include <catch2/internal/catch_string_manip.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/catch_test_case_info.hpp>
#include <algorithm>
#include <string>

View File

@ -13,8 +13,7 @@
#pragma clang diagnostic ignored "-Wpadded"
#endif
#include <catch2/catch_wildcard_pattern.h>
#include <catch2/catch_test_case_info.h>
#include <catch2/internal/catch_wildcard_pattern.hpp>
#include <string>
#include <vector>
@ -23,6 +22,8 @@
namespace Catch {
struct IConfig;
struct TestCaseInfo;
class TestCaseHandle;
class TestSpec {

View File

@ -6,7 +6,7 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_timer.h>
#include <catch2/catch_timer.hpp>
#include <chrono>

View File

@ -13,10 +13,10 @@
#endif
#include <catch2/catch_tostring.h>
#include <catch2/catch_interfaces_config.h>
#include <catch2/catch_context.h>
#include <catch2/catch_polyfills.hpp>
#include <catch2/catch_tostring.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_context.hpp>
#include <catch2/internal/catch_polyfills.hpp>
#include <cmath>
#include <iomanip>

View File

@ -13,18 +13,14 @@
#include <cstddef>
#include <type_traits>
#include <string>
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/catch_stream.h>
#include <catch2/catch_interfaces_enum_values_registry.h>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/interfaces/catch_interfaces_enum_values_registry.hpp>
#ifdef CATCH_CONFIG_CPP17_STRING_VIEW
#include <string_view>
#endif
#ifdef __OBJC__
#include <catch2/catch_objc_arc.hpp>
#endif
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4180) // We attempt to stream a function (address) by const&, which MSVC complains about but is harmless
@ -323,30 +319,6 @@ namespace Catch {
}
}
#ifdef __OBJC__
template<>
struct StringMaker<NSString*> {
static std::string convert(NSString * nsstring) {
if (!nsstring)
return "nil";
return std::string("@") + [nsstring UTF8String];
}
};
template<>
struct StringMaker<NSObject*> {
static std::string convert(NSObject* nsObject) {
return ::Catch::Detail::stringify([nsObject description]);
}
};
namespace Detail {
inline std::string stringify( NSString* nsstring ) {
return StringMaker<NSString*>::convert( nsstring );
}
} // namespace Detail
#endif // __OBJC__
} // namespace Catch
//////////////////////////////////////////////////////
@ -648,7 +620,7 @@ struct ratio_string<std::milli> {
};
}
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#define INTERNAL_CATCH_REGISTER_ENUM( enumName, ... ) \
namespace Catch { \

View File

@ -5,7 +5,7 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_totals.h>
#include <catch2/catch_totals.hpp>
namespace Catch {

View File

@ -1,18 +0,0 @@
/*
* Created by Martin on 21/11/2017.
*
* This file collects declaration that we want to expose to test files.
* These declarations are expected to be duplicated elsewhere,
* together with their implementation.
*
* 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_USER_INTERFACES_H_INCLUDED
#define TWOBLUECUBES_CATCH_USER_INTERFACES_H_INCLUDED
namespace Catch {
unsigned int rngSeed();
}
#endif // TWOBLUECUBES_CATCH_USER_INTERFACES_H_INCLUDED

View File

@ -6,7 +6,7 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_version.h>
#include <catch2/catch_version.hpp>
#include <ostream>
namespace Catch {

View File

@ -3,7 +3,7 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_generator_exception.hpp>
#include <catch2/generators/catch_generator_exception.hpp>
namespace Catch {

View File

@ -5,10 +5,10 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_generators.hpp>
#include <catch2/catch_enforce.h>
#include <catch2/catch_generator_exception.hpp>
#include <catch2/catch_interfaces_capture.h>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/generators/catch_generator_exception.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <limits>
#include <set>

View File

@ -7,8 +7,8 @@
#ifndef TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_GENERATORS_HPP_INCLUDED
#include <catch2/catch_interfaces_generatortracker.h>
#include <catch2/catch_common.h>
#include <catch2/interfaces/catch_interfaces_generatortracker.hpp>
#include <catch2/internal/catch_common.hpp>
#include <memory>
#include <vector>

View File

@ -7,8 +7,8 @@
#ifndef TWOBLUECUBES_CATCH_GENERATORS_GENERIC_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_GENERATORS_GENERIC_HPP_INCLUDED
#include <catch2/catch_generators.hpp>
#include <catch2/catch_meta.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/internal/catch_meta.hpp>
namespace Catch {
namespace Generators {

View File

@ -0,0 +1,88 @@
/*
* Created by Martin on 15/6/2018.
*
* 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_GENERATORS_RANDOM_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_GENERATORS_RANDOM_HPP_INCLUDED
#include <catch2/internal/catch_context.hpp>
#include <catch2/generators/catch_generators.hpp>
#include <catch2/internal/catch_random_number_generator.hpp>
#include <random>
namespace Catch {
namespace Generators {
template <typename Float>
class RandomFloatingGenerator final : public IGenerator<Float> {
Catch::SimplePcg32& m_rng;
std::uniform_real_distribution<Float> m_dist;
Float m_current_number;
public:
RandomFloatingGenerator(Float a, Float b):
m_rng(rng()),
m_dist(a, b) {
static_cast<void>(next());
}
Float const& get() const override {
return m_current_number;
}
bool next() override {
m_current_number = m_dist(m_rng);
return true;
}
};
template <typename Integer>
class RandomIntegerGenerator final : public IGenerator<Integer> {
Catch::SimplePcg32& m_rng;
std::uniform_int_distribution<Integer> m_dist;
Integer m_current_number;
public:
RandomIntegerGenerator(Integer a, Integer b):
m_rng(rng()),
m_dist(a, b) {
static_cast<void>(next());
}
Integer const& get() const override {
return m_current_number;
}
bool next() override {
m_current_number = m_dist(m_rng);
return true;
}
};
// TODO: Ideally this would be also constrained against the various char types,
// but I don't expect users to run into that in practice.
template <typename T>
std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value,
GeneratorWrapper<T>>
random(T a, T b) {
return GeneratorWrapper<T>(
std::make_unique<RandomIntegerGenerator<T>>(a, b)
);
}
template <typename T>
std::enable_if_t<std::is_floating_point<T>::value,
GeneratorWrapper<T>>
random(T a, T b) {
return GeneratorWrapper<T>(
std::make_unique<RandomFloatingGenerator<T>>(a, b)
);
}
} // namespace Generators
} // namespace Catch
#endif // TWOBLUECUBES_CATCH_GENERATORS_RANDOM_HPP_INCLUDED

View File

@ -4,83 +4,17 @@
* 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_GENERATORS_SPECIFIC_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_GENERATORS_SPECIFIC_HPP_INCLUDED
#ifndef TWOBLUECUBES_CATCH_GENERATORS_RANGE_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_GENERATORS_RANGE_HPP_INCLUDED
#include <catch2/catch_context.h>
#include <catch2/catch_generators.hpp>
#include <catch2/catch_interfaces_config.h>
#include <catch2/catch_random_number_generator.h>
#include <catch2/generators/catch_generators.hpp>
#include <random>
#include <iterator>
#include <type_traits>
namespace Catch {
namespace Generators {
template <typename Float>
class RandomFloatingGenerator final : public IGenerator<Float> {
Catch::SimplePcg32& m_rng;
std::uniform_real_distribution<Float> m_dist;
Float m_current_number;
public:
RandomFloatingGenerator(Float a, Float b):
m_rng(rng()),
m_dist(a, b) {
static_cast<void>(next());
}
Float const& get() const override {
return m_current_number;
}
bool next() override {
m_current_number = m_dist(m_rng);
return true;
}
};
template <typename Integer>
class RandomIntegerGenerator final : public IGenerator<Integer> {
Catch::SimplePcg32& m_rng;
std::uniform_int_distribution<Integer> m_dist;
Integer m_current_number;
public:
RandomIntegerGenerator(Integer a, Integer b):
m_rng(rng()),
m_dist(a, b) {
static_cast<void>(next());
}
Integer const& get() const override {
return m_current_number;
}
bool next() override {
m_current_number = m_dist(m_rng);
return true;
}
};
// TODO: Ideally this would be also constrained against the various char types,
// but I don't expect users to run into that in practice.
template <typename T>
std::enable_if_t<std::is_integral<T>::value && !std::is_same<T, bool>::value,
GeneratorWrapper<T>>
random(T a, T b) {
return GeneratorWrapper<T>(
std::make_unique<RandomIntegerGenerator<T>>(a, b)
);
}
template <typename T>
std::enable_if_t<std::is_floating_point<T>::value,
GeneratorWrapper<T>>
random(T a, T b) {
return GeneratorWrapper<T>(
std::make_unique<RandomFloatingGenerator<T>>(a, b)
);
}
template <typename T>
class RangeGenerator final : public IGenerator<T> {
@ -172,4 +106,4 @@ GeneratorWrapper<ResultType> from_range(Container const& cnt) {
} // namespace Catch
#endif // TWOBLUECUBES_CATCH_GENERATORS_SPECIFIC_HPP_INCLUDED
#endif // TWOBLUECUBES_CATCH_GENERATORS_RANGE_HPP_INCLUDED

View File

@ -1,4 +1,4 @@
#include <catch2/catch_interfaces_capture.h>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
namespace Catch {
IResultCapture::~IResultCapture() = default;

View File

@ -11,8 +11,8 @@
#include <string>
#include <chrono>
#include <catch2/catch_stringref.h>
#include <catch2/catch_result_type.h>
#include <catch2/catch_stringref.hpp>
#include <catch2/internal/catch_result_type.hpp>
namespace Catch {

View File

@ -0,0 +1,5 @@
#include <catch2/interfaces/catch_interfaces_config.hpp>
namespace Catch {
IConfig::~IConfig() = default;
}

View File

@ -8,8 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED
#define TWOBLUECUBES_CATCH_INTERFACES_CONFIG_H_INCLUDED
#include <catch2/catch_common.h>
#include <catch2/catch_option.hpp>
#include <catch2/internal/catch_common.hpp>
#include <chrono>
#include <iosfwd>

View File

@ -8,7 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_INTERFACESENUMVALUESREGISTRY_H_INCLUDED
#define TWOBLUECUBES_CATCH_INTERFACESENUMVALUESREGISTRY_H_INCLUDED
#include <catch2/catch_stringref.h>
#include <catch2/catch_stringref.hpp>
#include <vector>

View File

@ -1,4 +1,4 @@
#include <catch2/catch_interfaces_exception.h>
#include <catch2/interfaces/catch_interfaces_exception.hpp>
namespace Catch {
IExceptionTranslator::~IExceptionTranslator() = default;

View File

@ -8,8 +8,8 @@
#ifndef TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED
#define TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#if defined(CATCH_CONFIG_DISABLE)
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \

View File

@ -1,4 +1,4 @@
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
namespace Catch {
IRegistryHub::~IRegistryHub() = default;

View File

@ -8,7 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
#define TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
#include <catch2/catch_common.h>
#include <catch2/internal/catch_common.hpp>
#include <string>
#include <memory>

View File

@ -5,11 +5,11 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_interfaces_reporter.h>
#include <catch2/catch_console_colour.h>
#include <catch2/reporters/catch_reporter_listening.h>
#include <catch2/catch_list.h>
#include <catch2/catch_text.h>
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <catch2/internal/catch_console_colour.hpp>
#include <catch2/internal/catch_list.hpp>
#include <catch2/internal/catch_text.hpp>
#include <catch2/internal/catch_string_manip.hpp>
#include <algorithm>
#include <iomanip>

View File

@ -8,15 +8,15 @@
#ifndef TWOBLUECUBES_CATCH_INTERFACES_REPORTER_H_INCLUDED
#define TWOBLUECUBES_CATCH_INTERFACES_REPORTER_H_INCLUDED
#include <catch2/catch_section_info.h>
#include <catch2/catch_common.h>
#include <catch2/catch_section_info.hpp>
#include <catch2/internal/catch_common.hpp>
#include <catch2/catch_config.hpp>
#include <catch2/catch_totals.h>
#include <catch2/catch_test_case_info.h>
#include <catch2/catch_assertionresult.h>
#include <catch2/catch_message.h>
#include <catch2/catch_option.hpp>
#include <catch2/catch_stringref.h>
#include <catch2/catch_totals.hpp>
#include <catch2/catch_test_case_info.hpp>
#include <catch2/catch_assertion_result.hpp>
#include <catch2/catch_message.hpp>
#include <catch2/internal/catch_option.hpp>
#include <catch2/catch_stringref.hpp>
#include <catch2/benchmark/catch_estimate.hpp>
#include <catch2/benchmark/catch_outlier_classification.hpp>

View File

@ -0,0 +1,5 @@
#include <catch2/interfaces/catch_interfaces_runner.hpp>
namespace Catch {
IRunner::~IRunner() = default;
}

View File

@ -1,4 +1,4 @@
#include <catch2/catch_interfaces_testcase.h>
#include <catch2/interfaces/catch_interfaces_testcase.hpp>
namespace Catch {
ITestInvoker::~ITestInvoker() = default;

View File

@ -6,16 +6,16 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_assertionhandler.h>
#include <catch2/catch_assertionresult.h>
#include <catch2/catch_interfaces_runner.h>
#include <catch2/catch_interfaces_config.h>
#include <catch2/catch_context.h>
#include <catch2/catch_enforce.h>
#include <catch2/catch_debugger.h>
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/internal/catch_capture_matchers.h>
#include <catch2/catch_run_context.h>
#include <catch2/internal/catch_assertionhandler.hpp>
#include <catch2/catch_assertion_result.hpp>
#include <catch2/interfaces/catch_interfaces_runner.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_context.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/internal/catch_debugger.hpp>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/internal/catch_capture_matchers.hpp>
#include <catch2/internal/catch_run_context.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
namespace Catch {

View File

@ -8,9 +8,9 @@
#ifndef TWOBLUECUBES_CATCH_ASSERTIONHANDLER_H_INCLUDED
#define TWOBLUECUBES_CATCH_ASSERTIONHANDLER_H_INCLUDED
#include <catch2/catch_assertioninfo.h>
#include <catch2/catch_decomposer.h>
#include <catch2/catch_interfaces_capture.h>
#include <catch2/catch_assertion_info.hpp>
#include <catch2/internal/catch_decomposer.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
namespace Catch {

View File

@ -8,10 +8,10 @@
#ifndef TWOBLUECUBES_CATCH_CAPTURE_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_CAPTURE_HPP_INCLUDED
#include <catch2/catch_assertionhandler.h>
#include <catch2/catch_interfaces_capture.h>
#include <catch2/catch_message.h>
#include <catch2/catch_stringref.h>
#include <catch2/internal/catch_assertionhandler.hpp>
#include <catch2/interfaces/catch_interfaces_capture.hpp>
#include <catch2/catch_message.hpp>
#include <catch2/catch_stringref.hpp>
// We need this suppression to leak, because it took until GCC 9
// for the front end to handle local suppression via _Pragma properly

View File

@ -2,9 +2,9 @@
* 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)
*/
#include <catch2/internal/catch_capture_matchers.h>
#include <catch2/internal/catch_capture_matchers.hpp>
#include <catch2/matchers/catch_matchers.hpp>
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
namespace Catch {

View File

@ -5,8 +5,8 @@
#ifndef TWOBLUECUBES_CATCH_CAPTURE_MATCHERS_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_CAPTURE_MATCHERS_HPP_INCLUDED
#include <catch2/catch_capture.hpp>
#include <catch2/catch_stringref.h>
#include <catch2/internal/catch_capture.hpp>
#include <catch2/catch_stringref.hpp>
namespace Catch {

View File

@ -6,12 +6,12 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_commandline.h>
#include <catch2/internal/catch_commandline.hpp>
#include <catch2/catch_string_manip.h>
#include <catch2/internal/catch_string_manip.hpp>
#include <catch2/catch_interfaces_registry_hub.h>
#include <catch2/catch_interfaces_reporter.h>
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/interfaces/catch_interfaces_reporter.hpp>
#include <fstream>
#include <ctime>

View File

@ -9,7 +9,7 @@
#define TWOBLUECUBES_CATCH_COMMANDLINE_HPP_INCLUDED
#include <catch2/catch_config.hpp>
#include <catch2/catch_clara.h>
#include <catch2/internal/catch_clara.hpp>
namespace Catch {

View File

@ -6,9 +6,9 @@
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#include <catch2/catch_common.h>
#include <catch2/catch_context.h>
#include <catch2/catch_interfaces_config.h>
#include <catch2/internal/catch_common.hpp>
#include <catch2/internal/catch_context.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <cstring>
#include <ostream>

View File

@ -8,7 +8,7 @@
#ifndef TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
#define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#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 )

View File

@ -25,7 +25,7 @@
// Many features, at point of detection, define an _INTERNAL_ macro, so they
// can be combined, en-mass, with the _NO_ forms later.
#include <catch2/catch_platform.h>
#include <catch2/internal/catch_platform.hpp>
#ifdef __cplusplus

View File

@ -13,15 +13,15 @@
#endif
#include <catch2/catch_console_colour.h>
#include <catch2/catch_enforce.h>
#include <catch2/catch_errno_guard.h>
#include <catch2/catch_interfaces_config.h>
#include <catch2/catch_stream.h>
#include <catch2/catch_context.h>
#include <catch2/catch_platform.h>
#include <catch2/catch_debugger.h>
#include <catch2/catch_windows_h_proxy.h>
#include <catch2/internal/catch_console_colour.hpp>
#include <catch2/internal/catch_enforce.hpp>
#include <catch2/internal/catch_errno_guard.hpp>
#include <catch2/interfaces/catch_interfaces_config.hpp>
#include <catch2/internal/catch_stream.hpp>
#include <catch2/internal/catch_context.hpp>
#include <catch2/internal/catch_platform.hpp>
#include <catch2/internal/catch_debugger.hpp>
#include <catch2/internal/catch_windows_h_proxy.hpp>
#include <sstream>

View File

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

View File

@ -4,7 +4,7 @@
#ifndef TWOBLUECUBES_CATCH_CONTAINER_NONMEMBERS_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_CONTAINER_NONMEMBERS_HPP_INCLUDED
#include <catch2/catch_compiler_capabilities.h>
#include <catch2/internal/catch_compiler_capabilities.hpp>
// We want a simple polyfill over `std::empty`, `std::size` and so on

Some files were not shown because too many files have changed in this diff Show More