mirror of
https://github.com/catchorg/Catch2.git
synced 2025-04-29 12:03:53 +00:00
Compare commits
No commits in common. "ebeeaaeec673ebab87d5ef0ba3aa63b2791e3406" and "6923a168a1ba9af0e43a83c57a155999a99f134a" have entirely different histories.
ebeeaaeec6
...
6923a168a1
26
.travis.yml
26
.travis.yml
@ -158,22 +158,24 @@ matrix:
|
||||
|
||||
|
||||
|
||||
# # Special builds, e.g. conan
|
||||
# - language: python
|
||||
# python:
|
||||
# - "3.7"
|
||||
# install:
|
||||
# - pip install conan-package-tools
|
||||
# env:
|
||||
# - CONAN_GCC_VERSIONS=8
|
||||
# - CONAN_DOCKER_IMAGE=conanio/gcc8
|
||||
# - CPP14=1
|
||||
# script:
|
||||
# - python .conan/build.py
|
||||
# Special builds, e.g. conan
|
||||
- language: python
|
||||
python:
|
||||
- "3.7"
|
||||
install:
|
||||
- pip install conan-package-tools
|
||||
env:
|
||||
- CONAN_GCC_VERSIONS=8
|
||||
- CONAN_DOCKER_IMAGE=conanio/gcc8
|
||||
- CPP14=1
|
||||
script:
|
||||
- python .conan/build.py
|
||||
|
||||
before_script:
|
||||
- export CXX=${COMPILER}
|
||||
- cd ${TRAVIS_BUILD_DIR}
|
||||
# Regenerate single header file, so it is tested in the examples...
|
||||
- python scripts/generateSingleHeader.py
|
||||
|
||||
- |
|
||||
if [[ ${CPP17} -eq 1 ]]; then
|
||||
|
400
CMakeLists.txt
400
CMakeLists.txt
@ -6,11 +6,6 @@ if(NOT DEFINED PROJECT_NAME)
|
||||
set(NOT_SUBPROJECT ON)
|
||||
endif()
|
||||
|
||||
option(CATCH_BUILD_TESTING "Build SelfTest project" ON)
|
||||
option(CATCH_BUILD_EXAMPLES "Build documentation examples" OFF)
|
||||
option(CATCH_BUILD_EXTRA_TESTS "Build extra tests" OFF)
|
||||
|
||||
|
||||
# Catch2's build breaks if done in-tree. You probably should not build
|
||||
# things in tree anyway, but we can allow projects that include Catch2
|
||||
# as a subproject to build in-tree as long as it is not in our tree.
|
||||
@ -28,23 +23,34 @@ include(GNUInstallDirs)
|
||||
include(CMakePackageConfigHelpers)
|
||||
include(CTest)
|
||||
|
||||
# Basic paths
|
||||
option(CATCH_USE_VALGRIND "Perform SelfTests with Valgrind" OFF)
|
||||
option(CATCH_BUILD_TESTING "Build SelfTest project" ON)
|
||||
option(CATCH_BUILD_EXAMPLES "Build documentation examples" OFF)
|
||||
option(CATCH_BUILD_EXTRA_TESTS "Build extra tests" OFF)
|
||||
option(CATCH_ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
|
||||
option(CATCH_ENABLE_WERROR "Enable all warnings as errors" ON)
|
||||
option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON)
|
||||
option(CATCH_INSTALL_HELPERS "Install contrib alongside library" ON)
|
||||
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# define some folders
|
||||
set(CATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set(SOURCES_DIR ${CATCH_DIR}/src/catch2)
|
||||
set(SELF_TEST_DIR ${CATCH_DIR}/tests/SelfTest)
|
||||
set(BENCHMARK_DIR ${CATCH_DIR}/tests/Benchmark)
|
||||
set(EXAMPLES_DIR ${CATCH_DIR}/examples)
|
||||
set(SELF_TEST_DIR ${CATCH_DIR}/projects/SelfTest)
|
||||
set(BENCHMARK_DIR ${CATCH_DIR}/projects/Benchmark)
|
||||
set(HEADER_DIR ${CATCH_DIR}/include)
|
||||
|
||||
# We need to bring-in the variables defined there to this scope
|
||||
add_subdirectory(src)
|
||||
if(USE_WMAIN)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wmainCRTStartup")
|
||||
endif()
|
||||
|
||||
# Build tests only if requested
|
||||
if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT)
|
||||
find_package(PythonInterp)
|
||||
if (NOT PYTHONINTERP_FOUND)
|
||||
message(FATAL_ERROR "Python not found, but required for tests")
|
||||
endif()
|
||||
add_subdirectory(tests)
|
||||
add_subdirectory(projects)
|
||||
endif()
|
||||
|
||||
if(CATCH_BUILD_EXAMPLES)
|
||||
@ -52,200 +58,176 @@ if(CATCH_BUILD_EXAMPLES)
|
||||
endif()
|
||||
|
||||
if(CATCH_BUILD_EXTRA_TESTS)
|
||||
add_subdirectory(tests/ExtraTests)
|
||||
add_subdirectory(projects/ExtraTests)
|
||||
endif()
|
||||
|
||||
#option(CATCH_USE_VALGRIND "Perform SelfTests with Valgrind" OFF)
|
||||
#option(CATCH_ENABLE_COVERAGE "Generate coverage for codecov.io" OFF)
|
||||
#option(CATCH_ENABLE_WERROR "Enable all warnings as errors" ON)
|
||||
#option(CATCH_INSTALL_DOCS "Install documentation alongside library" ON)
|
||||
#option(CATCH_INSTALL_EXTRAS "Install extras alongside library" ON)
|
||||
#
|
||||
#set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
#
|
||||
#if(USE_WMAIN)
|
||||
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ENTRY:wmainCRTStartup")
|
||||
#endif()
|
||||
#
|
||||
#if (BUILD_TESTING AND CATCH_BUILD_TESTING AND NOT_SUBPROJECT)
|
||||
# find_package(PythonInterp)
|
||||
# if (NOT PYTHONINTERP_FOUND)
|
||||
# message(FATAL_ERROR "Python not found, but required for tests")
|
||||
# endif()
|
||||
# add_subdirectory(projects)
|
||||
#endif()
|
||||
#
|
||||
#if(CATCH_BUILD_EXTRA_TESTS)
|
||||
# add_subdirectory(projects/ExtraTests)
|
||||
#endif()
|
||||
#
|
||||
## add catch as a 'linkable' target
|
||||
#add_library(Catch2 INTERFACE)
|
||||
#
|
||||
#
|
||||
#
|
||||
## depend on some obvious c++11 features so the dependency is transitively added dependents
|
||||
#target_compile_features(Catch2
|
||||
# INTERFACE
|
||||
# cxx_alignas
|
||||
# cxx_alignof
|
||||
# cxx_attributes
|
||||
# cxx_auto_type
|
||||
# cxx_constexpr
|
||||
# cxx_defaulted_functions
|
||||
# cxx_deleted_functions
|
||||
# cxx_final
|
||||
# cxx_lambdas
|
||||
# cxx_noexcept
|
||||
# cxx_override
|
||||
# cxx_range_for
|
||||
# cxx_rvalue_references
|
||||
# cxx_static_assert
|
||||
# cxx_strong_enums
|
||||
# cxx_trailing_return_types
|
||||
# cxx_unicode_literals
|
||||
# cxx_user_literals
|
||||
# cxx_variadic_macros
|
||||
#)
|
||||
#
|
||||
#target_include_directories(Catch2
|
||||
# INTERFACE
|
||||
# $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/single_include>
|
||||
# $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
#)
|
||||
#
|
||||
#if (ANDROID)
|
||||
# target_link_libraries(Catch2 INTERFACE log)
|
||||
#endif()
|
||||
#
|
||||
## provide a namespaced alias for clients to 'link' against if catch is included as a sub-project
|
||||
#add_library(Catch2::Catch2 ALIAS Catch2)
|
||||
#
|
||||
## Only perform the installation steps when Catch is not being used as
|
||||
## a subproject via `add_subdirectory`, or the destinations will break,
|
||||
## see https://github.com/catchorg/Catch2/issues/1373
|
||||
#if (NOT_SUBPROJECT)
|
||||
# set(CATCH_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Catch2")
|
||||
#
|
||||
# configure_package_config_file(
|
||||
# ${CMAKE_CURRENT_LIST_DIR}/CMake/Catch2Config.cmake.in
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/Catch2Config.cmake
|
||||
# INSTALL_DESTINATION
|
||||
# ${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
# )
|
||||
#
|
||||
#
|
||||
# # create and install an export set for catch target as Catch2::Catch
|
||||
# install(
|
||||
# TARGETS
|
||||
# Catch2
|
||||
# EXPORT
|
||||
# Catch2Targets
|
||||
# DESTINATION
|
||||
# ${CMAKE_INSTALL_LIBDIR}
|
||||
# )
|
||||
#
|
||||
#
|
||||
# install(
|
||||
# EXPORT
|
||||
# Catch2Targets
|
||||
# NAMESPACE
|
||||
# Catch2::
|
||||
# DESTINATION
|
||||
# ${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
# )
|
||||
#
|
||||
# # By default, FooConfigVersion is tied to architecture that it was
|
||||
# # generated on. Because Catch2 is header-only, it is arch-independent
|
||||
# # and thus Catch2ConfigVersion should not be tied to the architecture
|
||||
# # it was generated on.
|
||||
# #
|
||||
# # CMake does not provide a direct customization point for this in
|
||||
# # `write_basic_package_version_file`, but it can be accomplished
|
||||
# # indirectly by temporarily redefining `CMAKE_SIZEOF_VOID_P` to an
|
||||
# # empty string. Note that just undefining the variable could be
|
||||
# # insufficient in cases where the variable was already in CMake cache
|
||||
# set(CATCH2_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
|
||||
# set(CMAKE_SIZEOF_VOID_P "")
|
||||
# write_basic_package_version_file(
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
|
||||
# COMPATIBILITY
|
||||
# SameMajorVersion
|
||||
# )
|
||||
# set(CMAKE_SIZEOF_VOID_P ${CATCH2_CMAKE_SIZEOF_VOID_P})
|
||||
#
|
||||
# install(
|
||||
# DIRECTORY
|
||||
# "single_include/"
|
||||
# DESTINATION
|
||||
# "${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
# )
|
||||
#
|
||||
# install(
|
||||
# FILES
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/Catch2Config.cmake"
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
|
||||
# DESTINATION
|
||||
# ${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
# )
|
||||
#
|
||||
# # Install documentation
|
||||
# if(CATCH_INSTALL_DOCS)
|
||||
# install(
|
||||
# DIRECTORY
|
||||
# docs/
|
||||
# DESTINATION
|
||||
# "${CMAKE_INSTALL_DOCDIR}"
|
||||
# )
|
||||
# endif()
|
||||
#
|
||||
# if(CATCH_INSTALL_HELPERS)
|
||||
# # Install CMake scripts
|
||||
# install(
|
||||
# FILES
|
||||
# "extras/ParseAndAddCatchTests.cmake"
|
||||
# "extras/Catch.cmake"
|
||||
# "extras/CatchAddTests.cmake"
|
||||
# DESTINATION
|
||||
# ${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
# )
|
||||
#
|
||||
# # Install debugger helpers
|
||||
# install(
|
||||
# FILES
|
||||
# "extras/gdbinit"
|
||||
# "extras/lldbinit"
|
||||
# DESTINATION
|
||||
# ${CMAKE_INSTALL_DATAROOTDIR}/Catch2
|
||||
# )
|
||||
# endif()
|
||||
#
|
||||
# ## Provide some pkg-config integration
|
||||
# set(PKGCONFIG_INSTALL_DIR
|
||||
# "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig"
|
||||
# CACHE PATH "Path where catch2.pc is installed"
|
||||
# )
|
||||
# configure_file(
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/CMake/catch2.pc.in
|
||||
# ${CMAKE_CURRENT_BINARY_DIR}/catch2.pc
|
||||
# @ONLY
|
||||
# )
|
||||
# install(
|
||||
# FILES
|
||||
# "${CMAKE_CURRENT_BINARY_DIR}/catch2.pc"
|
||||
# DESTINATION
|
||||
# ${PKGCONFIG_INSTALL_DIR}
|
||||
# )
|
||||
#
|
||||
# # CPack/CMake started taking the package version from project version 3.12
|
||||
# # So we need to set the version manually for older CMake versions
|
||||
# if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
||||
# set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
# endif()
|
||||
#
|
||||
# set(CPACK_PACKAGE_CONTACT "https://github.com/catchorg/Catch2/")
|
||||
#
|
||||
#
|
||||
# include( CPack )
|
||||
#
|
||||
#endif(NOT_SUBPROJECT)
|
||||
# add catch as a 'linkable' target
|
||||
add_library(Catch2 INTERFACE)
|
||||
|
||||
|
||||
|
||||
# depend on some obvious c++11 features so the dependency is transitively added dependents
|
||||
target_compile_features(Catch2
|
||||
INTERFACE
|
||||
cxx_alignas
|
||||
cxx_alignof
|
||||
cxx_attributes
|
||||
cxx_auto_type
|
||||
cxx_constexpr
|
||||
cxx_defaulted_functions
|
||||
cxx_deleted_functions
|
||||
cxx_final
|
||||
cxx_lambdas
|
||||
cxx_noexcept
|
||||
cxx_override
|
||||
cxx_range_for
|
||||
cxx_rvalue_references
|
||||
cxx_static_assert
|
||||
cxx_strong_enums
|
||||
cxx_trailing_return_types
|
||||
cxx_unicode_literals
|
||||
cxx_user_literals
|
||||
cxx_variadic_macros
|
||||
)
|
||||
|
||||
target_include_directories(Catch2
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/single_include>
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
)
|
||||
|
||||
if (ANDROID)
|
||||
target_link_libraries(Catch2 INTERFACE log)
|
||||
endif()
|
||||
|
||||
# provide a namespaced alias for clients to 'link' against if catch is included as a sub-project
|
||||
add_library(Catch2::Catch2 ALIAS Catch2)
|
||||
|
||||
# Only perform the installation steps when Catch is not being used as
|
||||
# a subproject via `add_subdirectory`, or the destinations will break,
|
||||
# see https://github.com/catchorg/Catch2/issues/1373
|
||||
if (NOT_SUBPROJECT)
|
||||
set(CATCH_CMAKE_CONFIG_DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Catch2")
|
||||
|
||||
configure_package_config_file(
|
||||
${CMAKE_CURRENT_LIST_DIR}/CMake/Catch2Config.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/Catch2Config.cmake
|
||||
INSTALL_DESTINATION
|
||||
${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
)
|
||||
|
||||
|
||||
# create and install an export set for catch target as Catch2::Catch
|
||||
install(
|
||||
TARGETS
|
||||
Catch2
|
||||
EXPORT
|
||||
Catch2Targets
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}
|
||||
)
|
||||
|
||||
|
||||
install(
|
||||
EXPORT
|
||||
Catch2Targets
|
||||
NAMESPACE
|
||||
Catch2::
|
||||
DESTINATION
|
||||
${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
)
|
||||
|
||||
# By default, FooConfigVersion is tied to architecture that it was
|
||||
# generated on. Because Catch2 is header-only, it is arch-independent
|
||||
# and thus Catch2ConfigVersion should not be tied to the architecture
|
||||
# it was generated on.
|
||||
#
|
||||
# CMake does not provide a direct customization point for this in
|
||||
# `write_basic_package_version_file`, but it can be accomplished
|
||||
# indirectly by temporarily redefining `CMAKE_SIZEOF_VOID_P` to an
|
||||
# empty string. Note that just undefining the variable could be
|
||||
# insufficient in cases where the variable was already in CMake cache
|
||||
set(CATCH2_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P})
|
||||
set(CMAKE_SIZEOF_VOID_P "")
|
||||
write_basic_package_version_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
|
||||
COMPATIBILITY
|
||||
SameMajorVersion
|
||||
)
|
||||
set(CMAKE_SIZEOF_VOID_P ${CATCH2_CMAKE_SIZEOF_VOID_P})
|
||||
|
||||
install(
|
||||
DIRECTORY
|
||||
"single_include/"
|
||||
DESTINATION
|
||||
"${CMAKE_INSTALL_INCLUDEDIR}"
|
||||
)
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Catch2Config.cmake"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/Catch2ConfigVersion.cmake"
|
||||
DESTINATION
|
||||
${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
)
|
||||
|
||||
# Install documentation
|
||||
if(CATCH_INSTALL_DOCS)
|
||||
install(
|
||||
DIRECTORY
|
||||
docs/
|
||||
DESTINATION
|
||||
"${CMAKE_INSTALL_DOCDIR}"
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CATCH_INSTALL_HELPERS)
|
||||
# Install CMake scripts
|
||||
install(
|
||||
FILES
|
||||
"contrib/ParseAndAddCatchTests.cmake"
|
||||
"contrib/Catch.cmake"
|
||||
"contrib/CatchAddTests.cmake"
|
||||
DESTINATION
|
||||
${CATCH_CMAKE_CONFIG_DESTINATION}
|
||||
)
|
||||
|
||||
# Install debugger helpers
|
||||
install(
|
||||
FILES
|
||||
"contrib/gdbinit"
|
||||
"contrib/lldbinit"
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/Catch2
|
||||
)
|
||||
endif()
|
||||
|
||||
## Provide some pkg-config integration
|
||||
set(PKGCONFIG_INSTALL_DIR
|
||||
"${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig"
|
||||
CACHE PATH "Path where catch2.pc is installed"
|
||||
)
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMake/catch2.pc.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/catch2.pc
|
||||
@ONLY
|
||||
)
|
||||
install(
|
||||
FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/catch2.pc"
|
||||
DESTINATION
|
||||
${PKGCONFIG_INSTALL_DIR}
|
||||
)
|
||||
|
||||
# CPack/CMake started taking the package version from project version 3.12
|
||||
# So we need to set the version manually for older CMake versions
|
||||
if(${CMAKE_VERSION} VERSION_LESS "3.12.0")
|
||||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_CONTACT "https://github.com/catchorg/Catch2/")
|
||||
|
||||
|
||||
include( CPack )
|
||||
|
||||
endif(NOT_SUBPROJECT)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<a id="top"></a>
|
||||

|
||||

|
||||
|
||||
[](https://github.com/catchorg/catch2/releases)
|
||||
[](https://travis-ci.org/catchorg/Catch2)
|
||||
|
@ -18,7 +18,7 @@ init:
|
||||
|
||||
install:
|
||||
- ps: if (($env:CONFIGURATION) -eq "Debug" -And ($env:coverage) -eq "1" ) { pip --disable-pip-version-check install codecov }
|
||||
- ps: if (($env:CONFIGURATION) -eq "Debug" -And ($env:coverage) -eq "1" ) { .\tools\misc\installOpenCppCoverage.ps1 }
|
||||
- ps: if (($env:CONFIGURATION) -eq "Debug" -And ($env:coverage) -eq "1" ) { .\misc\installOpenCppCoverage.ps1 }
|
||||
|
||||
|
||||
before_build:
|
||||
@ -26,7 +26,7 @@ before_build:
|
||||
# Indirection because appveyor doesn't handle multiline batch scripts properly
|
||||
# https://stackoverflow.com/questions/37627248/how-to-split-a-command-over-multiple-lines-in-appveyor-yml/37647169#37647169
|
||||
# https://help.appveyor.com/discussions/questions/3888-multi-line-cmd-or-powershell-warning-ignore
|
||||
- cmd: .\tools\misc\appveyorBuildConfigurationScript.bat
|
||||
- cmd: .\misc\appveyorBuildConfigurationScript.bat
|
||||
|
||||
|
||||
# build with MSBuild
|
||||
@ -37,7 +37,7 @@ build:
|
||||
|
||||
test_script:
|
||||
- set CTEST_OUTPUT_ON_FAILURE=1
|
||||
- cmd: .\tools\misc\appveyorTestRunScript.bat
|
||||
- cmd: .\misc\appveyorTestRunScript.bat
|
||||
|
||||
|
||||
# Sadly we cannot use the standard "dimensions" based approach towards
|
||||
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
@ -35,7 +35,7 @@ While these files are not essential to compilation they help to keep the impleme
|
||||
At time of writing this set is not complete but has reasonable coverage.
|
||||
If you add additional headers please try to remember to add a surrogate cpp for it.
|
||||
|
||||
The other directories are `tools/scripts` which contains a set of python scripts to help in testing Catch as well as
|
||||
The other directories are `scripts` which contains a set of python scripts to help in testing Catch as well as
|
||||
generating the single include, and `docs`, which contains the documentation as a set of markdown files.
|
||||
|
||||
__When submitting a pull request please do not include changes to the single include, or to the version number file
|
||||
|
@ -10,6 +10,8 @@
|
||||
- Fixture: [Sections](../examples/100-Fix-Section.cpp)
|
||||
- Fixture: [Class-based fixtures](../examples/110-Fix-ClassFixture.cpp)
|
||||
- BDD: [SCENARIO, GIVEN, WHEN, THEN](../examples/120-Bdd-ScenarioGivenWhenThen.cpp)
|
||||
- Report: [Catch-provided main](../examples/200-Rpt-CatchMain.cpp)
|
||||
- Report: [TeamCity reporter](../examples/207-Rpt-TeamCityReporter.cpp)
|
||||
- Listener: [Listeners](../examples/210-Evt-EventListeners.cpp)
|
||||
- Configuration: [Provide your own output streams](../examples/231-Cfg-OutputStreams.cpp)
|
||||
- Generators: [Create your own generator](../examples/300-Gen-OwnGenerator.cpp)
|
||||
|
@ -1,7 +1,7 @@
|
||||
<a id="top"></a>
|
||||
# How to release
|
||||
|
||||
When enough changes have accumulated, it is time to release new version of Catch. This document describes the process in doing so, that no steps are forgotten. Note that all referenced scripts can be found in the `tools/scripts/` directory.
|
||||
When enough changes have accumulated, it is time to release new version of Catch. This document describes the process in doing so, that no steps are forgotten. Note that all referenced scripts can be found in the `scripts/` directory.
|
||||
|
||||
## Necessary steps
|
||||
|
||||
|
@ -1,10 +1,12 @@
|
||||
// 000-CatchMain.cpp
|
||||
|
||||
// It is generally recommended to have a single file provide the main
|
||||
// of a testing binary, and other test files to link against it.
|
||||
// In a Catch project with multiple files, dedicate one file to compile the
|
||||
// source code of Catch itself and reuse the resulting object file for linking.
|
||||
|
||||
// Let Catch provide main():
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
#define CATCH_CONFIG_MAIN
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
// That's it
|
||||
|
||||
|
@ -1,9 +1,8 @@
|
||||
// 010-TestCase.cpp
|
||||
|
||||
// Let Catch provide main():
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
#define CATCH_CONFIG_MAIN
|
||||
|
||||
// And write tests in the same file:
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
int Factorial( int number ) {
|
||||
|
@ -4,7 +4,7 @@
|
||||
// source code of Catch itself and reuse the resulting object file for linking.
|
||||
|
||||
// Let Catch provide main():
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
#define CATCH_CONFIG_MAIN
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
|
27
examples/200-Rpt-CatchMain.cpp
Normal file
27
examples/200-Rpt-CatchMain.cpp
Normal file
@ -0,0 +1,27 @@
|
||||
// 200-Rpt-CatchMain.cpp
|
||||
|
||||
// In a Catch project with multiple files, dedicate one file to compile the
|
||||
// source code of Catch itself and reuse the resulting object file for linking.
|
||||
|
||||
// Let Catch provide main():
|
||||
#define CATCH_CONFIG_MAIN
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#ifdef CATCH_EXAMPLE_RPT_1
|
||||
#include CATCH_EXAMPLE_RPT_1
|
||||
#endif
|
||||
|
||||
#ifdef CATCH_EXAMPLE_RPT_2
|
||||
#include CATCH_EXAMPLE_RPT_2
|
||||
#endif
|
||||
|
||||
#ifdef CATCH_EXAMPLE_RPT_3
|
||||
#include CATCH_EXAMPLE_RPT_3
|
||||
#endif
|
||||
|
||||
// That's it
|
||||
|
||||
// Compile implementation of Catch for use with files that do contain tests:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_ROOT) -DCATCH_EXAMPLE_RPT_1=\"include/reporters/catch_reporter_teamcity.hpp\" -o 200-Rpt-CatchMainTeamCity.o -c 200-Rpt-CatchMain.cpp
|
||||
// cl -EHsc -I%CATCH_ROOT% -DCATCH_EXAMPLE_RPT_1=\"include/reporters/catch_reporter_teamcity.hpp\" -Fo200-Rpt-CatchMainTeamCity.obj -c 200-Rpt-CatchMain.cpp
|
171
examples/207-Rpt-TeamCityReporter.cpp
Normal file
171
examples/207-Rpt-TeamCityReporter.cpp
Normal file
@ -0,0 +1,171 @@
|
||||
// 207-Rpt-TeamCityReporter.cpp
|
||||
|
||||
// Catch has built-in and external reporters:
|
||||
// Built-in:
|
||||
// - compact
|
||||
// - console
|
||||
// - junit
|
||||
// - xml
|
||||
// External:
|
||||
// - automake
|
||||
// - tap
|
||||
// - teamcity (this example)
|
||||
|
||||
// main() and reporter code provided in 200-Rpt-CatchMain.cpp
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning (disable : 4702) // Disable warning: unreachable code
|
||||
#endif
|
||||
|
||||
TEST_CASE( "TeamCity passes unconditionally succeeding assertion", "[teamcity]" ) {
|
||||
|
||||
SUCCEED();
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports unconditionally failing assertion", "[teamcity]" ) {
|
||||
|
||||
FAIL();
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports failing check", "[teamcity]" ) {
|
||||
|
||||
REQUIRE( 3 == 7 );
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports failing check-false", "[teamcity]" ) {
|
||||
|
||||
REQUIRE_FALSE( 3 == 3 );
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports failing check-that", "[teamcity]" ) {
|
||||
|
||||
using namespace Catch;
|
||||
|
||||
REQUIRE_THAT( "hello", Contains( "world" ) );
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports unexpected exception", "[teamcity]" ) {
|
||||
|
||||
REQUIRE( (throw std::runtime_error("surprise!"), true) );
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports undesired exception", "[teamcity]" ) {
|
||||
|
||||
REQUIRE_NOTHROW( (throw std::runtime_error("surprise!"), true) );
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports missing expected exception", "[teamcity]" ) {
|
||||
|
||||
REQUIRE_THROWS( true );
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports missing specific expected exception", "[teamcity]" ) {
|
||||
|
||||
REQUIRE_THROWS_AS( throw std::bad_alloc(), std::runtime_error );
|
||||
}
|
||||
|
||||
TEST_CASE( "TeamCity reports unexpected message in expected exception", "[teamcity]" ) {
|
||||
|
||||
using namespace Catch;
|
||||
|
||||
CHECK_THROWS_WITH( throw std::runtime_error("hello"), "world" );
|
||||
CHECK_THROWS_WITH( throw std::runtime_error("hello"), Contains("world") );
|
||||
}
|
||||
|
||||
struct MyException: public std::runtime_error
|
||||
{
|
||||
MyException( char const * text )
|
||||
: std::runtime_error( text ) {}
|
||||
|
||||
~MyException() override;
|
||||
};
|
||||
|
||||
// prevent -Wweak-vtables:
|
||||
MyException::~MyException() = default;
|
||||
|
||||
struct MyExceptionMatcher : Catch::MatcherBase< std::runtime_error >
|
||||
{
|
||||
std::string m_text;
|
||||
|
||||
MyExceptionMatcher( char const * text )
|
||||
: m_text( text )
|
||||
{}
|
||||
|
||||
~MyExceptionMatcher() override;
|
||||
|
||||
bool match( std::runtime_error const & arg ) const override
|
||||
{
|
||||
return m_text == arg.what() ;
|
||||
}
|
||||
|
||||
std::string describe() const override
|
||||
{
|
||||
return "it's me";
|
||||
}
|
||||
};
|
||||
|
||||
// prevent -Wweak-vtables:
|
||||
MyExceptionMatcher::~MyExceptionMatcher() = default;
|
||||
|
||||
TEST_CASE( "TeamCity failing check-throws-matches", "[teamcity]" ) {
|
||||
|
||||
CHECK_THROWS_MATCHES( throw MyException("hello"), MyException, MyExceptionMatcher("world") );
|
||||
}
|
||||
|
||||
// [!throws] - lets Catch know that this test is likely to throw an exception even if successful.
|
||||
// This causes the test to be excluded when running with -e or --nothrow.
|
||||
|
||||
// No special effects for the reporter.
|
||||
|
||||
TEST_CASE( "TeamCity throwing exception with tag [!throws]", "[teamcity][!throws]" ) {
|
||||
|
||||
REQUIRE_THROWS( throw std::runtime_error("unsurprisingly") );
|
||||
}
|
||||
|
||||
// [!mayfail] - doesn't fail the test if any given assertion fails (but still reports it). This can be useful to flag a work-in-progress, or a known issue that you don't want to immediately fix but still want to track in your tests.
|
||||
|
||||
TEST_CASE( "TeamCity failing assertion with tag [!mayfail]", "[teamcity][!mayfail] " ) {
|
||||
|
||||
REQUIRE( 3 == 7 ); // doesn't fail test case this time, reports: testIgnored
|
||||
REQUIRE( 3 == 3 );
|
||||
}
|
||||
|
||||
// [!shouldfail] - like [!mayfail] but fails the test if it passes.
|
||||
// This can be useful if you want to be notified of accidental, or third-party, fixes.
|
||||
|
||||
TEST_CASE( "TeamCity succeeding assertion with tag [!shouldfail]", "[teamcity][!shouldfail]" ) {
|
||||
|
||||
SUCCEED( "Marked [!shouldfail]" );
|
||||
}
|
||||
|
||||
// Compile & run:
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_ROOT) -DCATCH_EXAMPLE_RPT_1=\"include/reporters/catch_reporter_teamcity.hpp\" -o 200-Rpt-CatchMainTeamCity.o -c 200-Rpt-CatchMain.cpp
|
||||
// - g++ -std=c++11 -Wall -I$(CATCH_ROOT) -o 207-Rpt-TeamCityReporter 207-Rpt-TeamCityReporter.cpp 200-Rpt-CatchMainTeamCity.o && 207-Rpt-TeamCityReporter --list-reporters
|
||||
//
|
||||
// - cl -EHsc -I%CATCH_ROOT% -DCATCH_EXAMPLE_RPT_1=\"include/reporters/catch_reporter_teamcity.hpp\" -Fo200-Rpt-CatchMainTeamCity.obj -c 200-Rpt-CatchMain.cpp
|
||||
// - cl -EHsc -I%CATCH_ROOT% 207-Rpt-TeamCityReporter.cpp 200-Rpt-CatchMainTeamCity.o && 207-Rpt-TeamCityReporter --list-reporters
|
||||
|
||||
// Compilation output (--list-reporters):
|
||||
// Available reporters:
|
||||
// compact: Reports test results on a single line, suitable for IDEs
|
||||
// console: Reports test results as plain lines of text
|
||||
// junit: Reports test results in an XML format that looks like Ant's
|
||||
// junitreport target
|
||||
// teamcity: Reports test results as TeamCity service messages
|
||||
// xml: Reports test results as an XML document
|
||||
|
||||
// Expected output (abbreviated and broken into shorter lines):
|
||||
//
|
||||
// prompt> 207-Rpt-TeamCityReporter.exe --reporter teamcity
|
||||
// ##teamcity[testSuiteStarted name='207-Rpt-TeamCityReporter.exe']
|
||||
// ##teamcity[testStarted name='TeamCity passes unconditionally succeeding assertion']
|
||||
// ##teamcity[testFinished name='TeamCity passes unconditionally succeeding assertion' duration='1']
|
||||
// ##teamcity[testStarted name='TeamCity reports unconditionally failing assertion']
|
||||
// ##teamcity[testFailed name='TeamCity reports unconditionally failing assertion' /
|
||||
// message='.../examples/207-Rpt-TeamCityReporter.cpp:23|n/
|
||||
// ...............................................................................|n|n/
|
||||
// .../examples/207-Rpt-TeamCityReporter.cpp:25|nexplicit failure']
|
||||
// ##teamcity[testFinished name='TeamCity reports unconditionally failing assertion' duration='3']
|
||||
// ...
|
@ -6,12 +6,10 @@
|
||||
// there is no important difference between having `std::cerr` buffered
|
||||
// or unbuffered.
|
||||
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
|
||||
#define CATCH_CONFIG_NOSTDOUT
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <sstream>
|
||||
#include <cstdio>
|
||||
|
||||
class out_buff : public std::stringbuf {
|
||||
std::FILE* m_stream;
|
||||
|
@ -1,30 +1,44 @@
|
||||
cmake_minimum_required( VERSION 3.5 )
|
||||
#
|
||||
# Build examples.
|
||||
#
|
||||
# Requires CATCH_BUILD_EXAMPLES to be defined 'true', see ../CMakeLists.txt.
|
||||
#
|
||||
|
||||
project( Catch2Examples LANGUAGES CXX )
|
||||
cmake_minimum_required( VERSION 3.0 )
|
||||
|
||||
project( CatchExamples CXX )
|
||||
|
||||
message( STATUS "Examples included" )
|
||||
|
||||
# define folders used:
|
||||
|
||||
# Some one-offs first:
|
||||
# 1) Tests and main in one file
|
||||
add_executable( 010-TestCase
|
||||
010-TestCase.cpp
|
||||
)
|
||||
set( EXAMPLES_DIR ${CATCH_DIR}/examples )
|
||||
set( HEADER_DIR ${CATCH_DIR}/single_include )
|
||||
set( REPORTER_HEADER_DIR ${CATCH_DIR}/include/reporters )
|
||||
|
||||
# 2) Tests and main across two files
|
||||
add_executable( 020-MultiFile
|
||||
020-TestCase-1.cpp
|
||||
020-TestCase-2.cpp
|
||||
)
|
||||
# single-file sources:
|
||||
|
||||
add_executable(231-Cfg_OutputStreams
|
||||
set( SOURCES_SINGLE_FILE
|
||||
010-TestCase.cpp
|
||||
231-Cfg-OutputStreams.cpp
|
||||
)
|
||||
target_link_libraries(231-Cfg_OutputStreams Catch2_buildall_interface)
|
||||
target_compile_definitions(231-Cfg_OutputStreams PUBLIC CATCH_CONFIG_NOSTDOUT)
|
||||
|
||||
# These examples use the standard separate compilation
|
||||
set( SOURCES_IDIOMATIC_EXAMPLES
|
||||
# multiple-file modules:
|
||||
|
||||
set( SOURCES_020
|
||||
020-TestCase-1.cpp
|
||||
020-TestCase-2.cpp
|
||||
)
|
||||
|
||||
# main for idiomatic test sources:
|
||||
|
||||
set( SOURCES_IDIOMATIC_MAIN
|
||||
000-CatchMain.cpp
|
||||
)
|
||||
|
||||
# sources to combine with 000-CatchMain.cpp:
|
||||
|
||||
set( SOURCES_IDIOMATIC_TESTS
|
||||
030-Asn-Require-Check.cpp
|
||||
100-Fix-Section.cpp
|
||||
110-Fix-ClassFixture.cpp
|
||||
@ -36,24 +50,94 @@ set( SOURCES_IDIOMATIC_EXAMPLES
|
||||
311-Gen-CustomCapture.cpp
|
||||
)
|
||||
|
||||
string( REPLACE ".cpp" "" BASENAMES_IDIOMATIC_EXAMPLES "${SOURCES_IDIOMATIC_EXAMPLES}" )
|
||||
set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} )
|
||||
# main-s for reporter-specific test sources:
|
||||
|
||||
|
||||
foreach( name ${TARGETS_IDIOMATIC_EXAMPLES} )
|
||||
add_executable( ${name}
|
||||
000-CatchMain.cpp
|
||||
${EXAMPLES_DIR}/${name}.cpp )
|
||||
endforeach()
|
||||
|
||||
set(ALL_EXAMPLE_TARGETS
|
||||
${TARGETS_IDIOMATIC_EXAMPLES}
|
||||
010-TestCase
|
||||
020-MultiFile
|
||||
set( SOURCES_REPORTERS_MAIN
|
||||
200-Rpt-CatchMain.cpp
|
||||
)
|
||||
|
||||
foreach( name ${ALL_EXAMPLE_TARGETS} )
|
||||
target_link_libraries( ${name} Catch2 )
|
||||
string( REPLACE ".cpp" "" BASENAMES_REPORTERS_MAIN 200-Rpt-CatchMain.cpp )
|
||||
|
||||
set( NAMES_REPORTERS TeamCity )
|
||||
|
||||
foreach( reporter ${NAMES_REPORTERS} )
|
||||
list( APPEND SOURCES_SPECIFIC_REPORTERS_MAIN ${BASENAMES_REPORTERS_MAIN}${reporter}.cpp )
|
||||
endforeach()
|
||||
|
||||
# sources to combine with 200-Rpt-CatchMain{Reporter}.cpp:
|
||||
|
||||
set( SOURCES_REPORTERS_TESTS
|
||||
207-Rpt-TeamCityReporter.cpp
|
||||
)
|
||||
|
||||
# check if all sources are listed, warn if not:
|
||||
|
||||
set( SOURCES_ALL
|
||||
${SOURCES_020}
|
||||
${SOURCES_SINGLE_FILE}
|
||||
${SOURCES_IDIOMATIC_MAIN}
|
||||
${SOURCES_IDIOMATIC_TESTS}
|
||||
${SOURCES_REPORTERS_MAIN}
|
||||
${SOURCES_REPORTERS_TESTS}
|
||||
)
|
||||
|
||||
foreach( name ${SOURCES_ALL} )
|
||||
list( APPEND SOURCES_ALL_PATH ${EXAMPLES_DIR}/${name} )
|
||||
endforeach()
|
||||
|
||||
CheckFileList( SOURCES_ALL_PATH ${EXAMPLES_DIR} )
|
||||
|
||||
# create target names:
|
||||
|
||||
string( REPLACE ".cpp" "" BASENAMES_SINGLE_FILE "${SOURCES_SINGLE_FILE}" )
|
||||
string( REPLACE ".cpp" "" BASENAMES_IDIOMATIC_TESTS "${SOURCES_IDIOMATIC_TESTS}" )
|
||||
string( REPLACE ".cpp" "" BASENAMES_REPORTERS_TESTS "${SOURCES_REPORTERS_TESTS}" )
|
||||
string( REPLACE ".cpp" "" BASENAMES_REPORTERS_MAIN "${SOURCES_REPORTERS_MAIN}" )
|
||||
|
||||
set( TARGETS_SINGLE_FILE ${BASENAMES_SINGLE_FILE} )
|
||||
set( TARGETS_IDIOMATIC_TESTS ${BASENAMES_IDIOMATIC_TESTS} )
|
||||
set( TARGETS_REPORTERS_TESTS ${BASENAMES_REPORTERS_TESTS} )
|
||||
set( TARGETS_REPORTERS_MAIN ${BASENAMES_REPORTERS_MAIN} )
|
||||
|
||||
set( TARGETS_ALL
|
||||
${TARGETS_SINGLE_FILE}
|
||||
020-TestCase
|
||||
${TARGETS_IDIOMATIC_TESTS} CatchMain
|
||||
${TARGETS_REPORTERS_TESTS} CatchMainTeamCity
|
||||
)
|
||||
|
||||
# define program targets:
|
||||
|
||||
add_library( CatchMain OBJECT ${EXAMPLES_DIR}/${SOURCES_IDIOMATIC_MAIN} ${HEADER_DIR}/catch2/catch.hpp )
|
||||
#add_library( CatchMainAutomake OBJECT ${EXAMPLES_DIR}/200-Rpt-CatchMain.cpp ${HEADER_DIR}/catch2/catch.hpp )
|
||||
#add_library( CatchMainTap OBJECT ${EXAMPLES_DIR}/200-Rpt-CatchMain.cpp ${HEADER_DIR}/catch2/catch.hpp )
|
||||
add_library( CatchMainTeamCity OBJECT ${EXAMPLES_DIR}/200-Rpt-CatchMain.cpp ${HEADER_DIR}/catch2/catch.hpp )
|
||||
|
||||
#target_compile_definitions( CatchMainAutomake PRIVATE CATCH_EXAMPLE_RPT_1=\"include/reporters/catch_reporter_automake.hpp\" )
|
||||
#target_compile_definitions( CatchMainTap PRIVATE CATCH_EXAMPLE_RPT_1=\"include/reporters/catch_reporter_tap.hpp\" )
|
||||
target_compile_definitions( CatchMainTeamCity PRIVATE CATCH_EXAMPLE_RPT_1=\"include/reporters/catch_reporter_teamcity.hpp\" )
|
||||
|
||||
foreach( name ${TARGETS_SINGLE_FILE} )
|
||||
add_executable( ${name} ${EXAMPLES_DIR}/${name}.cpp ${HEADER_DIR}/catch2/catch.hpp )
|
||||
endforeach()
|
||||
|
||||
foreach( name ${TARGETS_IDIOMATIC_TESTS} )
|
||||
add_executable( ${name} ${EXAMPLES_DIR}/${name}.cpp $<TARGET_OBJECTS:CatchMain> ${HEADER_DIR}/catch2/catch.hpp )
|
||||
endforeach()
|
||||
|
||||
add_executable( 020-TestCase ${EXAMPLES_DIR}/020-TestCase-1.cpp ${EXAMPLES_DIR}/020-TestCase-2.cpp ${HEADER_DIR}/catch2/catch.hpp )
|
||||
|
||||
#add_executable( 207-Rpt-AutomakeReporter ${EXAMPLES_DIR}/207-Rpt-AutomakeReporter.cpp $<TARGET_OBJECTS:CatchMainAutomake> ${HEADER_DIR}/catch2/catch.hpp )
|
||||
#add_executable( 207-Rpt-TapReporter ${EXAMPLES_DIR}/207-Rpt-TapReporter.cpp $<TARGET_OBJECTS:CatchMainTap> ${HEADER_DIR}/catch2/catch.hpp )
|
||||
add_executable( 207-Rpt-TeamCityReporter ${EXAMPLES_DIR}/207-Rpt-TeamCityReporter.cpp $<TARGET_OBJECTS:CatchMainTeamCity> ${HEADER_DIR}/catch2/catch.hpp )
|
||||
|
||||
#foreach( name ${TARGETS_REPORTERS_TESTS} )
|
||||
# add_executable( ${name} ${EXAMPLES_DIR}/${name}.cpp $<TARGET_OBJECTS:CatchMain> ${HEADER_DIR}/catch2/catch.hpp )
|
||||
#endforeach()
|
||||
|
||||
foreach( name ${TARGETS_ALL} )
|
||||
target_include_directories( ${name} PRIVATE ${HEADER_DIR} ${CATCH_DIR} )
|
||||
|
||||
set_property(TARGET ${name} PROPERTY CXX_STANDARD 14)
|
||||
set_property(TARGET ${name} PROPERTY CXX_EXTENSIONS OFF)
|
||||
|
||||
@ -70,3 +154,4 @@ foreach( name ${ALL_EXAMPLE_TARGETS} )
|
||||
target_compile_options( ${name} PRIVATE /W4 /w44265 /WX )
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
@ -19,45 +19,81 @@
|
||||
# pragma GCC system_header
|
||||
#endif
|
||||
|
||||
#include <catch2/catch_suppress_warnings.h>
|
||||
#include "internal/catch_suppress_warnings.h"
|
||||
|
||||
#if defined(CATCH_CONFIG_MAIN) || defined(CATCH_CONFIG_RUNNER)
|
||||
# define CATCH_IMPL
|
||||
# define CATCH_CONFIG_ALL_PARTS
|
||||
#endif
|
||||
|
||||
// In the impl file, we want to have access to all parts of the headers
|
||||
// Can also be used to sanely support PCHs
|
||||
#if defined(CATCH_CONFIG_ALL_PARTS)
|
||||
# define CATCH_CONFIG_EXTERNAL_INTERFACES
|
||||
# if defined(CATCH_CONFIG_DISABLE_MATCHERS)
|
||||
# undef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
# endif
|
||||
# if !defined(CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER)
|
||||
# define CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if !defined(CATCH_CONFIG_IMPL_ONLY)
|
||||
#include <catch2/catch_platform.h>
|
||||
#include "internal/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>
|
||||
#ifdef CATCH_IMPL
|
||||
# ifndef CLARA_CONFIG_MAIN
|
||||
# define CLARA_CONFIG_MAIN_NOT_DEFINED
|
||||
# define CLARA_CONFIG_MAIN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "internal/catch_user_interfaces.h"
|
||||
#include "internal/catch_tag_alias_autoregistrar.h"
|
||||
#include "internal/catch_test_registry.h"
|
||||
#include "internal/catch_capture.hpp"
|
||||
#include "internal/catch_section.h"
|
||||
#include "internal/catch_interfaces_exception.h"
|
||||
#include "internal/catch_approx.h"
|
||||
#include "internal/catch_compiler_capabilities.h"
|
||||
#include "internal/catch_string_manip.h"
|
||||
|
||||
#ifndef CATCH_CONFIG_DISABLE_MATCHERS
|
||||
#include <catch2/catch_capture_matchers.h>
|
||||
#include "internal/catch_capture_matchers.h"
|
||||
#endif
|
||||
#include <catch2/catch_generators.hpp>
|
||||
#include <catch2/catch_generators_generic.hpp>
|
||||
#include <catch2/catch_generators_specific.hpp>
|
||||
#include "internal/catch_generators.hpp"
|
||||
#include "internal/catch_generators_generic.hpp"
|
||||
#include "internal/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>
|
||||
#include "internal/catch_test_case_info.h"
|
||||
#include "internal/catch_interfaces_runner.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
#include <catch2/catch_objc.hpp>
|
||||
#include "internal/catch_objc.hpp"
|
||||
#endif
|
||||
|
||||
#include <catch2/catch_external_interfaces.h>
|
||||
// Benchmarking needs the externally-facing parts of reporters to work
|
||||
#if defined(CATCH_CONFIG_EXTERNAL_INTERFACES) || defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||
#include "internal/catch_external_interfaces.h"
|
||||
#endif
|
||||
|
||||
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||
#include <catch2/benchmark/catch_benchmark.hpp>
|
||||
#include "internal/benchmark/catch_benchmark.hpp"
|
||||
#endif
|
||||
|
||||
#endif // ! CATCH_CONFIG_IMPL_ONLY
|
||||
|
||||
#ifdef CATCH_IMPL
|
||||
#include "internal/catch_impl.hpp"
|
||||
#endif
|
||||
|
||||
#ifdef CATCH_CONFIG_MAIN
|
||||
#include "internal/catch_default_main.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(CATCH_CONFIG_IMPL_ONLY)
|
||||
|
||||
#ifdef CLARA_CONFIG_MAIN_NOT_DEFINED
|
||||
@ -449,6 +485,6 @@ using Catch::Detail::Approx;
|
||||
|
||||
#endif // ! CATCH_CONFIG_IMPL_ONLY
|
||||
|
||||
#include <catch2/catch_reenable_warnings.h>
|
||||
#include "internal/catch_reenable_warnings.h"
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED
|
@ -10,20 +10,20 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_BENCHMARK_HPP_INCLUDED
|
||||
#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 "../catch_config.hpp"
|
||||
#include "../catch_context.h"
|
||||
#include "../catch_interfaces_reporter.h"
|
||||
#include "../catch_test_registry.h"
|
||||
|
||||
#include <catch2/benchmark/catch_chronometer.hpp>
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_environment.hpp>
|
||||
#include <catch2/benchmark/catch_execution_plan.hpp>
|
||||
#include <catch2/benchmark/detail/catch_estimate_clock.hpp>
|
||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
||||
#include <catch2/benchmark/detail/catch_analyse.hpp>
|
||||
#include <catch2/benchmark/detail/catch_benchmark_function.hpp>
|
||||
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
||||
#include "catch_chronometer.hpp"
|
||||
#include "catch_clock.hpp"
|
||||
#include "catch_environment.hpp"
|
||||
#include "catch_execution_plan.hpp"
|
||||
#include "detail/catch_estimate_clock.hpp"
|
||||
#include "detail/catch_complete_invoke.hpp"
|
||||
#include "detail/catch_analyse.hpp"
|
||||
#include "detail/catch_benchmark_function.hpp"
|
||||
#include "detail/catch_run_for_at_least.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
@ -11,10 +11,10 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_CHRONOMETER_HPP_INCLUDED
|
||||
|
||||
#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 "catch_clock.hpp"
|
||||
#include "catch_optimizer.hpp"
|
||||
#include "detail/catch_complete_invoke.hpp"
|
||||
#include "../catch_meta.hpp"
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
@ -11,8 +11,8 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_ENVIRONMENT_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_outlier_classification.hpp>
|
||||
#include "catch_clock.hpp"
|
||||
#include "catch_outlier_classification.hpp"
|
||||
|
||||
namespace Catch {
|
||||
namespace Benchmark {
|
@ -11,12 +11,12 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_EXECUTION_PLAN_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_config.hpp>
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_environment.hpp>
|
||||
#include <catch2/benchmark/detail/catch_benchmark_function.hpp>
|
||||
#include <catch2/benchmark/detail/catch_repeat.hpp>
|
||||
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
||||
#include "../catch_config.hpp"
|
||||
#include "catch_clock.hpp"
|
||||
#include "catch_environment.hpp"
|
||||
#include "detail/catch_benchmark_function.hpp"
|
||||
#include "detail/catch_repeat.hpp"
|
||||
#include "detail/catch_run_for_at_least.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
|
@ -11,9 +11,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_BENCHMARK_RESULTS_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_estimate.hpp>
|
||||
#include <catch2/benchmark/catch_outlier_classification.hpp>
|
||||
#include "catch_clock.hpp"
|
||||
#include "catch_estimate.hpp"
|
||||
#include "catch_outlier_classification.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
@ -11,9 +11,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DETAIL_ANALYSE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_sample_analysis.hpp>
|
||||
#include <catch2/benchmark/detail/catch_stats.hpp>
|
||||
#include "../catch_clock.hpp"
|
||||
#include "../catch_sample_analysis.hpp"
|
||||
#include "catch_stats.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
@ -11,9 +11,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DETAIL_BENCHMARK_FUNCTION_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_chronometer.hpp>
|
||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
||||
#include <catch2/catch_meta.hpp>
|
||||
#include "../catch_chronometer.hpp"
|
||||
#include "catch_complete_invoke.hpp"
|
||||
#include "../../catch_meta.hpp"
|
||||
|
||||
#include <cassert>
|
||||
#include <type_traits>
|
@ -11,7 +11,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DETAIL_COMPLETE_INVOKE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_enforce.h>
|
||||
#include "../../catch_enforce.h"
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
@ -11,12 +11,12 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DETAIL_ESTIMATE_CLOCK_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_environment.hpp>
|
||||
#include <catch2/benchmark/detail/catch_stats.hpp>
|
||||
#include <catch2/benchmark/detail/catch_measure.hpp>
|
||||
#include <catch2/benchmark/detail/catch_run_for_at_least.hpp>
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include "../catch_clock.hpp"
|
||||
#include "../catch_environment.hpp"
|
||||
#include "catch_stats.hpp"
|
||||
#include "catch_measure.hpp"
|
||||
#include "catch_run_for_at_least.hpp"
|
||||
#include "../catch_clock.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iterator>
|
@ -11,9 +11,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DETAIL_MEASURE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
||||
#include <catch2/benchmark/detail/catch_timing.hpp>
|
||||
#include "../catch_clock.hpp"
|
||||
#include "catch_complete_invoke.hpp"
|
||||
#include "catch_timing.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
@ -11,12 +11,12 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_RUN_FOR_AT_LEAST_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_chronometer.hpp>
|
||||
#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 "../catch_clock.hpp"
|
||||
#include "../catch_chronometer.hpp"
|
||||
#include "catch_measure.hpp"
|
||||
#include "catch_complete_invoke.hpp"
|
||||
#include "catch_timing.hpp"
|
||||
#include "../../catch_meta.hpp"
|
||||
|
||||
#include <utility>
|
||||
#include <type_traits>
|
@ -10,9 +10,9 @@
|
||||
|
||||
#if defined(CATCH_CONFIG_ENABLE_BENCHMARKING)
|
||||
|
||||
#include <catch2/benchmark/detail/catch_stats.hpp>
|
||||
#include "catch_stats.hpp"
|
||||
|
||||
#include <catch2/catch_compiler_capabilities.h>
|
||||
#include "../../catch_compiler_capabilities.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <random>
|
@ -11,9 +11,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DETAIL_ANALYSIS_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DETAIL_ANALYSIS_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/catch_estimate.hpp>
|
||||
#include <catch2/benchmark/catch_outlier_classification.hpp>
|
||||
#include "../catch_clock.hpp"
|
||||
#include "../catch_estimate.hpp"
|
||||
#include "../catch_outlier_classification.hpp"
|
||||
|
||||
#include <algorithm>
|
||||
#include <functional>
|
@ -11,8 +11,8 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DETAIL_TIMING_HPP_INCLUDED
|
||||
|
||||
#include <catch2/benchmark/catch_clock.hpp>
|
||||
#include <catch2/benchmark/detail/catch_complete_invoke.hpp>
|
||||
#include "../catch_clock.hpp"
|
||||
#include "catch_complete_invoke.hpp"
|
||||
|
||||
#include <tuple>
|
||||
#include <type_traits>
|
@ -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 "catch_approx.h"
|
||||
#include "catch_enforce.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <limits>
|
@ -8,7 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_APPROX_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_APPROX_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_tostring.h>
|
||||
#include "catch_tostring.h"
|
||||
|
||||
#include <type_traits>
|
||||
|
@ -6,16 +6,15 @@
|
||||
* 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/catch_capture_matchers.h>
|
||||
#include <catch2/catch_run_context.h>
|
||||
#include "catch_assertionhandler.h"
|
||||
#include "catch_assertionresult.h"
|
||||
#include "catch_interfaces_runner.h"
|
||||
#include "catch_interfaces_config.h"
|
||||
#include "catch_context.h"
|
||||
#include "catch_debugger.h"
|
||||
#include "catch_interfaces_registry_hub.h"
|
||||
#include "catch_capture_matchers.h"
|
||||
#include "catch_run_context.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -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 "catch_assertioninfo.h"
|
||||
#include "catch_decomposer.h"
|
||||
#include "catch_interfaces_capture.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -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 "catch_result_type.h"
|
||||
#include "catch_common.h"
|
||||
#include "catch_stringref.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -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 "catch_assertionresult.h"
|
||||
|
||||
namespace Catch {
|
||||
AssertionResultData::AssertionResultData(ResultWas::OfType _resultType, LazyExpression const & _lazyExpression):
|
@ -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 "catch_assertioninfo.h"
|
||||
#include "catch_result_type.h"
|
||||
#include "catch_common.h"
|
||||
#include "catch_stringref.h"
|
||||
#include "catch_assertionhandler.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -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 "catch_assertionhandler.h"
|
||||
#include "catch_interfaces_capture.h"
|
||||
#include "catch_message.h"
|
||||
#include "catch_stringref.h"
|
||||
|
||||
#if !defined(CATCH_CONFIG_DISABLE)
|
||||
|
@ -5,8 +5,8 @@
|
||||
* 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/catch_capture_matchers.h>
|
||||
#include <catch2/catch_interfaces_registry_hub.h>
|
||||
#include "catch_capture_matchers.h"
|
||||
#include "catch_interfaces_registry_hub.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -8,14 +8,14 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_CAPTURE_MATCHERS_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_CAPTURE_MATCHERS_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_capture.hpp>
|
||||
#include <catch2/catch_matchers.h>
|
||||
#include <catch2/catch_matchers_exception.hpp>
|
||||
#include <catch2/catch_matchers_floating.h>
|
||||
#include <catch2/catch_matchers_generic.hpp>
|
||||
#include <catch2/catch_matchers_string.h>
|
||||
#include <catch2/catch_matchers_vector.h>
|
||||
#include <catch2/catch_stringref.h>
|
||||
#include "catch_capture.hpp"
|
||||
#include "catch_matchers.h"
|
||||
#include "catch_matchers_exception.hpp"
|
||||
#include "catch_matchers_floating.h"
|
||||
#include "catch_matchers_generic.hpp"
|
||||
#include "catch_matchers_string.h"
|
||||
#include "catch_matchers_vector.h"
|
||||
#include "catch_stringref.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -23,7 +23,7 @@
|
||||
#pragma clang diagnostic ignored "-Wshadow"
|
||||
#endif
|
||||
|
||||
#include <catch2/external/clara.hpp>
|
||||
#include "../external/clara.hpp"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
@ -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 "catch_commandline.h"
|
||||
|
||||
#include <catch2/catch_string_manip.h>
|
||||
#include "catch_string_manip.h"
|
||||
|
||||
#include <catch2/catch_interfaces_registry_hub.h>
|
||||
#include <catch2/catch_interfaces_reporter.h>
|
||||
#include "catch_interfaces_registry_hub.h"
|
||||
#include "catch_interfaces_reporter.h"
|
||||
|
||||
#include <fstream>
|
||||
#include <ctime>
|
@ -8,8 +8,8 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_COMMANDLINE_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_COMMANDLINE_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_config.hpp>
|
||||
#include <catch2/catch_clara.h>
|
||||
#include "catch_config.hpp"
|
||||
#include "catch_clara.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -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 "catch_common.h"
|
||||
#include "catch_context.h"
|
||||
#include "catch_interfaces_config.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <ostream>
|
@ -8,7 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED
|
||||
|
||||
#include <catch2/catch_compiler_capabilities.h>
|
||||
#include "catch_compiler_capabilities.h"
|
||||
|
||||
#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 )
|
@ -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 "catch_platform.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -5,9 +5,9 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch_config.hpp>
|
||||
#include <catch2/catch_enforce.h>
|
||||
#include <catch2/catch_stringref.h>
|
||||
#include "catch_config.hpp"
|
||||
#include "catch_enforce.h"
|
||||
#include "catch_stringref.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -8,11 +8,11 @@
|
||||
#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 "catch_test_spec_parser.h"
|
||||
#include "catch_interfaces_config.h"
|
||||
|
||||
// Libstdc++ doesn't like incomplete classes for unique_ptr
|
||||
#include <catch2/catch_stream.h>
|
||||
#include "catch_stream.h"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
@ -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 "catch_console_colour.h"
|
||||
#include "catch_enforce.h"
|
||||
#include "catch_errno_guard.h"
|
||||
#include "catch_interfaces_config.h"
|
||||
#include "catch_stream.h"
|
||||
#include "catch_context.h"
|
||||
#include "catch_platform.h"
|
||||
#include "catch_debugger.h"
|
||||
#include "catch_windows_h_proxy.h"
|
||||
|
||||
#include <sstream>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_CONSOLE_COLOUR_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_CONSOLE_COLOUR_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_common.h>
|
||||
#include "catch_common.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -5,9 +5,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/catch_context.h>
|
||||
#include <catch2/catch_common.h>
|
||||
#include <catch2/catch_random_number_generator.h>
|
||||
#include "catch_context.h"
|
||||
#include "catch_common.h"
|
||||
#include "catch_random_number_generator.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -6,11 +6,11 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <catch2/catch_debug_console.h>
|
||||
#include <catch2/catch_compiler_capabilities.h>
|
||||
#include <catch2/catch_stream.h>
|
||||
#include <catch2/catch_platform.h>
|
||||
#include <catch2/catch_windows_h_proxy.h>
|
||||
#include "catch_debug_console.h"
|
||||
#include "catch_compiler_capabilities.h"
|
||||
#include "catch_stream.h"
|
||||
#include "catch_platform.h"
|
||||
#include "catch_windows_h_proxy.h"
|
||||
|
||||
#if defined(CATCH_CONFIG_ANDROID_LOGWRITE)
|
||||
#include <android/log.h>
|
@ -7,10 +7,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <catch2/catch_debugger.h>
|
||||
#include <catch2/catch_errno_guard.h>
|
||||
#include <catch2/catch_stream.h>
|
||||
#include <catch2/catch_platform.h>
|
||||
#include "catch_debugger.h"
|
||||
#include "catch_errno_guard.h"
|
||||
#include "catch_stream.h"
|
||||
#include "catch_platform.h"
|
||||
|
||||
#ifdef CATCH_PLATFORM_MAC
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED
|
||||
|
||||
#include <catch2/catch_platform.h>
|
||||
#include "catch_platform.h"
|
||||
|
||||
namespace Catch {
|
||||
bool isDebuggerActive();
|
@ -6,8 +6,8 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch_decomposer.h>
|
||||
#include <catch2/catch_config.hpp>
|
||||
#include "catch_decomposer.h"
|
||||
#include "catch_config.hpp"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -8,9 +8,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DECOMPOSER_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DECOMPOSER_H_INCLUDED
|
||||
|
||||
#include <catch2/catch_tostring.h>
|
||||
#include <catch2/catch_stringref.h>
|
||||
#include <catch2/catch_meta.hpp>
|
||||
#include "catch_tostring.h"
|
||||
#include "catch_stringref.h"
|
||||
#include "catch_meta.hpp"
|
||||
|
||||
#include <iosfwd>
|
||||
|
@ -8,7 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_DEFAULT_MAIN_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_session.h>
|
||||
#include "catch_session.h"
|
||||
|
||||
#ifndef __OBJC__
|
||||
|
@ -5,7 +5,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch_enforce.h>
|
||||
#include "catch_enforce.h"
|
||||
|
||||
#include <stdexcept>
|
||||
|
@ -7,9 +7,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_ENFORCE_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_ENFORCE_H_INCLUDED
|
||||
|
||||
#include <catch2/catch_common.h>
|
||||
#include <catch2/catch_compiler_capabilities.h>
|
||||
#include <catch2/catch_stream.h>
|
||||
#include "catch_common.h"
|
||||
#include "catch_compiler_capabilities.h"
|
||||
#include "catch_stream.h"
|
||||
|
||||
#include <exception>
|
||||
|
@ -5,9 +5,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/catch_enum_values_registry.h>
|
||||
#include <catch2/catch_string_manip.h>
|
||||
#include <catch2/catch_stream.h>
|
||||
#include "catch_enum_values_registry.h"
|
||||
#include "catch_string_manip.h"
|
||||
#include "catch_stream.h"
|
||||
|
||||
#include <map>
|
||||
#include <cassert>
|
@ -8,7 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_ENUMVALUESREGISTRY_H_INCLUDED
|
||||
|
||||
#include <catch2/catch_interfaces_enum_values_registry.h>
|
||||
#include "catch_interfaces_enum_values_registry.h"
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
@ -5,7 +5,7 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch_errno_guard.h>
|
||||
#include "catch_errno_guard.h"
|
||||
|
||||
#include <cerrno>
|
||||
|
@ -6,10 +6,10 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch_exception_translator_registry.h>
|
||||
#include <catch2/catch_assertionhandler.h>
|
||||
#include <catch2/catch_compiler_capabilities.h>
|
||||
#include <catch2/catch_enforce.h>
|
||||
#include "catch_exception_translator_registry.h"
|
||||
#include "catch_assertionhandler.h"
|
||||
#include "catch_compiler_capabilities.h"
|
||||
#include "catch_enforce.h"
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import "Foundation/Foundation.h"
|
@ -8,7 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
|
||||
|
||||
#include <catch2/catch_interfaces_exception.h>
|
||||
#include "catch_interfaces_exception.h"
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <memory>
|
@ -7,14 +7,14 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_EXTERNAL_INTERFACES_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_EXTERNAL_INTERFACES_H_INCLUDED
|
||||
|
||||
#include <catch2/reporters/catch_reporter_bases.hpp>
|
||||
#include <catch2/catch_console_colour.h>
|
||||
#include <catch2/catch_reporter_registrars.hpp>
|
||||
#include "../reporters/catch_reporter_bases.hpp"
|
||||
#include "catch_console_colour.h"
|
||||
#include "catch_reporter_registrars.hpp"
|
||||
|
||||
// Allow users to base their work off existing reporters
|
||||
#include <catch2/reporters/catch_reporter_compact.h>
|
||||
#include <catch2/reporters/catch_reporter_console.h>
|
||||
#include <catch2/reporters/catch_reporter_junit.h>
|
||||
#include <catch2/reporters/catch_reporter_xml.h>
|
||||
#include "../reporters/catch_reporter_compact.h"
|
||||
#include "../reporters/catch_reporter_console.h"
|
||||
#include "../reporters/catch_reporter_junit.h"
|
||||
#include "../reporters/catch_reporter_xml.h"
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_EXTERNAL_INTERFACES_H_INCLUDED
|
@ -7,10 +7,10 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <catch2/catch_fatal_condition.h>
|
||||
#include "catch_fatal_condition.h"
|
||||
|
||||
#include <catch2/catch_context.h>
|
||||
#include <catch2/catch_interfaces_capture.h>
|
||||
#include "catch_context.h"
|
||||
#include "catch_interfaces_capture.h"
|
||||
|
||||
#if defined(__GNUC__)
|
||||
# pragma GCC diagnostic push
|
@ -9,9 +9,9 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_FATAL_CONDITION_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_FATAL_CONDITION_H_INCLUDED
|
||||
|
||||
#include <catch2/catch_platform.h>
|
||||
#include <catch2/catch_compiler_capabilities.h>
|
||||
#include <catch2/catch_windows_h_proxy.h>
|
||||
#include "catch_platform.h"
|
||||
#include "catch_compiler_capabilities.h"
|
||||
#include "catch_windows_h_proxy.h"
|
||||
|
||||
|
||||
#if defined( CATCH_CONFIG_WINDOWS_SEH )
|
@ -5,9 +5,9 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#include <catch2/catch_generators.hpp>
|
||||
#include <catch2/catch_random_number_generator.h>
|
||||
#include <catch2/catch_interfaces_capture.h>
|
||||
#include "catch_generators.hpp"
|
||||
#include "catch_random_number_generator.h"
|
||||
#include "catch_interfaces_capture.h"
|
||||
|
||||
#include <limits>
|
||||
#include <set>
|
@ -7,9 +7,9 @@
|
||||
#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/catch_enforce.h>
|
||||
#include "catch_interfaces_generatortracker.h"
|
||||
#include "catch_common.h"
|
||||
#include "catch_enforce.h"
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
@ -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 "catch_generators.hpp"
|
||||
#include "catch_meta.hpp"
|
||||
|
||||
namespace Catch {
|
||||
namespace Generators {
|
@ -7,10 +7,10 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_GENERATORS_SPECIFIC_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_GENERATORS_SPECIFIC_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 "catch_context.h"
|
||||
#include "catch_generators.hpp"
|
||||
#include "catch_interfaces_config.h"
|
||||
#include "catch_random_number_generator.h"
|
||||
|
||||
#include <random>
|
||||
|
@ -14,10 +14,10 @@
|
||||
#endif
|
||||
|
||||
// Keep these here for external reporters
|
||||
#include <catch2/catch_test_spec.h>
|
||||
#include <catch2/catch_test_case_tracker.h>
|
||||
#include "catch_test_spec.h"
|
||||
#include "catch_test_case_tracker.h"
|
||||
|
||||
#include <catch2/catch_leak_detector.h>
|
||||
#include "catch_leak_detector.h"
|
||||
|
||||
// Cpp files will be included in the single-header file here
|
||||
// ~*~* CATCH_CPP_STITCH_PLACE *~*~
|
@ -1,4 +1,4 @@
|
||||
#include <catch2/catch_interfaces_capture.h>
|
||||
#include "catch_interfaces_capture.h"
|
||||
|
||||
namespace Catch {
|
||||
IResultCapture::~IResultCapture() = default;
|
@ -11,8 +11,8 @@
|
||||
#include <string>
|
||||
#include <chrono>
|
||||
|
||||
#include <catch2/catch_stringref.h>
|
||||
#include <catch2/catch_result_type.h>
|
||||
#include "catch_stringref.h"
|
||||
#include "catch_result_type.h"
|
||||
|
||||
namespace Catch {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <catch2/catch_interfaces_config.h>
|
||||
#include "catch_interfaces_config.h"
|
||||
|
||||
namespace Catch {
|
||||
IConfig::~IConfig() = default;
|
@ -8,8 +8,8 @@
|
||||
#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 "catch_common.h"
|
||||
#include "catch_option.hpp"
|
||||
|
||||
#include <iosfwd>
|
||||
#include <string>
|
@ -8,7 +8,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_INTERFACESENUMVALUESREGISTRY_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_INTERFACESENUMVALUESREGISTRY_H_INCLUDED
|
||||
|
||||
#include <catch2/catch_stringref.h>
|
||||
#include "catch_stringref.h"
|
||||
|
||||
#include <vector>
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <catch2/catch_interfaces_exception.h>
|
||||
#include "catch_interfaces_exception.h"
|
||||
|
||||
namespace Catch {
|
||||
IExceptionTranslator::~IExceptionTranslator() = default;
|
@ -8,8 +8,7 @@
|
||||
#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 "catch_interfaces_registry_hub.h"
|
||||
|
||||
#if defined(CATCH_CONFIG_DISABLE)
|
||||
#define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \
|
||||
@ -47,7 +46,6 @@ namespace Catch {
|
||||
{}
|
||||
|
||||
std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {
|
||||
#if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
|
||||
try {
|
||||
if( it == itEnd )
|
||||
std::rethrow_exception(std::current_exception());
|
||||
@ -57,9 +55,6 @@ namespace Catch {
|
||||
catch( T& ex ) {
|
||||
return m_translateFunction( ex );
|
||||
}
|
||||
#else
|
||||
return "You should never get here!";
|
||||
#endif
|
||||
}
|
||||
|
||||
protected:
|
@ -1,4 +1,4 @@
|
||||
#include <catch2/catch_interfaces_registry_hub.h>
|
||||
#include "catch_interfaces_registry_hub.h"
|
||||
|
||||
namespace Catch {
|
||||
IRegistryHub::~IRegistryHub() = default;
|
@ -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 "catch_common.h"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
@ -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 "catch_interfaces_reporter.h"
|
||||
#include "catch_console_colour.h"
|
||||
#include "../reporters/catch_reporter_listening.h"
|
||||
#include "catch_list.h"
|
||||
#include "catch_text.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user