From 02c97cd0f7c4d630f1a90f9f2626746e47a28c09 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sun, 5 Feb 2017 15:45:26 +0100 Subject: [PATCH] Updated Catch to latest (nw) --- 3rdparty/catch/.gitignore | 8 +- 3rdparty/catch/.travis.yml | 8 +- 3rdparty/catch/CMakeLists.txt | 262 + 3rdparty/catch/README.md | 6 +- 3rdparty/catch/catch-logo-tiny.png | Bin 0 -> 5853 bytes 3rdparty/catch/docs/Readme.md | 1 + 3rdparty/catch/docs/assertions.md | 9 + 3rdparty/catch/docs/build-systems.md | 2 +- 3rdparty/catch/docs/command-line.md | 62 +- 3rdparty/catch/docs/configuration.md | 11 +- 3rdparty/catch/docs/contributing.md | 32 +- 3rdparty/catch/docs/own-main.md | 16 +- 3rdparty/catch/docs/release-notes.md | 77 + .../catch/docs/test-cases-and-sections.md | 12 +- 3rdparty/catch/docs/test-fixtures.md | 4 +- 3rdparty/catch/docs/tutorial.md | 2 +- 3rdparty/catch/include/catch.hpp | 4 +- 3rdparty/catch/include/external/clara.h | 5 +- .../catch/include/external/tbc_text_format.h | 111 +- .../catch/include/internal/catch_approx.hpp | 72 + .../include/internal/catch_assertionresult.h | 57 +- .../internal/catch_assertionresult.hpp | 12 +- .../catch/include/internal/catch_capture.hpp | 19 +- .../include/internal/catch_commandline.hpp | 21 +- .../catch/include/internal/catch_common.h | 9 +- .../catch/include/internal/catch_common.hpp | 39 +- .../internal/catch_compiler_capabilities.h | 28 +- .../catch/include/internal/catch_config.hpp | 4 +- .../internal/catch_console_colour_impl.hpp | 12 +- .../include/internal/catch_context_impl.hpp | 6 + .../catch/include/internal/catch_debugger.h | 37 +- .../catch/include/internal/catch_debugger.hpp | 27 + .../include/internal/catch_default_main.hpp | 5 +- .../include/internal/catch_expression_lhs.hpp | 143 +- .../internal/catch_fatal_condition.hpp | 138 +- .../internal/catch_interfaces_config.h | 4 +- .../internal/catch_interfaces_reporter.h | 2 +- .../catch/include/internal/catch_list.hpp | 16 +- .../catch/include/internal/catch_matchers.hpp | 10 +- .../catch/include/internal/catch_platform.h | 14 +- .../internal/catch_reporter_registrars.hpp | 2 +- .../include/internal/catch_result_builder.h | 34 +- .../include/internal/catch_result_builder.hpp | 70 +- .../include/internal/catch_run_context.hpp | 22 +- .../catch/include/internal/catch_stream.h | 1 + .../catch/include/internal/catch_stream.hpp | 2 +- .../internal/catch_tag_alias_registry.hpp | 4 +- .../include/internal/catch_test_case_info.h | 3 +- .../include/internal/catch_test_case_info.hpp | 6 +- .../catch_test_case_registry_impl.hpp | 13 +- .../internal/catch_test_case_tracker.hpp | 103 +- .../internal/catch_test_spec_parser.hpp | 18 +- .../catch/include/internal/catch_timer.hpp | 2 +- .../catch/include/internal/catch_tostring.hpp | 32 +- .../catch/include/internal/catch_version.hpp | 10 +- .../internal/catch_wildcard_pattern.hpp | 4 +- .../include/internal/catch_windows_h_proxy.h | 32 + .../include/internal/catch_xmlwriter.hpp | 12 +- .../reporters/catch_reporter_bases.hpp | 17 +- .../reporters/catch_reporter_compact.hpp | 32 +- .../reporters/catch_reporter_console.hpp | 50 +- .../reporters/catch_reporter_junit.hpp | 37 +- .../reporters/catch_reporter_multi.hpp | 4 +- .../include/reporters/catch_reporter_xml.hpp | 4 +- .../catch/projects/Benchmark/BenchMain.cpp | 9 + .../Benchmark/StringificationBench.cpp | 46 + 3rdparty/catch/projects/Benchmark/readme.txt | 4 + ...cdddd43ba4df9e4846630be6a6a7bd85a07.result | 3 + ...841ff500b2f39ccfd4193ae450cb653da05.result | 3 + ...0166f7b7196eba2ad518174d1a77165166d.result | 3 + ...bec49c5bc58d3604bf1a72cd3f7d129bf2e.result | 3 + ...f9646c5ce50758f8582307c99501a932e1a.result | 3 + 3rdparty/catch/projects/CMake/CMakeLists.txt | 68 - .../catch/projects/SelfTest/ApproxTests.cpp | 75 + 3rdparty/catch/projects/SelfTest/BDDTests.cpp | 6 +- .../Baselines/console.std.approved.txt | 835 +- .../Baselines/console.sw.approved.txt | 11444 +++++++------- .../Baselines/console.swa4.approved.txt | 603 +- .../SelfTest/Baselines/junit.sw.approved.txt | 992 +- .../SelfTest/Baselines/xml.sw.approved.txt | 13175 ++++++++-------- .../projects/SelfTest/ConditionTests.cpp | 34 +- .../catch/projects/SelfTest/EnumToString.cpp | 4 +- .../projects/SelfTest/ExceptionTests.cpp | 72 +- .../catch/projects/SelfTest/MiscTests.cpp | 2 +- .../projects/SelfTest/PartTrackerTests.cpp | 71 +- .../catch_test_case_tracker.cpp} | 3 +- 3rdparty/catch/projects/SelfTest/TestMain.cpp | 36 +- .../catch/projects/SelfTest/ToStringTuple.cpp | 12 +- .../projects/SelfTest/ToStringVector.cpp | 4 +- .../catch/projects/SelfTest/ToStringWhich.cpp | 11 +- .../catch/projects/SelfTest/TrickyTests.cpp | 2 +- 3rdparty/catch/projects/SelfTest/makefile | 30 - .../projects/VS2008/TestCatch/TestCatch.sln | 20 - .../VS2008/TestCatch/TestCatch/TestCatch.cpp | 8 - .../TestCatch/TestCatch/TestCatch.vcproj | 390 - .../projects/VS2010/TestCatch/TestCatch.sln | 20 - .../TestCatch/TestCatch/TestCatch.vcxproj | 148 - .../projects/Where did the projects go.txt | 13 + .../CatchSelfTest.xcodeproj/project.pbxproj | 742 - .../contents.xcworkspacedata | 7 - .../CatchSelfTest/CatchSelfTest.1 | 79 - .../project.pbxproj | 258 - .../contents.xcworkspacedata | 7 - .../CatchSelfTestSingle.xccheckout | 41 - .../CatchSelfTestSingle/dummy.txt | 0 .../OCTest/OCTest.xcodeproj/project.pbxproj | 265 - .../contents.xcworkspacedata | 7 - .../xcshareddata/OCTest.xccheckout | 41 - .../XCode/OCTest/OCTest/CatchOCTestCase.h | 25 - .../XCode/OCTest/OCTest/CatchOCTestCase.mm | 83 - .../projects/XCode/OCTest/OCTest/Main.mm | 2 - .../projects/XCode/OCTest/OCTest/OCTest.1 | 79 - .../projects/XCode/OCTest/OCTest/OCTest.mm | 28 - .../projects/XCode/OCTest/OCTest/TestObj.h | 28 - .../projects/XCode/OCTest/OCTest/TestObj.m | 25 - .../iOSTest/iOSTest.xcodeproj/project.pbxproj | 299 - .../contents.xcworkspacedata | 7 - .../projects/XCode/iOSTest/iOSTest/OCTest.mm | 27 - .../projects/XCode/iOSTest/iOSTest/TestObj.h | 25 - .../projects/XCode/iOSTest/iOSTest/TestObj.m | 18 - .../iOSTest/en.lproj/InfoPlist.strings | 2 - .../XCode/iOSTest/iOSTest/iOSTest-Info.plist | 47 - .../XCode/iOSTest/iOSTest/iOSTest-Prefix.pch | 14 - .../internal/iTchRunnerAppDelegate.h | 114 - .../iTchRunner/internal/iTchRunnerMainView.h | 189 - .../iTchRunner/internal/iTchRunnerReporter.h | 115 - .../runners/iTchRunner/itChRunnerMain.mm | 27 - .../catch/projects/runners/iTchRunner/readme | 6 - 3rdparty/catch/scripts/approvalTests.py | 211 +- 3rdparty/catch/scripts/approve.py | 2 + 3rdparty/catch/scripts/benchmarkRunner.py | 56 + 3rdparty/catch/scripts/developBuild.py | 2 + ...TrailingWhitespace.py => fixWhitespace.py} | 3 + .../catch/scripts/generateSingleHeader.py | 2 + 3rdparty/catch/scripts/majorRelease.py | 2 + 3rdparty/catch/scripts/minorRelease.py | 2 + 3rdparty/catch/scripts/patchRelease.py | 2 + 3rdparty/catch/scripts/releaseCommon.py | 9 +- 3rdparty/catch/scripts/releaseNotes.py | 2 + 3rdparty/catch/scripts/scriptCommon.py | 7 +- 3rdparty/catch/single_include/catch.hpp | 1293 +- 141 files changed, 15927 insertions(+), 18246 deletions(-) create mode 100644 3rdparty/catch/CMakeLists.txt create mode 100644 3rdparty/catch/catch-logo-tiny.png create mode 100644 3rdparty/catch/docs/release-notes.md create mode 100644 3rdparty/catch/include/internal/catch_windows_h_proxy.h create mode 100644 3rdparty/catch/projects/Benchmark/BenchMain.cpp create mode 100644 3rdparty/catch/projects/Benchmark/StringificationBench.cpp create mode 100644 3rdparty/catch/projects/Benchmark/readme.txt create mode 100644 3rdparty/catch/projects/Benchmark/results/2017-01-14T21-53-49-e3659cdddd43ba4df9e4846630be6a6a7bd85a07.result create mode 100644 3rdparty/catch/projects/Benchmark/results/2017-01-14T21-59-08-a1e9b841ff500b2f39ccfd4193ae450cb653da05.result create mode 100644 3rdparty/catch/projects/Benchmark/results/2017-01-15T09-35-14-3b98a0166f7b7196eba2ad518174d1a77165166d.result create mode 100644 3rdparty/catch/projects/Benchmark/results/2017-01-29T22-08-36-60f8ebec49c5bc58d3604bf1a72cd3f7d129bf2e.result create mode 100644 3rdparty/catch/projects/Benchmark/results/2017-01-29T23-13-35-bcaa2f9646c5ce50758f8582307c99501a932e1a.result delete mode 100644 3rdparty/catch/projects/CMake/CMakeLists.txt rename 3rdparty/catch/projects/{XCode/CatchSelfTest/CatchSelfTest/catch_text.cpp => SelfTest/SurrogateCpps/catch_test_case_tracker.cpp} (61%) delete mode 100644 3rdparty/catch/projects/SelfTest/makefile delete mode 100644 3rdparty/catch/projects/VS2008/TestCatch/TestCatch.sln delete mode 100644 3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.cpp delete mode 100644 3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.vcproj delete mode 100644 3rdparty/catch/projects/VS2010/TestCatch/TestCatch.sln delete mode 100644 3rdparty/catch/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj create mode 100644 3rdparty/catch/projects/Where did the projects go.txt delete mode 100644 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj delete mode 100644 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest/CatchSelfTest.1 delete mode 100644 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.pbxproj delete mode 100644 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/xcshareddata/CatchSelfTestSingle.xccheckout delete mode 100644 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle/dummy.txt delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.pbxproj delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/xcshareddata/OCTest.xccheckout delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.h delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.mm delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest/Main.mm delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.1 delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.mm delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.h delete mode 100644 3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.m delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.pbxproj delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest/OCTest.mm delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.h delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.m delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest/en.lproj/InfoPlist.strings delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Info.plist delete mode 100644 3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Prefix.pch delete mode 100644 3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerAppDelegate.h delete mode 100644 3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerMainView.h delete mode 100644 3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerReporter.h delete mode 100644 3rdparty/catch/projects/runners/iTchRunner/itChRunnerMain.mm delete mode 100644 3rdparty/catch/projects/runners/iTchRunner/readme create mode 100644 3rdparty/catch/scripts/benchmarkRunner.py rename 3rdparty/catch/scripts/{fixTrailingWhitespace.py => fixWhitespace.py} (94%) diff --git a/3rdparty/catch/.gitignore b/3rdparty/catch/.gitignore index 3ca4b5c555c..675ae4cefdf 100644 --- a/3rdparty/catch/.gitignore +++ b/3rdparty/catch/.gitignore @@ -14,9 +14,15 @@ Breakpoints.xcbkptlist projects/VS2010/TestCatch/_UpgradeReport_Files/ projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj.filters projects/VisualStudio/TestCatch/UpgradeLog.XML +projects/CMake/.idea +projects/CMake/cmake-build-debug UpgradeLog.XML Resources/DWARF -projects/XCode/iOSTest/Build +projects/Generated *.pyc DerivedData *.xccheckout +Build +.idea +cmake-build-debug +cmake-build-release diff --git a/3rdparty/catch/.travis.yml b/3rdparty/catch/.travis.yml index 8b519069daf..bf8c90e3117 100644 --- a/3rdparty/catch/.travis.yml +++ b/3rdparty/catch/.travis.yml @@ -119,12 +119,12 @@ matrix: # 3/ OSX Clang Builds - os: osx - osx_image: xcode7 + osx_image: xcode7.3 compiler: clang env: COMPILER='ccache clang++' BUILD_TYPE='Debug' - os: osx - osx_image: xcode7 + osx_image: xcode7.3 compiler: clang env: COMPILER='ccache clang++' BUILD_TYPE='Release' @@ -145,7 +145,7 @@ install: - | if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then CMAKE_URL="http://www.cmake.org/files/v3.3/cmake-3.3.2-Linux-x86_64.tar.gz" - mkdir cmake && travis_retry wget --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake + mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake export PATH=${DEPS_DIR}/cmake/bin:${PATH} elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then which cmake || brew install cmake @@ -155,7 +155,7 @@ install: before_script: - export CXX=${COMPILER} - cd ${TRAVIS_BUILD_DIR} - - cmake -Hprojects/CMake -BBuild -DCMAKE_BUILD_TYPE=${BUILD_TYPE} + - cmake -H. -BBuild -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -Wdev - cd Build script: diff --git a/3rdparty/catch/CMakeLists.txt b/3rdparty/catch/CMakeLists.txt new file mode 100644 index 00000000000..e4a74a8d47a --- /dev/null +++ b/3rdparty/catch/CMakeLists.txt @@ -0,0 +1,262 @@ +cmake_minimum_required(VERSION 3.0) + +project(CatchSelfTest) + +set_property(GLOBAL PROPERTY USE_FOLDERS ON) + +# define some folders +set(CATCH_DIR ${CMAKE_CURRENT_SOURCE_DIR}) +set(SELF_TEST_DIR ${CATCH_DIR}/projects/SelfTest) +set(BENCHMARK_DIR ${CATCH_DIR}/projects/Benchmark) +set(HEADER_DIR ${CATCH_DIR}/include) + +if(USE_CPP11) + ## We can't turn this on by default, since it breaks on travis + message(STATUS "Enabling C++11") + set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") +elseif(USE_CPP14) + message(STATUS "Enabling C++14") + set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}") +endif() + +#checks that the given hard-coded list contains all headers + sources in the given folder +function(CheckFileList LIST_VAR FOLDER) + set(MESSAGE " should be added to the variable ${LIST_VAR}") + set(MESSAGE "${MESSAGE} in ${CMAKE_CURRENT_LIST_FILE}\n") + file(GLOB GLOBBED_LIST "${FOLDER}/*.cpp" + "${FOLDER}/*.hpp" + "${FOLDER}/*.h") + list(REMOVE_ITEM GLOBBED_LIST ${${LIST_VAR}}) + foreach(EXTRA_ITEM ${GLOBBED_LIST}) + string(REPLACE "${CATCH_DIR}/" "" RELATIVE_FILE_NAME "${EXTRA_ITEM}") + message(AUTHOR_WARNING "The file \"${RELATIVE_FILE_NAME}\"${MESSAGE}") + endforeach() +endfunction() + +function(CheckFileListRec LIST_VAR FOLDER) + set(MESSAGE " should be added to the variable ${LIST_VAR}") + set(MESSAGE "${MESSAGE} in ${CMAKE_CURRENT_LIST_FILE}\n") + file(GLOB_RECURSE GLOBBED_LIST "${FOLDER}/*.cpp" + "${FOLDER}/*.hpp" + "${FOLDER}/*.h") + list(REMOVE_ITEM GLOBBED_LIST ${${LIST_VAR}}) + foreach(EXTRA_ITEM ${GLOBBED_LIST}) + string(REPLACE "${CATCH_DIR}/" "" RELATIVE_FILE_NAME "${EXTRA_ITEM}") + message(AUTHOR_WARNING "The file \"${RELATIVE_FILE_NAME}\"${MESSAGE}") + endforeach() +endfunction() + +# define the sources of the self test +# Please keep these ordered alphabetically +set(TEST_SOURCES + ${SELF_TEST_DIR}/ApproxTests.cpp + ${SELF_TEST_DIR}/BDDTests.cpp + ${SELF_TEST_DIR}/ClassTests.cpp + ${SELF_TEST_DIR}/CmdLineTests.cpp + ${SELF_TEST_DIR}/ConditionTests.cpp + ${SELF_TEST_DIR}/EnumToString.cpp + ${SELF_TEST_DIR}/ExceptionTests.cpp + ${SELF_TEST_DIR}/GeneratorTests.cpp + ${SELF_TEST_DIR}/MessageTests.cpp + ${SELF_TEST_DIR}/MiscTests.cpp + ${SELF_TEST_DIR}/PartTrackerTests.cpp + ${SELF_TEST_DIR}/TagAliasTests.cpp + ${SELF_TEST_DIR}/TestMain.cpp + ${SELF_TEST_DIR}/ToStringPair.cpp + ${SELF_TEST_DIR}/ToStringTuple.cpp + ${SELF_TEST_DIR}/ToStringVector.cpp + ${SELF_TEST_DIR}/ToStringWhich.cpp + ${SELF_TEST_DIR}/TrickyTests.cpp + ${SELF_TEST_DIR}/VariadicMacrosTests.cpp + ) +CheckFileList(TEST_SOURCES ${SELF_TEST_DIR}) + +# A set of impl files that just #include a single header +# Please keep these ordered alphabetically +set(IMPL_SOURCES + ${SELF_TEST_DIR}/SurrogateCpps/catch_common.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_console_colour.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_debugger.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_capture.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_config.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_exception.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_generators.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_registry_hub.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_reporter.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_runner.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_testcase.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_message.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_option.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_ptr.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_stream.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_streambuf.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_test_spec.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_xmlwriter.cpp + ${SELF_TEST_DIR}/SurrogateCpps/catch_test_case_tracker.cpp + ) +CheckFileList(IMPL_SOURCES ${SELF_TEST_DIR}/SurrogateCpps) + + +# Please keep these ordered alphabetically +set(TOP_LEVEL_HEADERS + ${HEADER_DIR}/catch.hpp + ${HEADER_DIR}/catch_session.hpp + ${HEADER_DIR}/catch_with_main.hpp + ) +CheckFileList(TOP_LEVEL_HEADERS ${HEADER_DIR}) + +# Please keep these ordered alphabetically +set(EXTERNAL_HEADERS + ${HEADER_DIR}/external/clara.h + ${HEADER_DIR}/external/tbc_text_format.h + ) +CheckFileList(EXTERNAL_HEADERS ${HEADER_DIR}/external) + + +# Please keep these ordered alphabetically +set(INTERNAL_HEADERS + ${HEADER_DIR}/internal/catch_approx.hpp + ${HEADER_DIR}/internal/catch_assertionresult.h + ${HEADER_DIR}/internal/catch_assertionresult.hpp + ${HEADER_DIR}/internal/catch_capture.hpp + ${HEADER_DIR}/internal/catch_clara.h + ${HEADER_DIR}/internal/catch_commandline.hpp + ${HEADER_DIR}/internal/catch_common.h + ${HEADER_DIR}/internal/catch_common.hpp + ${HEADER_DIR}/internal/catch_compiler_capabilities.h + ${HEADER_DIR}/internal/catch_config.hpp + ${HEADER_DIR}/internal/catch_console_colour.hpp + ${HEADER_DIR}/internal/catch_console_colour_impl.hpp + ${HEADER_DIR}/internal/catch_context.h + ${HEADER_DIR}/internal/catch_context_impl.hpp + ${HEADER_DIR}/internal/catch_debugger.h + ${HEADER_DIR}/internal/catch_debugger.hpp + ${HEADER_DIR}/internal/catch_default_main.hpp + ${HEADER_DIR}/internal/catch_evaluate.hpp + ${HEADER_DIR}/internal/catch_exception_translator_registry.hpp + ${HEADER_DIR}/internal/catch_expression_lhs.hpp + ${HEADER_DIR}/internal/catch_fatal_condition.hpp + ${HEADER_DIR}/internal/catch_generators.hpp + ${HEADER_DIR}/internal/catch_generators_impl.hpp + ${HEADER_DIR}/internal/catch_impl.hpp + ${HEADER_DIR}/internal/catch_interfaces_capture.h + ${HEADER_DIR}/internal/catch_interfaces_config.h + ${HEADER_DIR}/internal/catch_interfaces_exception.h + ${HEADER_DIR}/internal/catch_interfaces_generators.h + ${HEADER_DIR}/internal/catch_interfaces_registry_hub.h + ${HEADER_DIR}/internal/catch_interfaces_reporter.h + ${HEADER_DIR}/internal/catch_interfaces_runner.h + ${HEADER_DIR}/internal/catch_interfaces_tag_alias_registry.h + ${HEADER_DIR}/internal/catch_interfaces_testcase.h + ${HEADER_DIR}/internal/catch_legacy_reporter_adapter.h + ${HEADER_DIR}/internal/catch_legacy_reporter_adapter.hpp + ${HEADER_DIR}/internal/catch_list.hpp + ${HEADER_DIR}/internal/catch_matchers.hpp + ${HEADER_DIR}/internal/catch_message.h + ${HEADER_DIR}/internal/catch_message.hpp + ${HEADER_DIR}/internal/catch_notimplemented_exception.h + ${HEADER_DIR}/internal/catch_notimplemented_exception.hpp + ${HEADER_DIR}/internal/catch_objc.hpp + ${HEADER_DIR}/internal/catch_objc_arc.hpp + ${HEADER_DIR}/internal/catch_option.hpp + ${HEADER_DIR}/internal/catch_platform.h + ${HEADER_DIR}/internal/catch_ptr.hpp + ${HEADER_DIR}/internal/catch_reenable_warnings.h + ${HEADER_DIR}/internal/catch_registry_hub.hpp + ${HEADER_DIR}/internal/catch_reporter_registrars.hpp + ${HEADER_DIR}/internal/catch_reporter_registry.hpp + ${HEADER_DIR}/internal/catch_result_builder.h + ${HEADER_DIR}/internal/catch_result_builder.hpp + ${HEADER_DIR}/internal/catch_result_type.h + ${HEADER_DIR}/internal/catch_run_context.hpp + ${HEADER_DIR}/internal/catch_section.h + ${HEADER_DIR}/internal/catch_section.hpp + ${HEADER_DIR}/internal/catch_section_info.h + ${HEADER_DIR}/internal/catch_section_info.hpp + ${HEADER_DIR}/internal/catch_stream.h + ${HEADER_DIR}/internal/catch_stream.hpp + ${HEADER_DIR}/internal/catch_streambuf.h + ${HEADER_DIR}/internal/catch_suppress_warnings.h + ${HEADER_DIR}/internal/catch_tag_alias.h + ${HEADER_DIR}/internal/catch_tag_alias_registry.h + ${HEADER_DIR}/internal/catch_tag_alias_registry.hpp + ${HEADER_DIR}/internal/catch_test_case_info.h + ${HEADER_DIR}/internal/catch_test_case_info.hpp + ${HEADER_DIR}/internal/catch_test_case_registry_impl.hpp + ${HEADER_DIR}/internal/catch_test_case_tracker.hpp + ${HEADER_DIR}/internal/catch_test_registry.hpp + ${HEADER_DIR}/internal/catch_test_spec.hpp + ${HEADER_DIR}/internal/catch_test_spec_parser.hpp + ${HEADER_DIR}/internal/catch_text.h + ${HEADER_DIR}/internal/catch_timer.h + ${HEADER_DIR}/internal/catch_timer.hpp + ${HEADER_DIR}/internal/catch_tostring.h + ${HEADER_DIR}/internal/catch_tostring.hpp + ${HEADER_DIR}/internal/catch_totals.hpp + ${HEADER_DIR}/internal/catch_version.h + ${HEADER_DIR}/internal/catch_version.hpp + ${HEADER_DIR}/internal/catch_wildcard_pattern.hpp + ${HEADER_DIR}/internal/catch_windows_h_proxy.h + ${HEADER_DIR}/internal/catch_xmlwriter.hpp + ) +CheckFileList(INTERNAL_HEADERS ${HEADER_DIR}/internal) + +# Please keep these ordered alphabetically +set(REPORTER_HEADERS + ${HEADER_DIR}/reporters/catch_reporter_bases.hpp + ${HEADER_DIR}/reporters/catch_reporter_compact.hpp + ${HEADER_DIR}/reporters/catch_reporter_console.hpp + ${HEADER_DIR}/reporters/catch_reporter_junit.hpp + ${HEADER_DIR}/reporters/catch_reporter_multi.hpp + ${HEADER_DIR}/reporters/catch_reporter_teamcity.hpp + ${HEADER_DIR}/reporters/catch_reporter_xml.hpp + ) +CheckFileList(REPORTER_HEADERS ${HEADER_DIR}/reporters) + +# Specify the headers, too, so CLion recognises them as project files +set(HEADERS + ${TOP_LEVEL_HEADERS} + ${EXTERNAL_HEADERS} + ${INTERNAL_HEADERS} + ${REPORTER_HEADERS} + ) + + +set(BENCH_SOURCES + ${BENCHMARK_DIR}/BenchMain.cpp + ${BENCHMARK_DIR}/StringificationBench.cpp + ) +CheckFileList(BENCH_SOURCES ${BENCHMARK_DIR}) + +# Provide some groupings for IDEs +SOURCE_GROUP("Tests" FILES ${TEST_SOURCES}) +SOURCE_GROUP("Surrogates" FILES ${IMPL_SOURCES}) +SOURCE_GROUP("Benchmarks" FILES ${BENCH_SOURCES}) + +# configure the executable +include_directories(${HEADER_DIR}) +add_executable(SelfTest ${TEST_SOURCES} ${IMPL_SOURCES} ${HEADERS}) +add_executable(Benchmark ${BENCH_SOURCES} ${HEADERS}) + +# Add desired warnings +if ( CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang|GNU" ) + target_compile_options( SelfTest PRIVATE -Wall -Wextra ) + target_compile_options( Benchmark PRIVATE -Wall -Wextra ) +endif() +if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) + target_compile_options( SelfTest PRIVATE /W4 ) + target_compile_options( Benchmark PRIVATE /W4 ) +endif() + + +# configure unit tests via CTest +enable_testing() +add_test(NAME RunTests COMMAND SelfTest) + +add_test(NAME ListTests COMMAND SelfTest --list-tests) +set_tests_properties(ListTests PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ test cases") + +add_test(NAME ListTags COMMAND SelfTest --list-tags) +set_tests_properties(ListTags PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ tags") + +install(DIRECTORY "single_include/" DESTINATION "include/catch/") diff --git a/3rdparty/catch/README.md b/3rdparty/catch/README.md index 88ed122fdcd..06edcc26bb0 100644 --- a/3rdparty/catch/README.md +++ b/3rdparty/catch/README.md @@ -1,10 +1,10 @@ ![catch logo](catch-logo-small.png) -*v1.5.8* +*v1.7.0* -Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.png)](https://travis-ci.org/philsquared/Catch) +Build status (on Travis CI) [![Build Status](https://travis-ci.org/philsquared/Catch.svg?branch=master)](https://travis-ci.org/philsquared/Catch) -The latest, single header, version can be downloaded directly using this link +The latest, single header, version can be downloaded directly using this link ## What's the Catch? diff --git a/3rdparty/catch/catch-logo-tiny.png b/3rdparty/catch/catch-logo-tiny.png new file mode 100644 index 0000000000000000000000000000000000000000..26f49069274ccb00dd47178d88b7c45bc7f01747 GIT binary patch literal 5853 zcmZu#2RNHw+qXAW)TkBIEP_%bHkGPUBLr=c#$G{)n6*od8m(2MMq4Xddla=Qs8L!o zHDX2WO;P>y|Nh_cz2Em-*Llu;?&tTr*E#ofo$HA;GK4VFU8N%-Az{?Jtz&XAJ6?<^ z8mf!8?!dC=#YBoSfoPFb4D$TASkQXjwnUMT(6jy-q$F9{oFpVzCFNlw;s-T5|5kMR1 zZ4Xe8mY0?hRHFj`04m;g4j>a9-M{GaI;5K<_A4<9&2$^#|z4M6p3_G z(?lS>JpgEXZ`7X%<)sy*l~jQL4f=PmDu1kkw2|(f-u9?J6g34E;Q!J6H{R039))!C z{Zj-rMY+ET|Ec_Mg2n$w_)q2E1Qp<)n*K+P|FMC8X)ktAjqW0sf1U<4I_)0ri}S&z ztEZz0#gJ}f)4zX<;KkLmJv5Hw+3=8x?UT~F4;Aa@bk=fXjB>u>BEq^Lr>7v%WGpMa zk(hP4FvVwD*V3TTp6j*ISktwtMjP1vud`WV;K|0?<3ayf;_q`HG5a@i`BW|a_ug6V z?1BF~Vt!X1wY zAc8~tKAGA1b(OV5c%~z1cDSt2fH|VoGvD*&c1>tLu4Cb3!7V z<5^2&9A#C(It>p+4~-*-uVV}jXgaGIE?z-sg)1jg#yDk@!d2q^BW%e{=VPvf=Uje# zecUSzcUo^#yk$nV-%-HHhpX1`r^jnYyyI{);tA81sXJXw8`jhR>R<$aQU|G` zBx;}{^Js3WFtrzZC>pC}9!tR*8%Y>>p%d`ei0|f1qrhjhN}+e1r^JUV@4fcjG*!MI z8qFlJ{ys%^47!F3PjKvPoW_oD`6P^q1PbJBJsp!*sfwE9#FvG92qh0n*-E=Hwc`uO zEvZ;_nTvfPRwlb5QmU&#RW(x6GW76R1os1Lo{hq&(3WUO`&kbpu99P82 zfDpb9-`ljTf%(&UB@h-$%`E13(mi7apm-~I)YkBs%+L~Zw zPjlQD34g30{Rg815gtTDkm|}tKf}WXbJdXaYo;E{7``P3=TCaowUacEYeI{<#npZI zo|0bX;h!aCCIl??&kBw?8N(P6!w%JtP^zYm5#u-ogeDyrpt z%qpg0M4hO-7pW3+KtQZpYl$)@Dxt1P=k&vu*xmkGgfwj_x+xfQj@DBf^I|u8M+bhP zSeF!0<-|CVEY*qcrYwaln42jjR__MMAI}$+F}}>QjIv*3`t1;=fRe-S2CL`|C!=^q zV_^%F&Itv1Y=`VdN-*2yjx9JGNbn-H-uJuH6O-ycaf0iL@9z}`gZ)BWtrc@31Y(O6 zX>HuGhrcE74D>}M;3CN>>mWSjzu)vwB^-%2Hs|%^OvL${Ki`!gT>veWj7JeeG*JRP zv-19d-*w}qY^L`T>pN6aJ*ShZ5iL^R#Py81$M1}b2a|eQCiM+oddLfFiQCqA{>~+7 zxVu6S>2vLpl>oTeiLq@s(Ldd;(!|*F$V}XwXAsCOJl+4%*{rbhagNi$Oa6*j&qkz%*4+8#DJJ+9)SXXtg8b&O;FZ5=?DrE$3E8av+rP^o2fz8<~4z{Hm`PC5gjq8q6=C z;uD}&b)p7qH(_P|qHUT=6qbe6Xc+fycEKpFknxD6*R$+P3CfLxFG&k+G`u=A+#OP% z_VK`=%dB5glKsSMR9fIqpXs2^fztPdy3A>*!kP`R!tg|v5D7{4LFO4T z4L;MFlb{-z>TA^eBLosi$Q8#f+13$w*~Ej;{*O)vzgINeM0;QLf?S$!2unqy7a@f( zY~ZG|-rf$w@Ssx5DuNqw6G{9=Jtli!UkThcyoDYenMCJdb~fbfmg2^?Ek2XooVk@1 z#me*3jF$!HFYUMR1@M4^E#+=UVSRRE%Czp_z*QR%@Cxueg|TYkZw4PsQVExggp7)B zWJjb>po65sq9f?(Coo9UuZAn~t`)368@UfWQ{Yar!7P3eqECuKEAs@f7mjm`QSf~W zO)!_{k`)8ySKM6&1eOloGqs`&n#1ugbzBO+bQWM}wNGi4EyYes(^gM|r+Z0P9aT%I z7PA<#X&8pnAE$x2&bUk5FKWbob~(tmxmQyA-u!`>ZI@wHH!&-?i+WXmY>q~=&P}|g zX%#}JAL)2~ULfJLR>lUS5Cj+{tUY|QvOa&&AJ{QWjfMJ}sadbeiS54C=>2Hg*QG7_ zPAa47lHa9u-j*BTF;)k^>7G{t6KyJH2QN1qxhAiwdL;>+>R?M1zWO5uI9e&M)7Veo!% zTn-EB#JeXwefI0(6N-W;?uiiQEjvJkl6$c^q?6k1$aY@YM)=;gfSc2=dgEXuXpM#8 z6)OdMUrW%TDMf4ZtVO7I&V&9zl{>MP9YSQu8++sjZOe6Drdj0ELHy(Ru^VMFaIr}E0B#>xa%&%uKZ%JV2dko-VLfbr={`$z=3Y#-C&E6F-o5Mb0hW^Yq zQG^Y~)Bb3cQs}jL*aY0cLIDi)C;`GtIeLp&O%AGqz+h+xA9EGwi=2h94>cBSqR6Ay z6?dZQ-{~uyIFRz$-BWjVwrb}0o`^mh<<>kc3Qf?s?>}W9nb1@%qS-j?01tt_cg_j) z_7`U7<;afD59tZR=CP;=d(!@LCvd{UWK1zkg!bDqZE-?m_^XR$*aEYSnBD#b-kt*a z*X}+=vjJugUa))5?Ylg*F_Ib!--~=kqvWhgYIT32(2V|x_j1EP;TDXJQyy~Jan?TT zqx=ph1@X+VN=1xWsU-r-?%)e=7#xZjx54swa2VY>tV{V zMZ+#g)m>k#;(3tQJjv=C1~&xrJ;Fz^2U)8%UL%KON7gT-u?iKpWZSstAoi*9(@uF#PZ&3AXE5IlhhFp{ko1iXhduB6 zk8x)`Bp@W7f@$ttZJ|;2n8~GxuJq^ax z=0YH@cs#7y9XJp{HK1IGk9`ih^*!*UN#=cd%^AuZRn~l)atuMy-{(PpyddOqi~Tc#g(gmuHU0NTEjmcbbFT3 zB& zWvSASZe@4AmM=PRN&UIgjk?Wi)z&S~T^0RdoX5nW-Y{Heexxh3Rlwfr)q1usD}TI| zB5IxHkPt|g2jyk=l`=vn*2{aSt)=8dAo%X2PQ%j2J)0$sS^@7--tnu-c1$pJyWCS~ z&dtafiWWaUw+E{e)z&(cW<)w|3naJs6h)2a98Dm2XPSPAb~V>kBDS)v~mOEfYPRiR^w@bv*8))^zeMji=Yo*ePg znan*~_pf&PmM>TRWbG~=qC9WFK$y7wje=T(pWTx|b0s}_LDj61H|R>4^JtItfzxBg zN70+_OisMLbRvER@bPVy$vtMq9e)o;G*GMDQ-Zb0?!(o);~{lRFBTX}cku#ODXMoz zse)PCjrSY6cfH7==#XLXF(h2Vp>xKCwV}?y>~un;f8pRUq~@(dC(WDW9i7CTt##bD zBi2{Db(Z@~hq8StrUkp7N)LqYKX_*na8@7!odHSaF7VJ-%h291?o$*%nW`iy^nq zy5aj;vf-5p56l41sHNM&sXk@w`z_QuwUwuXYo@A?i4ZG$NfdZFyLYUN_HEl|n7!Mx`?N+2T;!&K zFL8KDo+|}80ZMeu|=f`i}#&t$gukT9K# zHDsC*E*)ZfRiQ-HZJzdyXNy@<2P#wVaVz5^^f=``_R9}EEWX`r_`HLRU@p*iJG2tr zKYtu(s7keQsVh){)a9G(#$kwH%BOoQ4O#h{@g}uGRbeq9tlej+ZGp*;Y5eH2IdYk0 zB!v6OtHQBfZ)6}C1lfTTCxf9Kcn|6xpVaFbtb35k>WIfyMor095sWfed7e%cD;tk_ z7=CA&`jtq^$KpA%L53G_U#{i8m*=0T=uqBhc0yQ-w=6xuQ}z&>3q~UfZ$t%iw+Abj z+=>MuJVA5|47N+6^TxSfeYT&ELv9{gHa9^>d0a^60IdWm*yH_jpyQ7Nwyc8J+lCYtA=$uFN!E^~af0HzfkrAMoAn1f>tr zeoSW6FD1q3CN9g)e^*=)HjEWLJsmyIZbK=hMhtI+0T)^WLyKxzjlPK*9Wg%AdxLW$ zzBw!lf7bzZSEbb)($gE(+)AR-r{oDkQOU;j-RG#95eTxzB-jd?Hs>@VN74)fbESdI zMpuuYzO~8hYC_-cXR-TWa-0#`FH*NEzQA_vh_J3(KI@L_)sdq0{4;bBL_RJoea!Yg!UUc@LOfeYsaZzHhh@vQj(JAFP1H@o4bT;AGtk#%`t&jF87o~Y?E>SqtuPN(K>_OB zIcBi>xtjQ@0SHIe`8Ao3_tTc$#7Re4)MdD87;Y;F++E1R(EA-iImlu6X%~tU4<$Zy zbF>dvlrP~mDV9-Tl9H)u`$DEo&+spymGYdLLpe*bS)}>mZ!`&s-Yr9&3N734{{c2{ B&(#0` literal 0 HcmV?d00001 diff --git a/3rdparty/catch/docs/Readme.md b/3rdparty/catch/docs/Readme.md index 6621fb81bcd..c2f11f72108 100644 --- a/3rdparty/catch/docs/Readme.md +++ b/3rdparty/catch/docs/Readme.md @@ -17,3 +17,4 @@ Other * [Why Catch?](why-catch.md) * [Contributing](contributing.md) +* [Release Notes](release-notes.md) \ No newline at end of file diff --git a/3rdparty/catch/docs/assertions.md b/3rdparty/catch/docs/assertions.md index 82bb96a3447..f64fdcfe2b2 100644 --- a/3rdparty/catch/docs/assertions.md +++ b/3rdparty/catch/docs/assertions.md @@ -34,6 +34,15 @@ Example: REQUIRE_FALSE( thisReturnsFalse() ); ``` +Do note that "overly complex" expressions cannot be decomposed and thus will not compile. This is done partly for practical reasons (to keep the underlying expression template machinery to minimum) and partly for philosophical reasons (assertions should be simple and deterministic). + +Examples: +* `CHECK(a == 1 && b == 2);` +This expression is too complex because of the `&&` operator. If you want to check that 2 or more properties hold, you can either put the expression into parenthesis, which stops decomposition from working, or you need to decompose the expression into two assertions: `CHECK( a == 1 ); CHECK( b == 2);` +* `CHECK( a == 2 || b == 1 );` +This expression is too complex because of the `||` operator. If you want to check that one of several properties hold, you can put the expression into parenthesis (unlike with `&&`, expression decomposition into several `CHECK`s is not possible). + + ### Floating point comparisons When comparing floating point numbers - especially if at least one of them has been computed - great care must be taken to allow for rounding errors and inexact representations. diff --git a/3rdparty/catch/docs/build-systems.md b/3rdparty/catch/docs/build-systems.md index b001dc19d99..a14c93e0812 100644 --- a/3rdparty/catch/docs/build-systems.md +++ b/3rdparty/catch/docs/build-systems.md @@ -69,7 +69,7 @@ ExternalProject_Add( # Expose required variable (CATCH_INCLUDE_DIR) to parent scope ExternalProject_Get_Property(catch source_dir) -set(CATCH_INCLUDE_DIR ${source_dir}/include CACHE INTERNAL "Path to include folder for Catch") +set(CATCH_INCLUDE_DIR ${source_dir}/single_include CACHE INTERNAL "Path to include folder for Catch") ``` If you put it in, e.g., `${PROJECT_SRC_DIR}/${EXT_PROJECTS_DIR}/catch/`, you can use it in your project by adding the following to your root CMake file: diff --git a/3rdparty/catch/docs/command-line.md b/3rdparty/catch/docs/command-line.md index d1d4bd4a614..cc69d5ff641 100644 --- a/3rdparty/catch/docs/command-line.md +++ b/3rdparty/catch/docs/command-line.md @@ -17,6 +17,9 @@ Click one of the followings links to take you straight to that option - or scrol ` -w, --warn`
` -d, --durations`
` -f, --input-file`
+ ` -c, --section`
+ ` -#, --filenames-as-tags`
+
@@ -66,6 +69,8 @@ A series of tags form an AND expression wheras a comma-separated sequence forms
[one][two],[three]
This matches all tests tagged `[one]` and `[two]`, as well as all tests tagged `[three]` +Test names containing special characters, such as `,` or `[` can specify them on the command line using `\`. +`\` also escapes itself. ## Choosing a reporter to use @@ -115,7 +120,7 @@ Sometimes this results in a flood of failure messages and you'd rather just see --list-reporters -```-l``` or ```--list-tests`` will list all registered tests, along with any tags. +```-l``` or ```--list-tests``` will list all registered tests, along with any tags. If one or more test-specs have been supplied too then only the matching tests will be listed. ```-t``` or ```--list-tags``` lists all available tags, along with the number of test cases they match. Again, supplying test specs limits the tags that match. @@ -215,6 +220,59 @@ In either case the actual value for the seed is printed as part of Catch's outpu Prints the command line arguments to stdout + + +## Specify the section to run +
-s, --section <section name>
+ +To limit execution to a specific section within a test case, use this option one or more times. +To narrow to sub-sections use multiple instances, where each subsequent instance specifies a deeper nesting level. + +E.g. if you have: + +
+TEST_CASE( "Test" ) {
+  SECTION( "sa" ) {
+    SECTION( "sb" ) {
+      /*...*/
+    }
+    SECTION( "sc" ) {
+      /*...*/
+    }
+  }
+  SECTION( "sd" ) {
+    /*...*/
+  }
+}
+
+ +Then you can run `sb` with: +
./MyExe Test -c sa -c sb
+ +Or run just `sd` with: +
./MyExe Test -c sd
+ +To run all of `sa`, including `sb` and `sc` use: +
./MyExe Test -c sa
+ +There are some limitations of this feature to be aware of: +- Code outside of sections being skipped will still be executed - e.g. any set-up code in the TEST_CASE before the +start of the first section.
+- At time of writing, wildcards are not supported in section names. +- If you specify a section without narrowing to a test case first then all test cases will be executed +(but only matching sections within them). + + + +## Filenames as tags +
-#, --filenames-as-tags
+ +When this option is used then every test is given an additional tag which is formed of the unqualified +filename it is found in, with any extension stripped, prefixed with the `#` character. + +So, for example, tests within the file `~\Dev\MyProject\Ferrets.cpp` would be tagged `[#Ferrets]`. + + --- -[Home](Readme.md) \ No newline at end of file +[Home](Readme.md) diff --git a/3rdparty/catch/docs/configuration.md b/3rdparty/catch/docs/configuration.md index 33052190cf3..ea57e78988a 100644 --- a/3rdparty/catch/docs/configuration.md +++ b/3rdparty/catch/docs/configuration.md @@ -61,6 +61,8 @@ This can be useful on certain platforms that do not provide ```std::cout``` and CATCH_CONFIG_CPP11_LONG_LONG // generates overloads for the long long type CATCH_CONFIG_CPP11_OVERRIDE // CATCH_OVERRIDE expands to override (for virtual function implementations) CATCH_CONFIG_CPP11_UNIQUE_PTR // Use std::unique_ptr instead of std::auto_ptr + CATCH_CONFIG_CPP11_SHUFFLE // Use std::shuffle instead of std::random_shuffle + CATCH_CONFIG_CPP11_TYPE_TRAITS // Use std::enable_if and Catch has some basic compiler detection that will attempt to select the appropriate mix of these macros. However being incomplete - and often without access to the respective compilers - this detection tends to be conservative. So overriding control is given to the user. If a compiler supports a feature (and Catch does not already detect it) then one or more of these may be defined to enable it (or suppress it, in some cases). If you do do this please raise an issue, specifying your compiler version (ideally with an idea of how to detect it) and stating that it has such support. @@ -68,6 +70,13 @@ You may also suppress any of these features by using the `_NO_` form, e.g. `CATC All C++11 support can be disabled with `CATCH_CONFIG_NO_CPP11` +# Windows header clutter + +On Windows Catch includes `windows.h`. To minimize global namespace clutter in the implementation file, it defines `NOMINMAX` and `WIN32_LEAN_AND_MEAN` before including it. You can control this behaviour via two macros: + + CATCH_CONFIG_NO_NOMINMAX // Stops Catch from using NOMINMAX macro + CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN // Stops Catch from using WIN32_LEAN_AND_MEAN macro + --- -[Home](Readme.md) \ No newline at end of file +[Home](Readme.md) diff --git a/3rdparty/catch/docs/contributing.md b/3rdparty/catch/docs/contributing.md index 49a663c042b..28d0643d42a 100644 --- a/3rdparty/catch/docs/contributing.md +++ b/3rdparty/catch/docs/contributing.md @@ -1,22 +1,40 @@ # Contributing to Catch -So you want to contribute something to Catch? That's great! Whether it's a bug fix, a new feature, support for additional compilers - or just a fix to the documentation - all contributions are very welcome and very much appreciated. Of course so are bug reports and other comments and questions. +So you want to contribute something to Catch? That's great! Whether it's a bug fix, a new feature, support for +additional compilers - or just a fix to the documentation - all contributions are very welcome and very much appreciated. +Of course so are bug reports and other comments and questions. -If you are contributing to the code base there are a few simple guidelines to keep in mind. This also includes notes to help you find your way around. As this is liable to drift out of date please raise an issue or, better still, a pull request for this file, if you notice that. +If you are contributing to the code base there are a few simple guidelines to keep in mind. This also includes notes to +help you find your way around. As this is liable to drift out of date please raise an issue or, better still, a pull +request for this file, if you notice that. ## Branches -Ongoing development is on the "develop" branch (if there is one, currently), or on feature branches that are branched off of develop. Please target any pull requests at develop, or, for larger chunks of work, a branch off of develop. +Ongoing development is currently on _master_. At some point an integration branch will be set-up and PRs should target + that - but for now it's all against master. You may see feature branches come and go from time to time, too. ## Directory structure -Users of Catch primarily use the single header version. Maintainers should work with the full source (which is still, primarily, in headers). This can be found in the ```include``` folder, but you may prefer to use one of the IDE project files (for MSVC or XCode). These can be found under ```projects/```*IDE Name*```/```*project name*. A number of contributors have proposed make files, and submitted their own versions. At some point these should be made available too. +_Users_ of Catch primarily use the single header version. _Maintainers_ should work with the full source (which is still, +primarily, in headers). This can be found in the `include` folder. There are a set of test files, currently under +`projects/SelfTest`. The test app can be built via CMake from the `CMakeLists.txt` file in the root, or you can generate +project files for Visual Studio, XCode, and others (instructions in the `projects` folder). If you have access to CLion +that can work with the CMake file directly. -In addition to the include files and IDE projects there are a number of tests in cpp files. These can all be found in ```projects/SelfTest```. You'll also see a ```SurrogateCpps``` directory in there. This contains a set of cpp files that each ```#include``` a single header. While these files are not essential to compilation they help to keep the implementation headers self-contained. 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. +As well as the runtime test files you'll also see a `SurrogateCpps` directory under `projects/SelfTest`. +This contains a set of .cpp files that each `#include` a single header. +While these files are not essential to compilation they help to keep the implementation headers self-contained. +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 ```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. +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. - *this document is in-progress...* +__When submitting a pull request please do not include changes to the single include, or to the version number file +as these are managed by the scripts!__ + + + *this document is still in-progress...* --- diff --git a/3rdparty/catch/docs/own-main.md b/3rdparty/catch/docs/own-main.md index f8c836e6f27..67e551f3c51 100644 --- a/3rdparty/catch/docs/own-main.md +++ b/3rdparty/catch/docs/own-main.md @@ -16,7 +16,7 @@ If you just need to have code that executes before and/ or after Catch this is t #define CATCH_CONFIG_RUNNER #include "catch.hpp" -int main( int argc, char* const argv[] ) +int main( int argc, char* argv[] ) { // global setup... @@ -24,7 +24,7 @@ int main( int argc, char* const argv[] ) // global clean-up... - return result; + return ( result < 0xff ? result : 0xff ); } ``` @@ -36,9 +36,9 @@ If you still want Catch to process the command line, but you want to programatic #define CATCH_CONFIG_RUNNER #include "catch.hpp" -int main( int argc, char* const argv[] ) +int main( int argc, char* argv[] ) { - Catch::Session session; // There must be exactly once instance + Catch::Session session; // There must be exactly one instance // writing to session.configData() here sets defaults // this is the preferred way to set them @@ -51,7 +51,11 @@ int main( int argc, char* const argv[] ) // overrides command line args // only do this if you know you need to - return session.run(); + int numFailed = session.run(); + // Note that on unices only the lower 8 bits are usually used, clamping + // the return value to 255 prevents false negative when some multiple + // of 256 tests has failed + return ( numFailed < 0xff ? numFailed : 0xff ); } ``` @@ -65,4 +69,4 @@ Catch embeds a powerful command line parser which you can also use to parse your --- -[Home](Readme.md) \ No newline at end of file +[Home](Readme.md) diff --git a/3rdparty/catch/docs/release-notes.md b/3rdparty/catch/docs/release-notes.md new file mode 100644 index 00000000000..bec9910e7cd --- /dev/null +++ b/3rdparty/catch/docs/release-notes.md @@ -0,0 +1,77 @@ +# 1.7.0 + +### Features/ Changes: +* Catch now runs significantly faster for passing tests + * Microbenchmark focused on Catch's overhead went from ~3.4s to ~0.7s. + * Real world test using [JSON for Modern C++](https://github.com/nlohmann/json)'s test suite went from ~6m 25s to ~4m 14s. +* Catch can now run specific sections within test cases. + * For now the support is only basic (no wildcards or tags), for details see the [documentation](docs/command-line.md). +* Catch now supports SEH on Windows as well as signals on Linux. + * After receiving a signal, Catch reports failing assertion and then passes the signal onto the previous handler. +* Approx can be used to compare values against strong typedefs (available in C++11 mode only). + * Strong typedefs mean types that are explicitly convertible to double. +* CHECK macro no longer stops executing section if an exception happens. +* Certain characters (space, tab, etc) are now pretty printed. + * This means that a `char c = ' '; REQUIRE(c == '\t');` would be printed as `' ' == '\t'`, instead of ` == 9`. + +### Fixes: +* Text formatting no longer attempts to access out-of-bounds characters under certain conditions. +* THROW family of assertions no longer trigger `-Wunused-value` on expressions containing explicit cast. +* Breaking into debugger under OS X works again and no longer required `DEBUG` to be defined. +* Compilation no longer breaks under certain compiler if a lambda is used inside assertion macro. + +### Other: +* Catch's CMakeLists now defines install command. +* Catch's CMakeLists now generates projects with warnings enabled. + + + + + +# Older versions +Release notes were not maintained prior to v1.6.0, but you should be able to work them out from the Git history + +## 1.6.1 + +### Features/ Changes: +* Catch now supports breaking into debugger on Linux + +### Fixes: +* Generators no longer leak memory (generators are still unsupported in general) +* JUnit reporter now reports UTC timestamps, instead of "tbd" +* `CHECK_THAT` macro is now properly defined as `CATCH_CHECK_THAT` when using `CATCH_` prefixed macros + +### Other: +* Types with overloaded `&&` operator are no longer evaluated twice when used in an assertion macro. +* The use of `__COUNTER__` is supressed when Catch is parsed by CLion + * This change is not active when compiling a binary +* Approval tests can now be run on Windows +* CMake will now warn if a file is present in the `include` folder but not is not enumerated as part of the project +* Catch now defines `NOMINMAX` and `WIN32_LEAN_AND_MEAN` before including `windows.h` + * This can be disabled if needed, see [documentation](docs/configuration.md) for details. + + +## 1.6.0 + +### Cmake/ projects: +* Moved CMakeLists.txt to root, made it friendlier for CLion and generating XCode and VS projects, and removed the manually maintained XCode and VS projects. + +### Features/ Changes: +* Approx now supports `>=` and `<=` +* Can now use `\` to escape chars in test names on command line +* Standardize C++11 feature toggles + +### Fixes: +* Blue shell colour +* Missing argument to `CATCH_CHECK_THROWS` +* Don't encode extended ASCII in XML +* use `std::shuffle` on more compilers (fixes deprecation warning/error) +* Use `__COUNTER__` more consistently (where available) + +### Other: +* Tweaks and changes to scripts - particularly for Approval test - to make them more portable + + +--- + +[Home](Readme.md) diff --git a/3rdparty/catch/docs/test-cases-and-sections.md b/3rdparty/catch/docs/test-cases-and-sections.md index 86644f006cd..809935b6384 100644 --- a/3rdparty/catch/docs/test-cases-and-sections.md +++ b/3rdparty/catch/docs/test-cases-and-sections.md @@ -2,7 +2,7 @@ While Catch fully supports the traditional, xUnit, style of class-based fixtures containing test case methods this is not the preferred style. -Instead Catch provides a powerful mechanism for nesting test case sections within a test case. For a more detailed discussion see the [tutorial](tutorial.md#testCasesAndSections). +Instead Catch provides a powerful mechanism for nesting test case sections within a test case. For a more detailed discussion see the [tutorial](tutorial.md#test-cases-and-sections). Test cases and sections are very easy to use in practice: @@ -34,14 +34,16 @@ Tag names are not case sensitive. All tag names beginning with non-alphanumeric characters are reserved by Catch. Catch defines a number of "special" tags, which have meaning to the test runner itself. These special tags all begin with a symbol character. Following is a list of currently defined special tags and their meanings. -* `[!hide]` or `[.]` (or, for legacy reasons, `[hide]`) - causes test cases to be skipped from the default list (ie when no test cases have been explicitly selected through tag expressions or name wildcards). The hide tag is often combined with another, user, tag (for example `[.][integration]` - so all integration tests are excluded from the default run but can be run by passing `[integration]` on the command line). As a short-cut you can combine these by simply prefixing your user tag with a `.` - e.g. `[.integration]`. Because the hide tag has evolved to have several forms, all forms are added as tags if you use one of them. +* `[!hide]` or `[.]` (or, for legacy reasons, `[hide]`) - causes test cases to be skipped from the default list (i.e. when no test cases have been explicitly selected through tag expressions or name wildcards). The hide tag is often combined with another, user, tag (for example `[.][integration]` - so all integration tests are excluded from the default run but can be run by passing `[integration]` on the command line). As a short-cut you can combine these by simply prefixing your user tag with a `.` - e.g. `[.integration]`. Because the hide tag has evolved to have several forms, all forms are added as tags if you use one of them. -* `[!throws]` - lets Catch know that this test is likely to throw an exception even if successful. This causes the test to be exluded when running with `-e` or `--nothrow`. +* `[!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`. * `[!shouldfail]` - reverse the failing logic of the test: if the test is successful if it fails, and vice-versa. * `[!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 the your tests. +* `[!nonportable]` - Indicates that behaviour may vary between platforms or compilers. + * `[#]` - running with `-#` or `--filenames-as-tags` causes Catch to add the filename, prefixed with `#` (and with any extension stripped) as a tag. e.g. tests in testfile.cpp would all be tagged `[#testfile]`. * `[@]` - tag aliases all begin with `@` (see below). @@ -52,7 +54,7 @@ Between tag expressions and wildcarded test names (as well as combinations of th CATCH_REGISTER_TAG_ALIAS( , ) -Aliases must begining with the `@` character. An example of a tag alias is: +Aliases must begin with the `@` character. An example of a tag alias is: CATCH_REGISTER_TAG_ALIAS( "[@nhf]", "[failing]~[.]" ) @@ -83,4 +85,4 @@ Other than the additional prefixes and the formatting in the console reporter th --- -[Home](Readme.md) \ No newline at end of file +[Home](Readme.md) diff --git a/3rdparty/catch/docs/test-fixtures.md b/3rdparty/catch/docs/test-fixtures.md index 6bef762b8e3..fc546b3997d 100644 --- a/3rdparty/catch/docs/test-fixtures.md +++ b/3rdparty/catch/docs/test-fixtures.md @@ -1,4 +1,4 @@ -Although Catch allows you to group tests together as sections within a test case, it can still convenient, sometimes, to group them using a more traditional test fixture. Catch fully supports this too. You define the test fixture as a simple structure: +Although Catch allows you to group tests together as sections within a test case, it can still be convenient, sometimes, to group them using a more traditional test fixture. Catch fully supports this too. You define the test fixture as a simple structure: ```c++ class UniqueTestsFixture { @@ -29,4 +29,4 @@ The two test cases here will create uniquely-named derived classes of UniqueTest --- -[Home](Readme.md) \ No newline at end of file +[Home](Readme.md) diff --git a/3rdparty/catch/docs/tutorial.md b/3rdparty/catch/docs/tutorial.md index 1aa2a659fbc..7392459262e 100644 --- a/3rdparty/catch/docs/tutorial.md +++ b/3rdparty/catch/docs/tutorial.md @@ -233,7 +233,7 @@ The requirement is that the following block of code ([or equivalent](own-main.md appears in _exactly one_ source file. Use as many additional cpp files (or whatever you call your implementation files) as you need for your tests, partitioned however makes most sense for your way of working. Each additional file need only ```#include "catch.hpp"``` - do not repeat the ```#define```! -In fact it is usually a good idea to put the block with the ```#define``` [in it's own source file](slow-compiles.md). +In fact it is usually a good idea to put the block with the ```#define``` [in its own source file](slow-compiles.md). Do not write your tests in header files! diff --git a/3rdparty/catch/include/catch.hpp b/3rdparty/catch/include/catch.hpp index 332fcd0b184..b16f2e5f6df 100644 --- a/3rdparty/catch/include/catch.hpp +++ b/3rdparty/catch/include/catch.hpp @@ -81,12 +81,12 @@ #define CATCH_CHECKED_ELSE( expr ) INTERNAL_CATCH_ELSE( expr, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECKED_ELSE" ) #define CATCH_CHECK_NOFAIL( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, "CATCH_CHECK_NOFAIL" ) -#define CATCH_CHECK_THROWS( expr ) INTERNAL_CATCH_THROWS( expr, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THROWS" ) +#define CATCH_CHECK_THROWS( expr ) INTERNAL_CATCH_THROWS( expr, Catch::ResultDisposition::ContinueOnFailure, "", "CATCH_CHECK_THROWS" ) #define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( expr, exceptionType, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THROWS_AS" ) #define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS( expr, Catch::ResultDisposition::ContinueOnFailure, matcher, "CATCH_CHECK_THROWS_WITH" ) #define CATCH_CHECK_NOTHROW( expr ) INTERNAL_CATCH_NO_THROW( expr, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_NOTHROW" ) -#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THAT" ) +#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THAT" ) #define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::Normal, "CATCH_REQUIRE_THAT" ) #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( msg, "CATCH_INFO" ) diff --git a/3rdparty/catch/include/external/clara.h b/3rdparty/catch/include/external/clara.h index 369c1b76c38..a999a37bf16 100644 --- a/3rdparty/catch/include/external/clara.h +++ b/3rdparty/catch/include/external/clara.h @@ -396,9 +396,12 @@ namespace Clara { inline void convertInto( std::string const& _source, std::string& _dest ) { _dest = _source; } + char toLowerCh(char c) { + return static_cast( ::tolower( c ) ); + } inline void convertInto( std::string const& _source, bool& _dest ) { std::string sourceLC = _source; - std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), ::tolower ); + std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), toLowerCh ); if( sourceLC == "y" || sourceLC == "1" || sourceLC == "true" || sourceLC == "yes" || sourceLC == "on" ) _dest = true; else if( sourceLC == "n" || sourceLC == "0" || sourceLC == "false" || sourceLC == "no" || sourceLC == "off" ) diff --git a/3rdparty/catch/include/external/tbc_text_format.h b/3rdparty/catch/include/external/tbc_text_format.h index a63d6a14e9b..5209d804250 100644 --- a/3rdparty/catch/include/external/tbc_text_format.h +++ b/3rdparty/catch/include/external/tbc_text_format.h @@ -37,19 +37,16 @@ namespace Tbc { TextAttributes() : initialIndent( std::string::npos ), indent( 0 ), - width( consoleWidth-1 ), - tabChar( '\t' ) + width( consoleWidth-1 ) {} TextAttributes& setInitialIndent( std::size_t _value ) { initialIndent = _value; return *this; } TextAttributes& setIndent( std::size_t _value ) { indent = _value; return *this; } TextAttributes& setWidth( std::size_t _value ) { width = _value; return *this; } - TextAttributes& setTabChar( char _value ) { tabChar = _value; return *this; } std::size_t initialIndent; // indent of first line, or npos std::size_t indent; // indent of subsequent lines, or all if initialIndent is npos std::size_t width; // maximum width of text, including indent. Longer text will wrap - char tabChar; // If this char is seen the indent is changed to current pos }; class Text { @@ -57,63 +54,80 @@ namespace Tbc { Text( std::string const& _str, TextAttributes const& _attr = TextAttributes() ) : attr( _attr ) { - std::string wrappableChars = " [({.,/|\\-"; - std::size_t indent = _attr.initialIndent != std::string::npos - ? _attr.initialIndent - : _attr.indent; - std::string remainder = _str; + const std::string wrappableBeforeChars = "[({<\t"; + const std::string wrappableAfterChars = "])}>-,./|\\"; + const std::string wrappableInsteadOfChars = " \n\r"; + std::string indent = _attr.initialIndent != std::string::npos + ? std::string( _attr.initialIndent, ' ' ) + : std::string( _attr.indent, ' ' ); + + typedef std::string::const_iterator iterator; + iterator it = _str.begin(); + const iterator strEnd = _str.end(); + + while( it != strEnd ) { - while( !remainder.empty() ) { if( lines.size() >= 1000 ) { lines.push_back( "... message truncated due to excessive size" ); return; } - std::size_t tabPos = std::string::npos; - std::size_t width = (std::min)( remainder.size(), _attr.width - indent ); - std::size_t pos = remainder.find_first_of( '\n' ); - if( pos <= width ) { - width = pos; - } - pos = remainder.find_last_of( _attr.tabChar, width ); - if( pos != std::string::npos ) { - tabPos = pos; - if( remainder[width] == '\n' ) - width--; - remainder = remainder.substr( 0, tabPos ) + remainder.substr( tabPos+1 ); - } - if( width == remainder.size() ) { - spliceLine( indent, remainder, width ); - } - else if( remainder[width] == '\n' ) { - spliceLine( indent, remainder, width ); - if( width <= 1 || remainder.size() != 1 ) - remainder = remainder.substr( 1 ); - indent = _attr.indent; - } - else { - pos = remainder.find_last_of( wrappableChars, width ); - if( pos != std::string::npos && pos > 0 ) { - spliceLine( indent, remainder, pos ); - if( remainder[0] == ' ' ) - remainder = remainder.substr( 1 ); + + std::string suffix; + std::size_t width = (std::min)( static_cast( strEnd-it ), _attr.width-static_cast( indent.size() ) ); + iterator itEnd = it+width; + iterator itNext = _str.end(); + + iterator itNewLine = std::find( it, itEnd, '\n' ); + if( itNewLine != itEnd ) + itEnd = itNewLine; + + if( itEnd != strEnd ) { + bool foundWrapPoint = false; + iterator findIt = itEnd; + do { + if( wrappableAfterChars.find( *findIt ) != std::string::npos && findIt != itEnd ) { + itEnd = findIt+1; + itNext = findIt+1; + foundWrapPoint = true; + } + else if( findIt > it && wrappableBeforeChars.find( *findIt ) != std::string::npos ) { + itEnd = findIt; + itNext = findIt; + foundWrapPoint = true; + } + else if( wrappableInsteadOfChars.find( *findIt ) != std::string::npos ) { + itNext = findIt+1; + itEnd = findIt; + foundWrapPoint = true; + } + if( findIt == it ) + break; + else + --findIt; + } + while( !foundWrapPoint ); + + if( !foundWrapPoint ) { + // No good wrap char, so we'll break mid word and add a hyphen + --itEnd; + itNext = itEnd; + suffix = "-"; } else { - spliceLine( indent, remainder, width-1 ); - lines.back() += "-"; + while( itEnd > it && wrappableInsteadOfChars.find( *(itEnd-1) ) != std::string::npos ) + --itEnd; } - if( lines.size() == 1 ) - indent = _attr.indent; - if( tabPos != std::string::npos ) - indent += tabPos; } + lines.push_back( indent + std::string( it, itEnd ) + suffix ); + + if( indent.size() != _attr.indent ) + indent = std::string( _attr.indent, ' ' ); + it = itNext; } } - void spliceLine( std::size_t _indent, std::string& _remainder, std::size_t _pos ) { - lines.push_back( std::string( _indent, ' ' ) + _remainder.substr( 0, _pos ) ); - _remainder = _remainder.substr( _pos ); - } + typedef std::vector::const_iterator const_iterator; @@ -138,6 +152,7 @@ namespace Tbc { return _stream; } + private: std::string str; TextAttributes attr; diff --git a/3rdparty/catch/include/internal/catch_approx.hpp b/3rdparty/catch/include/internal/catch_approx.hpp index f5dba61a70d..f193742763a 100644 --- a/3rdparty/catch/include/internal/catch_approx.hpp +++ b/3rdparty/catch/include/internal/catch_approx.hpp @@ -13,6 +13,10 @@ #include #include +#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) +#include +#endif + namespace Catch { namespace Detail { @@ -41,6 +45,53 @@ namespace Detail { return approx; } +#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) + template ::value>::type> + friend bool operator == ( const T& lhs, Approx const& rhs ) { + // Thanks to Richard Harris for his help refining this formula + auto lhs_v = double(lhs); + return fabs( lhs_v - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs_v), fabs(rhs.m_value) ) ); + } + + template ::value>::type> + friend bool operator == ( Approx const& lhs, const T& rhs ) { + return operator==( rhs, lhs ); + } + + template ::value>::type> + friend bool operator != ( T lhs, Approx const& rhs ) { + return !operator==( lhs, rhs ); + } + + template ::value>::type> + friend bool operator != ( Approx const& lhs, T rhs ) { + return !operator==( rhs, lhs ); + } + + template ::value>::type> + friend bool operator <= ( T lhs, Approx const& rhs ) + { + return double(lhs) < rhs.m_value || lhs == rhs; + } + + template ::value>::type> + friend bool operator <= ( Approx const& lhs, T rhs ) + { + return lhs.m_value < double(rhs) || lhs == rhs; + } + + template ::value>::type> + friend bool operator >= ( T lhs, Approx const& rhs ) + { + return double(lhs) > rhs.m_value || lhs == rhs; + } + + template ::value>::type> + friend bool operator >= ( Approx const& lhs, T rhs ) + { + return lhs.m_value > double(rhs) || lhs == rhs; + } +#else friend bool operator == ( double lhs, Approx const& rhs ) { // Thanks to Richard Harris for his help refining this formula return fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) ); @@ -58,6 +109,27 @@ namespace Detail { return !operator==( rhs, lhs ); } + friend bool operator <= ( double lhs, Approx const& rhs ) + { + return lhs < rhs.m_value || lhs == rhs; + } + + friend bool operator <= ( Approx const& lhs, double rhs ) + { + return lhs.m_value < rhs || lhs == rhs; + } + + friend bool operator >= ( double lhs, Approx const& rhs ) + { + return lhs > rhs.m_value || lhs == rhs; + } + + friend bool operator >= ( Approx const& lhs, double rhs ) + { + return lhs.m_value > rhs || lhs == rhs; + } +#endif + Approx& epsilon( double newEpsilon ) { m_epsilon = newEpsilon; return *this; diff --git a/3rdparty/catch/include/internal/catch_assertionresult.h b/3rdparty/catch/include/internal/catch_assertionresult.h index 99b3a7c3beb..e2b979f8ceb 100644 --- a/3rdparty/catch/include/internal/catch_assertionresult.h +++ b/3rdparty/catch/include/internal/catch_assertionresult.h @@ -13,6 +13,27 @@ namespace Catch { + struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison; + + struct DecomposedExpression + { + virtual ~DecomposedExpression() {} + virtual bool isBinaryExpression() const { + return false; + } + virtual void reconstructExpression( std::string& dest ) const = 0; + + // Only simple binary comparisons can be decomposed. + // If more complex check is required then wrap sub-expressions in parentheses. + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator + ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator - ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator * ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator / ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator % ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( T const& ); + }; + struct AssertionInfo { AssertionInfo() {} @@ -29,11 +50,41 @@ namespace Catch { struct AssertionResultData { - AssertionResultData() : resultType( ResultWas::Unknown ) {} + AssertionResultData() : decomposedExpression( CATCH_NULL ) + , resultType( ResultWas::Unknown ) + , negated( false ) + , parenthesized( false ) {} - std::string reconstructedExpression; + void negate( bool parenthesize ) { + negated = !negated; + parenthesized = parenthesize; + if( resultType == ResultWas::Ok ) + resultType = ResultWas::ExpressionFailed; + else if( resultType == ResultWas::ExpressionFailed ) + resultType = ResultWas::Ok; + } + + std::string const& reconstructExpression() const { + if( decomposedExpression != CATCH_NULL ) { + decomposedExpression->reconstructExpression( reconstructedExpression ); + if( parenthesized ) { + reconstructedExpression.insert( 0, 1, '(' ); + reconstructedExpression.append( 1, ')' ); + } + if( negated ) { + reconstructedExpression.insert( 0, 1, '!' ); + } + decomposedExpression = CATCH_NULL; + } + return reconstructedExpression; + } + + mutable DecomposedExpression const* decomposedExpression; + mutable std::string reconstructedExpression; std::string message; ResultWas::OfType resultType; + bool negated; + bool parenthesized; }; class AssertionResult { @@ -60,6 +111,8 @@ namespace Catch { std::string getMessage() const; SourceLineInfo getSourceInfo() const; std::string getTestMacroName() const; + void discardDecomposedExpression() const; + void expandDecomposedExpression() const; protected: AssertionInfo m_info; diff --git a/3rdparty/catch/include/internal/catch_assertionresult.hpp b/3rdparty/catch/include/internal/catch_assertionresult.hpp index bd59de9af4e..9b637028cdc 100644 --- a/3rdparty/catch/include/internal/catch_assertionresult.hpp +++ b/3rdparty/catch/include/internal/catch_assertionresult.hpp @@ -56,7 +56,7 @@ namespace Catch { std::string AssertionResult::getExpression() const { if( isFalseTest( m_info.resultDisposition ) ) - return "!" + m_info.capturedExpression; + return '!' + m_info.capturedExpression; else return m_info.capturedExpression; } @@ -72,7 +72,7 @@ namespace Catch { } std::string AssertionResult::getExpandedExpression() const { - return m_resultData.reconstructedExpression; + return m_resultData.reconstructExpression(); } std::string AssertionResult::getMessage() const { @@ -86,6 +86,14 @@ namespace Catch { return m_info.macroName; } + void AssertionResult::discardDecomposedExpression() const { + m_resultData.decomposedExpression = CATCH_NULL; + } + + void AssertionResult::expandDecomposedExpression() const { + m_resultData.reconstructExpression(); + } + } // end namespace Catch #endif // TWOBLUECUBES_CATCH_ASSERTIONRESULT_HPP_INCLUDED diff --git a/3rdparty/catch/include/internal/catch_capture.hpp b/3rdparty/catch/include/internal/catch_capture.hpp index fa5835b85b2..04be7016399 100644 --- a/3rdparty/catch/include/internal/catch_capture.hpp +++ b/3rdparty/catch/include/internal/catch_capture.hpp @@ -37,10 +37,11 @@ ( __catchResult <= expr ).endExpression(); \ } \ catch( ... ) { \ - __catchResult.useActiveException( Catch::ResultDisposition::Normal ); \ + __catchResult.useActiveException( resultDisposition ); \ } \ INTERNAL_CATCH_REACT( __catchResult ) \ - } while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look + } while( Catch::isTrue( false && static_cast( !!(expr) ) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look + // The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_IF( expr, resultDisposition, macroName ) \ @@ -57,7 +58,7 @@ do { \ Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \ try { \ - expr; \ + static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::Ok ); \ } \ catch( ... ) { \ @@ -72,7 +73,7 @@ Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition, #matcher ); \ if( __catchResult.allowThrows() ) \ try { \ - expr; \ + static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ catch( ... ) { \ @@ -89,7 +90,7 @@ Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \ if( __catchResult.allowThrows() ) \ try { \ - expr; \ + static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ catch( exceptionType ) { \ @@ -132,13 +133,7 @@ do { \ Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #arg ", " #matcher, resultDisposition ); \ try { \ - std::string matcherAsString = (matcher).toString(); \ - __catchResult \ - .setLhs( Catch::toString( arg ) ) \ - .setRhs( matcherAsString == Catch::Detail::unprintableString ? #matcher : matcherAsString ) \ - .setOp( "matches" ) \ - .setResultType( (matcher).match( arg ) ); \ - __catchResult.captureExpression(); \ + __catchResult.captureMatch( arg, matcher, #matcher ); \ } catch( ... ) { \ __catchResult.useActiveException( resultDisposition | Catch::ResultDisposition::ContinueOnFailure ); \ } \ diff --git a/3rdparty/catch/include/internal/catch_commandline.hpp b/3rdparty/catch/include/internal/catch_commandline.hpp index 89eced34655..7186da37c9f 100644 --- a/3rdparty/catch/include/internal/catch_commandline.hpp +++ b/3rdparty/catch/include/internal/catch_commandline.hpp @@ -23,13 +23,14 @@ namespace Catch { config.abortAfter = x; } inline void addTestOrTags( ConfigData& config, std::string const& _testSpec ) { config.testsOrTags.push_back( _testSpec ); } + inline void addSectionToRun( ConfigData& config, std::string const& sectionName ) { config.sectionsToRun.push_back( sectionName ); } inline void addReporterName( ConfigData& config, std::string const& _reporterName ) { config.reporterNames.push_back( _reporterName ); } inline void addWarning( ConfigData& config, std::string const& _warning ) { if( _warning == "NoAssertions" ) config.warnings = static_cast( config.warnings | WarnAbout::NoAssertions ); else - throw std::runtime_error( "Unrecognised warning: '" + _warning + "'" ); + throw std::runtime_error( "Unrecognised warning: '" + _warning + '\'' ); } inline void setOrder( ConfigData& config, std::string const& order ) { if( startsWith( "declared", order ) ) @@ -39,7 +40,7 @@ namespace Catch { else if( startsWith( "random", order ) ) config.runOrder = RunTests::InRandomOrder; else - throw std::runtime_error( "Unrecognised ordering: '" + order + "'" ); + throw std::runtime_error( "Unrecognised ordering: '" + order + '\'' ); } inline void setRngSeed( ConfigData& config, std::string const& seed ) { if( seed == "time" ) { @@ -64,7 +65,7 @@ namespace Catch { } inline void setUseColour( ConfigData& config, std::string const& value ) { std::string mode = toLower( value ); - + if( mode == "yes" ) config.useColour = UseColour::Yes; else if( mode == "no" ) @@ -85,10 +86,10 @@ namespace Catch { std::string line; while( std::getline( f, line ) ) { line = trim(line); - if( !line.empty() && !startsWith( line, "#" ) ) { - if( !startsWith( line, "\"" ) ) - line = "\"" + line + "\""; - addTestOrTags( config, line + "," ); + if( !line.empty() && !startsWith( line, '#' ) ) { + if( !startsWith( line, '"' ) ) + line = '"' + line + '"'; + addTestOrTags( config, line + ',' ); } } } @@ -176,6 +177,10 @@ namespace Catch { .describe( "adds a tag for the filename" ) .bind( &ConfigData::filenamesAsTags ); + cli["-c"]["--section"] + .describe( "specify section to run" ) + .bind( &addSectionToRun, "section name" ); + // Less common commands which don't have a short form cli["--list-test-names-only"] .describe( "list all/matching test cases names only" ) @@ -196,7 +201,7 @@ namespace Catch { cli["--force-colour"] .describe( "force colourised output (deprecated)" ) .bind( &forceColour ); - + cli["--use-colour"] .describe( "should output be colourised" ) .bind( &setUseColour, "yes|no" ); diff --git a/3rdparty/catch/include/internal/catch_common.h b/3rdparty/catch/include/internal/catch_common.h index 545276e748a..a42b558e949 100644 --- a/3rdparty/catch/include/internal/catch_common.h +++ b/3rdparty/catch/include/internal/catch_common.h @@ -8,6 +8,8 @@ #ifndef TWOBLUECUBES_CATCH_COMMON_H_INCLUDED #define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED +#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 ) #ifdef CATCH_CONFIG_COUNTER @@ -77,7 +79,10 @@ namespace Catch { } bool startsWith( std::string const& s, std::string const& prefix ); + bool startsWith( std::string const& s, char prefix ); bool endsWith( std::string const& s, std::string const& suffix ); + bool endsWith( std::string const& s, char suffix ); + bool contains( std::string const& s, std::string const& infix ); bool contains( std::string const& s, std::string const& infix ); void toLowerInPlace( std::string& s ); std::string toLower( std::string const& s ); @@ -97,8 +102,8 @@ namespace Catch { SourceLineInfo(); SourceLineInfo( char const* _file, std::size_t _line ); - SourceLineInfo( SourceLineInfo const& other ); # ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + SourceLineInfo(SourceLineInfo const& other) = default; SourceLineInfo( SourceLineInfo && ) = default; SourceLineInfo& operator = ( SourceLineInfo const& ) = default; SourceLineInfo& operator = ( SourceLineInfo && ) = default; @@ -107,7 +112,7 @@ namespace Catch { bool operator == ( SourceLineInfo const& other ) const; bool operator < ( SourceLineInfo const& other ) const; - std::string file; + char const* file; std::size_t line; }; diff --git a/3rdparty/catch/include/internal/catch_common.hpp b/3rdparty/catch/include/internal/catch_common.hpp index 7ad5b1cae81..766c3df8b48 100644 --- a/3rdparty/catch/include/internal/catch_common.hpp +++ b/3rdparty/catch/include/internal/catch_common.hpp @@ -10,17 +10,28 @@ #include "catch_common.h" +#include + namespace Catch { bool startsWith( std::string const& s, std::string const& prefix ) { - return s.size() >= prefix.size() && s.substr( 0, prefix.size() ) == prefix; + return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin()); + } + bool startsWith( std::string const& s, char prefix ) { + return !s.empty() && s[0] == prefix; } bool endsWith( std::string const& s, std::string const& suffix ) { - return s.size() >= suffix.size() && s.substr( s.size()-suffix.size(), suffix.size() ) == suffix; + return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin()); + } + bool endsWith( std::string const& s, char suffix ) { + return !s.empty() && s[s.size()-1] == suffix; } bool contains( std::string const& s, std::string const& infix ) { return s.find( infix ) != std::string::npos; } + bool contains( std::string const& s, char infix ) { + return s.find(infix) != std::string::npos; + } char toLowerCh(char c) { return static_cast( ::tolower( c ) ); } @@ -37,7 +48,7 @@ namespace Catch { std::string::size_type start = str.find_first_not_of( whitespaceChars ); std::string::size_type end = str.find_last_not_of( whitespaceChars ); - return start != std::string::npos ? str.substr( start, 1+end-start ) : ""; + return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string(); } bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) { @@ -60,29 +71,25 @@ namespace Catch { {} std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) { - os << pluraliser.m_count << " " << pluraliser.m_label; + os << pluraliser.m_count << ' ' << pluraliser.m_label; if( pluraliser.m_count != 1 ) - os << "s"; + os << 's'; return os; } - SourceLineInfo::SourceLineInfo() : line( 0 ){} + SourceLineInfo::SourceLineInfo() : file(""), line( 0 ){} SourceLineInfo::SourceLineInfo( char const* _file, std::size_t _line ) : file( _file ), line( _line ) {} - SourceLineInfo::SourceLineInfo( SourceLineInfo const& other ) - : file( other.file ), - line( other.line ) - {} bool SourceLineInfo::empty() const { - return file.empty(); + return file[0] == '\0'; } bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const { - return line == other.line && file == other.file; + return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0); } bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const { - return line < other.line || ( line == other.line && file < other.file ); + return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0)); } void seedRng( IConfig const& config ) { @@ -95,16 +102,16 @@ namespace Catch { std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) { #ifndef __GNUG__ - os << info.file << "(" << info.line << ")"; + os << info.file << '(' << info.line << ')'; #else - os << info.file << ":" << info.line; + os << info.file << ':' << info.line; #endif return os; } void throwLogicError( std::string const& message, SourceLineInfo const& locationInfo ) { std::ostringstream oss; - oss << locationInfo << ": Internal Catch error: '" << message << "'"; + oss << locationInfo << ": Internal Catch error: '" << message << '\''; if( alwaysTrue() ) throw std::logic_error( oss.str() ); } diff --git a/3rdparty/catch/include/internal/catch_compiler_capabilities.h b/3rdparty/catch/include/internal/catch_compiler_capabilities.h index 5af1e76a8d7..2b947fbda6a 100644 --- a/3rdparty/catch/include/internal/catch_compiler_capabilities.h +++ b/3rdparty/catch/include/internal/catch_compiler_capabilities.h @@ -19,6 +19,8 @@ // CATCH_CONFIG_CPP11_LONG_LONG : is long long supported? // CATCH_CONFIG_CPP11_OVERRIDE : is override supported? // CATCH_CONFIG_CPP11_UNIQUE_PTR : is unique_ptr supported (otherwise use auto_ptr) +// CATCH_CONFIG_CPP11_SHUFFLE : is std::shuffle supported? +// CATCH_CONFIG_CPP11_TYPE_TRAITS : are type_traits and enable_if supported? // CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported? @@ -115,6 +117,8 @@ #if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015)) #define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT #define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +#define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE +#define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS #endif #endif // _MSC_VER @@ -180,7 +184,12 @@ # if !defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) # define CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR # endif - +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) +# define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE +# endif +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) +# define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS +# endif #endif // __cplusplus >= 201103L @@ -203,18 +212,27 @@ #if defined(CATCH_INTERNAL_CONFIG_VARIADIC_MACROS) && !defined(CATCH_CONFIG_NO_VARIADIC_MACROS) && !defined(CATCH_CONFIG_VARIADIC_MACROS) # define CATCH_CONFIG_VARIADIC_MACROS #endif -#if defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_CPP11) +#if defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_NO_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_CPP11) # define CATCH_CONFIG_CPP11_LONG_LONG #endif -#if defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_CPP11) +#if defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_NO_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_CPP11) # define CATCH_CONFIG_CPP11_OVERRIDE #endif -#if defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_CPP11) +#if defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_NO_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_CPP11) # define CATCH_CONFIG_CPP11_UNIQUE_PTR #endif -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) +// Use of __COUNTER__ is suppressed if __JETBRAINS_IDE__ is #defined (meaning we're being parsed by a JetBrains IDE for +// analytics) because, at time of writing, __COUNTER__ is not properly handled by it. +// This does not affect compilation +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) && !defined(__JETBRAINS_IDE__) # define CATCH_CONFIG_COUNTER #endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_NO_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_SHUFFLE +#endif +# if defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_NO_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_TYPE_TRAITS +# endif #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS diff --git a/3rdparty/catch/include/internal/catch_config.hpp b/3rdparty/catch/include/internal/catch_config.hpp index 72b0f6c7723..7d7887aaf51 100644 --- a/3rdparty/catch/include/internal/catch_config.hpp +++ b/3rdparty/catch/include/internal/catch_config.hpp @@ -74,6 +74,7 @@ namespace Catch { std::vector reporterNames; std::vector testsOrTags; + std::vector sectionsToRun; }; @@ -115,7 +116,8 @@ namespace Catch { bool shouldDebugBreak() const { return m_data.shouldDebugBreak; } - std::vector getReporterNames() const { return m_data.reporterNames; } + std::vector const& getReporterNames() const { return m_data.reporterNames; } + std::vector const& getSectionsToRun() const CATCH_OVERRIDE { return m_data.sectionsToRun; } int abortAfter() const { return m_data.abortAfter; } diff --git a/3rdparty/catch/include/internal/catch_console_colour_impl.hpp b/3rdparty/catch/include/internal/catch_console_colour_impl.hpp index f776952bfe7..ba2a9d1c3ae 100644 --- a/3rdparty/catch/include/internal/catch_console_colour_impl.hpp +++ b/3rdparty/catch/include/internal/catch_console_colour_impl.hpp @@ -41,15 +41,7 @@ namespace Catch { #if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) ///////////////////////////////////////// -#ifndef NOMINMAX -#define NOMINMAX -#endif - -#ifdef __AFXDLL -#include -#else -#include -#endif +#include "catch_windows_h_proxy.h" namespace Catch { namespace { @@ -131,7 +123,7 @@ namespace { case Colour::White: return setColour( "[0m" ); case Colour::Red: return setColour( "[0;31m" ); case Colour::Green: return setColour( "[0;32m" ); - case Colour::Blue: return setColour( "[0:34m" ); + case Colour::Blue: return setColour( "[0;34m" ); case Colour::Cyan: return setColour( "[0;36m" ); case Colour::Yellow: return setColour( "[0;33m" ); case Colour::Grey: return setColour( "[1;30m" ); diff --git a/3rdparty/catch/include/internal/catch_context_impl.hpp b/3rdparty/catch/include/internal/catch_context_impl.hpp index 030f29e2742..8516ad93b30 100644 --- a/3rdparty/catch/include/internal/catch_context_impl.hpp +++ b/3rdparty/catch/include/internal/catch_context_impl.hpp @@ -12,6 +12,7 @@ #include "catch_context.h" #include "catch_stream.hpp" +#include "catch_common.h" namespace Catch { @@ -21,6 +22,11 @@ namespace Catch { Context( Context const& ); void operator=( Context const& ); + public: + virtual ~Context() { + deleteAllValues( m_generatorsByTestName ); + } + public: // IContext virtual IResultCapture* getResultCapture() { return m_resultCapture; diff --git a/3rdparty/catch/include/internal/catch_debugger.h b/3rdparty/catch/include/internal/catch_debugger.h index 0dd36aa3539..15a4c64bb43 100644 --- a/3rdparty/catch/include/internal/catch_debugger.h +++ b/3rdparty/catch/include/internal/catch_debugger.h @@ -23,27 +23,36 @@ namespace Catch{ // The following code snippet based on: // http://cocoawithlove.com/2008/03/break-into-debugger.html - #ifdef DEBUG - #if defined(__ppc64__) || defined(__ppc__) - #define CATCH_BREAK_INTO_DEBUGGER() \ - if( Catch::isDebuggerActive() ) { \ - __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ - : : : "memory","r0","r3","r4" ); \ - } - #else - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) {__asm__("int $3\n" : : );} - #endif + #if defined(__ppc64__) || defined(__ppc__) + #define CATCH_TRAP() \ + __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ + : : : "memory","r0","r3","r4" ) + #else + #define CATCH_TRAP() __asm__("int $3\n" : : ) #endif +#elif defined(CATCH_PLATFORM_LINUX) + // If we can use inline assembler, do it because this allows us to break + // directly at the location of the failing check instead of breaking inside + // raise() called from it, i.e. one stack frame below. + #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) + #define CATCH_TRAP() asm volatile ("int $3") + #else // Fall back to the generic way. + #include + + #define CATCH_TRAP() raise(SIGTRAP) + #endif #elif defined(_MSC_VER) - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { __debugbreak(); } + #define CATCH_TRAP() __debugbreak() #elif defined(__MINGW32__) extern "C" __declspec(dllimport) void __stdcall DebugBreak(); - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { DebugBreak(); } + #define CATCH_TRAP() DebugBreak() #endif -#ifndef CATCH_BREAK_INTO_DEBUGGER -#define CATCH_BREAK_INTO_DEBUGGER() Catch::alwaysTrue(); +#ifdef CATCH_TRAP + #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } +#else + #define CATCH_BREAK_INTO_DEBUGGER() Catch::alwaysTrue(); #endif #endif // TWOBLUECUBES_CATCH_DEBUGGER_H_INCLUDED diff --git a/3rdparty/catch/include/internal/catch_debugger.hpp b/3rdparty/catch/include/internal/catch_debugger.hpp index 8c552661972..77ab29ccb4d 100644 --- a/3rdparty/catch/include/internal/catch_debugger.hpp +++ b/3rdparty/catch/include/internal/catch_debugger.hpp @@ -61,6 +61,33 @@ } } // namespace Catch +#elif defined(CATCH_PLATFORM_LINUX) + #include + #include + + namespace Catch{ + // The standard POSIX way of detecting a debugger is to attempt to + // ptrace() the process, but this needs to be done from a child and not + // this process itself to still allow attaching to this process later + // if wanted, so is rather heavy. Under Linux we have the PID of the + // "debugger" (which doesn't need to be gdb, of course, it could also + // be strace, for example) in /proc/$PID/status, so just get it from + // there instead. + bool isDebuggerActive(){ + std::ifstream in("/proc/self/status"); + for( std::string line; std::getline(in, line); ) { + static const int PREFIX_LEN = 11; + if( line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0 ) { + // We're traced if the PID is not 0 and no other PID starts + // with 0 digit, so it's enough to check for just a single + // character. + return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0'; + } + } + + return false; + } + } // namespace Catch #elif defined(_MSC_VER) extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); namespace Catch { diff --git a/3rdparty/catch/include/internal/catch_default_main.hpp b/3rdparty/catch/include/internal/catch_default_main.hpp index 54202fb397a..12ca902477c 100644 --- a/3rdparty/catch/include/internal/catch_default_main.hpp +++ b/3rdparty/catch/include/internal/catch_default_main.hpp @@ -12,7 +12,8 @@ // Standard C/C++ main entry point int main (int argc, char * argv[]) { - return Catch::Session().run( argc, argv ); + int result = Catch::Session().run( argc, argv ); + return ( result < 0xff ? result : 0xff ); } #else // __OBJC__ @@ -30,7 +31,7 @@ int main (int argc, char * const argv[]) { [pool drain]; #endif - return result; + return ( result < 0xff ? result : 0xff ); } #endif // __OBJC__ diff --git a/3rdparty/catch/include/internal/catch_expression_lhs.hpp b/3rdparty/catch/include/internal/catch_expression_lhs.hpp index 51b803e5e69..9670d2a1c0c 100644 --- a/3rdparty/catch/include/internal/catch_expression_lhs.hpp +++ b/3rdparty/catch/include/internal/catch_expression_lhs.hpp @@ -14,90 +14,155 @@ namespace Catch { -// Wraps the LHS of an expression and captures the operator and RHS (if any) - -// wrapping them all in a ResultBuilder object -template -class ExpressionLhs { - ExpressionLhs& operator = ( ExpressionLhs const& ); -# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS - ExpressionLhs& operator = ( ExpressionLhs && ) = delete; -# endif +template +class BinaryExpression; +template +class MatchExpression; + +// Wraps the LHS of an expression and overloads comparison operators +// for also capturing those and RHS (if any) +template +class ExpressionLhs : public DecomposedExpression { public: - ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {} -# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS - ExpressionLhs( ExpressionLhs const& ) = default; - ExpressionLhs( ExpressionLhs && ) = default; -# endif + ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ), m_truthy(false) {} template - ResultBuilder& operator == ( RhsT const& rhs ) { + BinaryExpression + operator == ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator != ( RhsT const& rhs ) { + BinaryExpression + operator != ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator < ( RhsT const& rhs ) { + BinaryExpression + operator < ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator > ( RhsT const& rhs ) { + BinaryExpression + operator > ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator <= ( RhsT const& rhs ) { + BinaryExpression + operator <= ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator >= ( RhsT const& rhs ) { + BinaryExpression + operator >= ( RhsT const& rhs ) const { return captureExpression( rhs ); } - ResultBuilder& operator == ( bool rhs ) { + BinaryExpression operator == ( bool rhs ) const { return captureExpression( rhs ); } - ResultBuilder& operator != ( bool rhs ) { + BinaryExpression operator != ( bool rhs ) const { return captureExpression( rhs ); } void endExpression() { - bool value = m_lhs ? true : false; + m_truthy = m_lhs ? true : false; m_rb - .setLhs( Catch::toString( value ) ) - .setResultType( value ) - .endExpression(); + .setResultType( m_truthy ) + .endExpression( *this ); } - // Only simple binary expressions are allowed on the LHS. - // If more complex compositions are required then place the sub expression in parentheses - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator + ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator - ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator / ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator * ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( RhsT const& ); + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + dest = Catch::toString( m_truthy ); + } private: template - ResultBuilder& captureExpression( RhsT const& rhs ) { - return m_rb - .setResultType( Internal::compare( m_lhs, rhs ) ) - .setLhs( Catch::toString( m_lhs ) ) - .setRhs( Catch::toString( rhs ) ) - .setOp( Internal::OperatorTraits::getName() ); + BinaryExpression captureExpression( RhsT& rhs ) const { + return BinaryExpression( m_rb, m_lhs, rhs ); + } + + template + BinaryExpression captureExpression( bool rhs ) const { + return BinaryExpression( m_rb, m_lhs, rhs ); } private: ResultBuilder& m_rb; T m_lhs; + bool m_truthy; +}; + +template +class BinaryExpression : public DecomposedExpression { +public: + BinaryExpression( ResultBuilder& rb, LhsT lhs, RhsT rhs ) + : m_rb( rb ), m_lhs( lhs ), m_rhs( rhs ) {} + + void endExpression() const { + m_rb + .setResultType( Internal::compare( m_lhs, m_rhs ) ) + .endExpression( *this ); + } + + virtual bool isBinaryExpression() const CATCH_OVERRIDE { + return true; + } + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + std::string lhs = Catch::toString( m_lhs ); + std::string rhs = Catch::toString( m_rhs ); + char delim = lhs.size() + rhs.size() < 40 && + lhs.find('\n') == std::string::npos && + rhs.find('\n') == std::string::npos ? ' ' : '\n'; + dest.reserve( 7 + lhs.size() + rhs.size() ); + // 2 for spaces around operator + // 2 for operator + // 2 for parentheses (conditionally added later) + // 1 for negation (conditionally added later) + dest = lhs; + dest += delim; + dest += Internal::OperatorTraits::getName(); + dest += delim; + dest += rhs; + } + +private: + ResultBuilder& m_rb; + LhsT m_lhs; + RhsT m_rhs; +}; + +template +class MatchExpression : public DecomposedExpression { +public: + MatchExpression( ArgT arg, MatcherT matcher, char const* matcherString ) + : m_arg( arg ), m_matcher( matcher ), m_matcherString( matcherString ) {} + + virtual bool isBinaryExpression() const CATCH_OVERRIDE { + return true; + } + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + std::string matcherAsString = m_matcher.toString(); + dest = Catch::toString( m_arg ); + dest += ' '; + if( matcherAsString == Detail::unprintableString ) + dest += m_matcherString; + else + dest += matcherAsString; + } + +private: + ArgT m_arg; + MatcherT m_matcher; + char const* m_matcherString; }; } // end namespace Catch diff --git a/3rdparty/catch/include/internal/catch_fatal_condition.hpp b/3rdparty/catch/include/internal/catch_fatal_condition.hpp index dd21d5904bd..29021a392cb 100644 --- a/3rdparty/catch/include/internal/catch_fatal_condition.hpp +++ b/3rdparty/catch/include/internal/catch_fatal_condition.hpp @@ -12,25 +12,75 @@ namespace Catch { - // Report the error condition then exit the process - inline void fatal( std::string const& message, int exitCode ) { + // Report the error condition + inline void reportFatal( std::string const& message ) { IContext& context = Catch::getCurrentContext(); IResultCapture* resultCapture = context.getResultCapture(); resultCapture->handleFatalErrorCondition( message ); - - if( Catch::alwaysTrue() ) // avoids "no return" warnings - exit( exitCode ); } } // namespace Catch #if defined ( CATCH_PLATFORM_WINDOWS ) ///////////////////////////////////////// + +#include "catch_windows_h_proxy.h" + + namespace Catch { + struct SignalDefs { DWORD id; const char* name; }; + extern SignalDefs signalDefs[]; + // There is no 1-1 mapping between signals and windows exceptions. + // Windows can easily distinguish between SO and SigSegV, + // but SigInt, SigTerm, etc are handled differently. + SignalDefs signalDefs[] = { + { EXCEPTION_ILLEGAL_INSTRUCTION, "SIGILL - Illegal instruction signal" }, + { EXCEPTION_STACK_OVERFLOW, "SIGSEGV - Stack overflow" }, + { EXCEPTION_ACCESS_VIOLATION, "SIGSEGV - Segmentation violation signal" }, + { EXCEPTION_INT_DIVIDE_BY_ZERO, "Divide by zero error" }, + }; + struct FatalConditionHandler { - void reset() {} - }; + + static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { + for (int i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { + if (ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) { + reportFatal(signalDefs[i].name); + } + } + // If its not an exception we care about, pass it along. + // This stops us from eating debugger breaks etc. + return EXCEPTION_CONTINUE_SEARCH; + } + + // 32k seems enough for Catch to handle stack overflow, + // but the value was found experimentally, so there is no strong guarantee + FatalConditionHandler():m_isSet(true), m_guaranteeSize(32 * 1024), m_exceptionHandlerHandle(CATCH_NULL) { + // Register as first handler in current chain + m_exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); + // Pass in guarantee size to be filled + SetThreadStackGuarantee(&m_guaranteeSize); + } + + void reset() { + if (m_isSet) { + // Unregister handler and restore the old guarantee + RemoveVectoredExceptionHandler(m_exceptionHandlerHandle); + SetThreadStackGuarantee(&m_guaranteeSize); + m_exceptionHandlerHandle = CATCH_NULL; + m_isSet = false; + } + } + + ~FatalConditionHandler() { + reset(); + } + private: + bool m_isSet; + ULONG m_guaranteeSize; + PVOID m_exceptionHandlerHandle; + }; } // namespace Catch @@ -40,7 +90,10 @@ namespace Catch { namespace Catch { - struct SignalDefs { int id; const char* name; }; + struct SignalDefs { + int id; + const char* name; + }; extern SignalDefs signalDefs[]; SignalDefs signalDefs[] = { { SIGINT, "SIGINT - Terminal interrupt signal" }, @@ -49,35 +102,68 @@ namespace Catch { { SIGSEGV, "SIGSEGV - Segmentation violation signal" }, { SIGTERM, "SIGTERM - Termination request signal" }, { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } - }; + }; struct FatalConditionHandler { + static bool isSet; + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)]; + static stack_t oldSigStack; + static char altStackMem[SIGSTKSZ]; + static void handleSignal( int sig ) { - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) - if( sig == signalDefs[i].id ) - fatal( signalDefs[i].name, -sig ); - fatal( "", -sig ); + std::string name = ""; + for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { + SignalDefs &def = signalDefs[i]; + if (sig == def.id) { + name = def.name; + break; + } + } + reset(); + reportFatal(name); + raise( sig ); } - FatalConditionHandler() : m_isSet( true ) { - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) - signal( signalDefs[i].id, handleSignal ); - } - ~FatalConditionHandler() { - reset(); - } - void reset() { - if( m_isSet ) { - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) - signal( signalDefs[i].id, SIG_DFL ); - m_isSet = false; + FatalConditionHandler() { + isSet = true; + stack_t sigStack; + sigStack.ss_sp = altStackMem; + sigStack.ss_size = SIGSTKSZ; + sigStack.ss_flags = 0; + sigaltstack(&sigStack, &oldSigStack); + struct sigaction sa = { 0 }; + + sa.sa_handler = handleSignal; + sa.sa_flags = SA_ONSTACK; + for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) { + sigaction(signalDefs[i].id, &sa, &oldSigActions[i]); } } - bool m_isSet; + + ~FatalConditionHandler() { + reset(); + } + static void reset() { + if( isSet ) { + // Set signals back to previous values -- hopefully nobody overwrote them in the meantime + for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) { + sigaction(signalDefs[i].id, &oldSigActions[i], CATCH_NULL); + } + // Return the old stack + sigaltstack(&oldSigStack, CATCH_NULL); + isSet = false; + } + } }; + bool FatalConditionHandler::isSet = false; + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; + char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; + + } // namespace Catch #endif // not Windows diff --git a/3rdparty/catch/include/internal/catch_interfaces_config.h b/3rdparty/catch/include/internal/catch_interfaces_config.h index 17914b4e04f..08226c88d4a 100644 --- a/3rdparty/catch/include/internal/catch_interfaces_config.h +++ b/3rdparty/catch/include/internal/catch_interfaces_config.h @@ -41,7 +41,7 @@ namespace Catch { Auto, Yes, No - }; }; + }; }; class TestSpec; @@ -62,6 +62,8 @@ namespace Catch { virtual RunTests::InWhatOrder runOrder() const = 0; virtual unsigned int rngSeed() const = 0; virtual UseColour::YesOrNo useColour() const = 0; + virtual std::vector const& getSectionsToRun() const = 0; + }; } diff --git a/3rdparty/catch/include/internal/catch_interfaces_reporter.h b/3rdparty/catch/include/internal/catch_interfaces_reporter.h index 98e2cd6a02b..3aebab986eb 100644 --- a/3rdparty/catch/include/internal/catch_interfaces_reporter.h +++ b/3rdparty/catch/include/internal/catch_interfaces_reporter.h @@ -248,7 +248,7 @@ namespace Catch virtual void testRunEnded( TestRunStats const& testRunStats ) = 0; virtual void skipTest( TestCaseInfo const& testInfo ) = 0; - + virtual MultipleReporters* tryAsMulti() { return CATCH_NULL; } }; diff --git a/3rdparty/catch/include/internal/catch_list.hpp b/3rdparty/catch/include/internal/catch_list.hpp index f83827eedc2..e09898e9c97 100644 --- a/3rdparty/catch/include/internal/catch_list.hpp +++ b/3rdparty/catch/include/internal/catch_list.hpp @@ -51,9 +51,9 @@ namespace Catch { } if( !config.testSpec().hasFilters() ) - Catch::cout() << pluralise( matchedTests, "test case" ) << "\n" << std::endl; + Catch::cout() << pluralise( matchedTests, "test case" ) << '\n' << std::endl; else - Catch::cout() << pluralise( matchedTests, "matching test case" ) << "\n" << std::endl; + Catch::cout() << pluralise( matchedTests, "matching test case" ) << '\n' << std::endl; return matchedTests; } @@ -68,8 +68,8 @@ namespace Catch { ++it ) { matchedTests++; TestCaseInfo const& testCaseInfo = it->getTestCaseInfo(); - if( startsWith( testCaseInfo.name, "#" ) ) - Catch::cout() << "\"" << testCaseInfo.name << "\"" << std::endl; + if( startsWith( testCaseInfo.name, '#' ) ) + Catch::cout() << '"' << testCaseInfo.name << '"' << std::endl; else Catch::cout() << testCaseInfo.name << std::endl; } @@ -132,9 +132,9 @@ namespace Catch { .setInitialIndent( 0 ) .setIndent( oss.str().size() ) .setWidth( CATCH_CONFIG_CONSOLE_WIDTH-10 ) ); - Catch::cout() << oss.str() << wrapper << "\n"; + Catch::cout() << oss.str() << wrapper << '\n'; } - Catch::cout() << pluralise( tagCounts.size(), "tag" ) << "\n" << std::endl; + Catch::cout() << pluralise( tagCounts.size(), "tag" ) << '\n' << std::endl; return tagCounts.size(); } @@ -153,9 +153,9 @@ namespace Catch { .setWidth( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 ) ); Catch::cout() << " " << it->first - << ":" + << ':' << std::string( maxNameLen - it->first.size() + 2, ' ' ) - << wrapper << "\n"; + << wrapper << '\n'; } Catch::cout() << std::endl; return factories.size(); diff --git a/3rdparty/catch/include/internal/catch_matchers.hpp b/3rdparty/catch/include/internal/catch_matchers.hpp index ab8fec15f6d..9146e39e9aa 100644 --- a/3rdparty/catch/include/internal/catch_matchers.hpp +++ b/3rdparty/catch/include/internal/catch_matchers.hpp @@ -184,7 +184,7 @@ namespace Matchers { { return m_caseSensitivity == CaseSensitive::No ? " (case insensitive)" - : ""; + : std::string(); } CaseSensitive::Choice m_caseSensitivity; std::string m_str; @@ -202,7 +202,7 @@ namespace Matchers { return m_data.m_str == m_data.adjustString( expr );; } virtual std::string toString() const { - return "equals: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "equals: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; @@ -219,7 +219,7 @@ namespace Matchers { return m_data.adjustString( expr ).find( m_data.m_str ) != std::string::npos; } virtual std::string toString() const { - return "contains: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "contains: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; @@ -237,7 +237,7 @@ namespace Matchers { return startsWith( m_data.adjustString( expr ), m_data.m_str ); } virtual std::string toString() const { - return "starts with: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "starts with: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; @@ -254,7 +254,7 @@ namespace Matchers { return endsWith( m_data.adjustString( expr ), m_data.m_str ); } virtual std::string toString() const { - return "ends with: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "ends with: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; diff --git a/3rdparty/catch/include/internal/catch_platform.h b/3rdparty/catch/include/internal/catch_platform.h index 0142dc14b9c..09b91bfb979 100644 --- a/3rdparty/catch/include/internal/catch_platform.h +++ b/3rdparty/catch/include/internal/catch_platform.h @@ -10,11 +10,19 @@ #define TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -#define CATCH_PLATFORM_MAC +# define CATCH_PLATFORM_MAC #elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#define CATCH_PLATFORM_IPHONE +# define CATCH_PLATFORM_IPHONE +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX #elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) -#define CATCH_PLATFORM_WINDOWS +# define CATCH_PLATFORM_WINDOWS +# if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) +# define CATCH_DEFINES_NOMINMAX +# endif +# if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) +# define CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# endif #endif #endif // TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED diff --git a/3rdparty/catch/include/internal/catch_reporter_registrars.hpp b/3rdparty/catch/include/internal/catch_reporter_registrars.hpp index 7bd7b6100e7..4d5557e17af 100644 --- a/3rdparty/catch/include/internal/catch_reporter_registrars.hpp +++ b/3rdparty/catch/include/internal/catch_reporter_registrars.hpp @@ -74,7 +74,7 @@ namespace Catch { return new T( config ); } virtual std::string getDescription() const { - return ""; + return std::string(); } }; diff --git a/3rdparty/catch/include/internal/catch_result_builder.h b/3rdparty/catch/include/internal/catch_result_builder.h index 89002660d96..dfdffd5f51f 100644 --- a/3rdparty/catch/include/internal/catch_result_builder.h +++ b/3rdparty/catch/include/internal/catch_result_builder.h @@ -19,22 +19,20 @@ namespace Catch { template class ExpressionLhs; - struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison; - struct CopyableStream { CopyableStream() {} CopyableStream( CopyableStream const& other ) { oss << other.oss.str(); } CopyableStream& operator=( CopyableStream const& other ) { - oss.str(""); + oss.str(std::string()); oss << other.oss.str(); return *this; } std::ostringstream oss; }; - class ResultBuilder { + class ResultBuilder : public DecomposedExpression { public: ResultBuilder( char const* macroName, SourceLineInfo const& lineInfo, @@ -52,19 +50,15 @@ namespace Catch { return *this; } - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( RhsT const& ); - ResultBuilder& setResultType( ResultWas::OfType result ); ResultBuilder& setResultType( bool result ); - ResultBuilder& setLhs( std::string const& lhs ); - ResultBuilder& setRhs( std::string const& rhs ); - ResultBuilder& setOp( std::string const& op ); - void endExpression(); + void endExpression( DecomposedExpression const& expr ); + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE; - std::string reconstructExpression() const; AssertionResult build() const; + AssertionResult build( DecomposedExpression const& expr ) const; void useActiveException( ResultDisposition::Flags resultDisposition = ResultDisposition::Normal ); void captureResult( ResultWas::OfType resultType ); @@ -76,14 +70,12 @@ namespace Catch { bool shouldDebugBreak() const; bool allowThrows() const; + template + void captureMatch( ArgT const& arg, MatcherT const& matcher, char const* matcherString ); + private: AssertionInfo m_assertionInfo; AssertionResultData m_data; - struct ExprComponents { - ExprComponents() : testFalse( false ) {} - bool testFalse; - std::string lhs, rhs, op; - } m_exprComponents; CopyableStream m_stream; bool m_shouldDebugBreak; @@ -106,6 +98,14 @@ namespace Catch { return ExpressionLhs( *this, value ); } + template + inline void ResultBuilder::captureMatch( ArgT const& arg, MatcherT const& matcher, + char const* matcherString ) { + MatchExpression expr( arg, matcher, matcherString ); + setResultType( matcher.match( arg ) ); + endExpression( expr ); + } + } // namespace Catch #endif // TWOBLUECUBES_CATCH_RESULT_BUILDER_H_INCLUDED diff --git a/3rdparty/catch/include/internal/catch_result_builder.hpp b/3rdparty/catch/include/internal/catch_result_builder.hpp index d453fecfb9b..7bb2cdc283a 100644 --- a/3rdparty/catch/include/internal/catch_result_builder.hpp +++ b/3rdparty/catch/include/internal/catch_result_builder.hpp @@ -41,22 +41,10 @@ namespace Catch { m_data.resultType = result ? ResultWas::Ok : ResultWas::ExpressionFailed; return *this; } - ResultBuilder& ResultBuilder::setLhs( std::string const& lhs ) { - m_exprComponents.lhs = lhs; - return *this; - } - ResultBuilder& ResultBuilder::setRhs( std::string const& rhs ) { - m_exprComponents.rhs = rhs; - return *this; - } - ResultBuilder& ResultBuilder::setOp( std::string const& op ) { - m_exprComponents.op = op; - return *this; - } - void ResultBuilder::endExpression() { - m_exprComponents.testFalse = isFalseTest( m_assertionInfo.resultDisposition ); - captureExpression(); + void ResultBuilder::endExpression( DecomposedExpression const& expr ) { + AssertionResult result = build( expr ); + handleResult( result ); } void ResultBuilder::useActiveException( ResultDisposition::Flags resultDisposition ) { @@ -69,6 +57,7 @@ namespace Catch { setResultType( resultType ); captureExpression(); } + void ResultBuilder::captureExpectedException( std::string const& expectedMessage ) { if( expectedMessage.empty() ) captureExpectedException( Matchers::Impl::Generic::AllOf() ); @@ -78,7 +67,7 @@ namespace Catch { void ResultBuilder::captureExpectedException( Matchers::Impl::Matcher const& matcher ) { - assert( m_exprComponents.testFalse == false ); + assert( !isFalseTest( m_assertionInfo.resultDisposition ) ); AssertionResultData data = m_data; data.resultType = ResultWas::Ok; data.reconstructedExpression = m_assertionInfo.capturedExpression; @@ -96,6 +85,7 @@ namespace Catch { AssertionResult result = build(); handleResult( result ); } + void ResultBuilder::handleResult( AssertionResult const& result ) { getResultCapture().assertionEnded( result ); @@ -107,6 +97,7 @@ namespace Catch { m_shouldThrow = true; } } + void ResultBuilder::react() { if( m_shouldThrow ) throw Catch::TestFailureException(); @@ -117,43 +108,32 @@ namespace Catch { AssertionResult ResultBuilder::build() const { - assert( m_data.resultType != ResultWas::Unknown ); + return build( *this ); + } + // CAVEAT: The returned AssertionResult stores a pointer to the argument expr, + // a temporary DecomposedExpression, which in turn holds references to + // operands, possibly temporary as well. + // It should immediately be passed to handleResult; if the expression + // needs to be reported, its string expansion must be composed before + // the temporaries are destroyed. + AssertionResult ResultBuilder::build( DecomposedExpression const& expr ) const + { + assert( m_data.resultType != ResultWas::Unknown ); AssertionResultData data = m_data; - // Flip bool results if testFalse is set - if( m_exprComponents.testFalse ) { - if( data.resultType == ResultWas::Ok ) - data.resultType = ResultWas::ExpressionFailed; - else if( data.resultType == ResultWas::ExpressionFailed ) - data.resultType = ResultWas::Ok; + // Flip bool results if FalseTest flag is set + if( isFalseTest( m_assertionInfo.resultDisposition ) ) { + data.negate( expr.isBinaryExpression() ); } data.message = m_stream.oss.str(); - data.reconstructedExpression = reconstructExpression(); - if( m_exprComponents.testFalse ) { - if( m_exprComponents.op == "" ) - data.reconstructedExpression = "!" + data.reconstructedExpression; - else - data.reconstructedExpression = "!(" + data.reconstructedExpression + ")"; - } + data.decomposedExpression = &expr; // for lazy reconstruction return AssertionResult( m_assertionInfo, data ); } - std::string ResultBuilder::reconstructExpression() const { - if( m_exprComponents.op == "" ) - return m_exprComponents.lhs.empty() ? m_assertionInfo.capturedExpression : m_exprComponents.op + m_exprComponents.lhs; - else if( m_exprComponents.op == "matches" ) - return m_exprComponents.lhs + " " + m_exprComponents.rhs; - else if( m_exprComponents.op != "!" ) { - if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 40 && - m_exprComponents.lhs.find("\n") == std::string::npos && - m_exprComponents.rhs.find("\n") == std::string::npos ) - return m_exprComponents.lhs + " " + m_exprComponents.op + " " + m_exprComponents.rhs; - else - return m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs; - } - else - return "{can't expand - use " + m_assertionInfo.macroName + "_FALSE( " + m_assertionInfo.capturedExpression.substr(1) + " ) instead of " + m_assertionInfo.macroName + "( " + m_assertionInfo.capturedExpression + " ) for better diagnostics}"; + + void ResultBuilder::reconstructExpression( std::string& dest ) const { + dest = m_assertionInfo.capturedExpression; } } // end namespace Catch diff --git a/3rdparty/catch/include/internal/catch_run_context.hpp b/3rdparty/catch/include/internal/catch_run_context.hpp index d37bdba1dda..bf2bdb7d499 100644 --- a/3rdparty/catch/include/internal/catch_run_context.hpp +++ b/3rdparty/catch/include/internal/catch_run_context.hpp @@ -97,10 +97,11 @@ namespace Catch { do { - m_trackerContext.startRun(); + ITracker& rootTracker = m_trackerContext.startRun(); + dynamic_cast( rootTracker ).addInitialFilters( m_config->getSectionsToRun() ); do { m_trackerContext.startCycle(); - m_testCaseTracker = &SectionTracker::acquire( m_trackerContext, testInfo.name ); + m_testCaseTracker = &SectionTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( testInfo.name, testInfo.lineInfo ) ); runCurrentTest( redirectedCout, redirectedCerr ); } while( !m_testCaseTracker->isSuccessfullyCompleted() && !aborting() ); @@ -146,7 +147,7 @@ namespace Catch { m_messages.clear(); // Reset working state - m_lastAssertionInfo = AssertionInfo( "", m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition ); + m_lastAssertionInfo = AssertionInfo( std::string(), m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition ); m_lastResult = result; } @@ -155,10 +156,7 @@ namespace Catch { Counts& assertions ) { - std::ostringstream oss; - oss << sectionInfo.name << "@" << sectionInfo.lineInfo; - - ITracker& sectionTracker = SectionTracker::acquire( m_trackerContext, oss.str() ); + ITracker& sectionTracker = SectionTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( sectionInfo.name, sectionInfo.lineInfo ) ); if( !sectionTracker.isOpen() ) return false; m_activeSections.push_back( §ionTracker ); @@ -217,7 +215,7 @@ namespace Catch { virtual std::string getCurrentTestName() const { return m_activeTestCase ? m_activeTestCase->getTestCaseInfo().name - : ""; + : std::string(); } virtual const AssertionResult* getLastResult() const { @@ -247,11 +245,11 @@ namespace Catch { deltaTotals.testCases.failed = 1; m_reporter->testCaseEnded( TestCaseStats( testInfo, deltaTotals, - "", - "", + std::string(), + std::string(), false ) ); m_totals.testCases.failed++; - testGroupEnded( "", m_totals, 1, 1 ); + testGroupEnded( std::string(), m_totals, 1, 1 ); m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, false ) ); } @@ -270,7 +268,7 @@ namespace Catch { Counts prevAssertions = m_totals.assertions; double duration = 0; try { - m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, "", ResultDisposition::Normal ); + m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, std::string(), ResultDisposition::Normal ); seedRng( *m_config ); diff --git a/3rdparty/catch/include/internal/catch_stream.h b/3rdparty/catch/include/internal/catch_stream.h index 1bf5ee183f8..d8deebab4dd 100644 --- a/3rdparty/catch/include/internal/catch_stream.h +++ b/3rdparty/catch/include/internal/catch_stream.h @@ -15,6 +15,7 @@ #include #include #include +#include namespace Catch { diff --git a/3rdparty/catch/include/internal/catch_stream.hpp b/3rdparty/catch/include/internal/catch_stream.hpp index 2703df5dfe2..42f51e82806 100644 --- a/3rdparty/catch/include/internal/catch_stream.hpp +++ b/3rdparty/catch/include/internal/catch_stream.hpp @@ -61,7 +61,7 @@ namespace Catch { m_ofs.open( filename.c_str() ); if( m_ofs.fail() ) { std::ostringstream oss; - oss << "Unable to open file: '" << filename << "'"; + oss << "Unable to open file: '" << filename << '\''; throw std::domain_error( oss.str() ); } } diff --git a/3rdparty/catch/include/internal/catch_tag_alias_registry.hpp b/3rdparty/catch/include/internal/catch_tag_alias_registry.hpp index e5ad11b2340..a1fa56b97b9 100644 --- a/3rdparty/catch/include/internal/catch_tag_alias_registry.hpp +++ b/3rdparty/catch/include/internal/catch_tag_alias_registry.hpp @@ -43,7 +43,7 @@ namespace Catch { void TagAliasRegistry::add( char const* alias, char const* tag, SourceLineInfo const& lineInfo ) { - if( !startsWith( alias, "[@" ) || !endsWith( alias, "]" ) ) { + if( !startsWith( alias, "[@" ) || !endsWith( alias, ']' ) ) { std::ostringstream oss; oss << "error: tag alias, \"" << alias << "\" is not of the form [@alias name].\n" << lineInfo; throw std::domain_error( oss.str().c_str() ); @@ -51,7 +51,7 @@ namespace Catch { if( !m_registry.insert( std::make_pair( alias, TagAlias( tag, lineInfo ) ) ).second ) { std::ostringstream oss; oss << "error: tag alias, \"" << alias << "\" already registered.\n" - << "\tFirst seen at " << find(alias)->lineInfo << "\n" + << "\tFirst seen at " << find(alias)->lineInfo << '\n' << "\tRedefined at " << lineInfo; throw std::domain_error( oss.str().c_str() ); } diff --git a/3rdparty/catch/include/internal/catch_test_case_info.h b/3rdparty/catch/include/internal/catch_test_case_info.h index 6ab1f375b6c..b821abd3c38 100644 --- a/3rdparty/catch/include/internal/catch_test_case_info.h +++ b/3rdparty/catch/include/internal/catch_test_case_info.h @@ -29,7 +29,8 @@ namespace Catch { IsHidden = 1 << 1, ShouldFail = 1 << 2, MayFail = 1 << 3, - Throws = 1 << 4 + Throws = 1 << 4, + NonPortable = 1 << 5 }; TestCaseInfo( std::string const& _name, diff --git a/3rdparty/catch/include/internal/catch_test_case_info.hpp b/3rdparty/catch/include/internal/catch_test_case_info.hpp index 90f53411104..3847cc936ec 100644 --- a/3rdparty/catch/include/internal/catch_test_case_info.hpp +++ b/3rdparty/catch/include/internal/catch_test_case_info.hpp @@ -16,7 +16,7 @@ namespace Catch { inline TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) { - if( startsWith( tag, "." ) || + if( startsWith( tag, '.' ) || tag == "hide" || tag == "!hide" ) return TestCaseInfo::IsHidden; @@ -26,6 +26,8 @@ namespace Catch { return TestCaseInfo::ShouldFail; else if( tag == "!mayfail" ) return TestCaseInfo::MayFail; + else if( tag == "!nonportable" ) + return TestCaseInfo::NonPortable; else return TestCaseInfo::None; } @@ -100,7 +102,7 @@ namespace Catch { std::ostringstream oss; for( std::set::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it ) { - oss << "[" << *it << "]"; + oss << '[' << *it << ']'; std::string lcaseTag = toLower( *it ); testCaseInfo.properties = static_cast( testCaseInfo.properties | parseSpecialTag( lcaseTag ) ); testCaseInfo.lcaseTags.insert( lcaseTag ); diff --git a/3rdparty/catch/include/internal/catch_test_case_registry_impl.hpp b/3rdparty/catch/include/internal/catch_test_case_registry_impl.hpp index a70b019b9f6..0565b54a12d 100644 --- a/3rdparty/catch/include/internal/catch_test_case_registry_impl.hpp +++ b/3rdparty/catch/include/internal/catch_test_case_registry_impl.hpp @@ -19,9 +19,6 @@ #include #include -#ifdef CATCH_CPP14_OR_GREATER -#include -#endif namespace Catch { @@ -30,7 +27,7 @@ namespace Catch { result_type operator()( result_type n ) const { return std::rand() % n; } -#ifdef CATCH_CPP14_OR_GREATER +#ifdef CATCH_CONFIG_CPP11_SHUFFLE static constexpr result_type min() { return 0; } static constexpr result_type max() { return 1000000; } result_type operator()() const { return std::rand() % max(); } @@ -38,7 +35,7 @@ namespace Catch { template static void shuffle( V& vector ) { RandomNumberGenerator rng; -#ifdef CATCH_CPP14_OR_GREATER +#ifdef CATCH_CONFIG_CPP11_SHUFFLE std::shuffle( vector.begin(), vector.end(), rng ); #else std::random_shuffle( vector.begin(), vector.end(), rng ); @@ -81,7 +78,7 @@ namespace Catch { ss << Colour( Colour::Red ) << "error: TEST_CASE( \"" << it->name << "\" ) already defined.\n" - << "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << "\n" + << "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << '\n' << "\tRedefined at " << it->getTestCaseInfo().lineInfo << std::endl; throw std::runtime_error(ss.str()); @@ -113,7 +110,7 @@ namespace Catch { virtual void registerTest( TestCase const& testCase ) { std::string name = testCase.getTestCaseInfo().name; - if( name == "" ) { + if( name.empty() ) { std::ostringstream oss; oss << "Anonymous test case " << ++m_unnamedCount; return registerTest( testCase.withName( oss.str() ) ); @@ -162,7 +159,7 @@ namespace Catch { inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) { std::string className = classOrQualifiedMethodName; - if( startsWith( className, "&" ) ) + if( startsWith( className, '&' ) ) { std::size_t lastColons = className.rfind( "::" ); std::size_t penultimateColons = className.rfind( "::", lastColons-1 ); diff --git a/3rdparty/catch/include/internal/catch_test_case_tracker.hpp b/3rdparty/catch/include/internal/catch_test_case_tracker.hpp index 3973e7b9614..5a866336541 100644 --- a/3rdparty/catch/include/internal/catch_test_case_tracker.hpp +++ b/3rdparty/catch/include/internal/catch_test_case_tracker.hpp @@ -15,15 +15,26 @@ #include #include #include +#include namespace Catch { namespace TestCaseTracking { + struct NameAndLocation { + std::string name; + SourceLineInfo location; + + NameAndLocation( std::string const& _name, SourceLineInfo const& _location ) + : name( _name ), + location( _location ) + {} + }; + struct ITracker : SharedImpl<> { virtual ~ITracker(); // static queries - virtual std::string name() const = 0; + virtual NameAndLocation const& nameAndLocation() const = 0; // dynamic queries virtual bool isComplete() const = 0; // Successfully completed or failed @@ -39,15 +50,15 @@ namespace TestCaseTracking { virtual void markAsNeedingAnotherRun() = 0; virtual void addChild( Ptr const& child ) = 0; - virtual ITracker* findChild( std::string const& name ) = 0; + virtual ITracker* findChild( NameAndLocation const& nameAndLocation ) = 0; virtual void openChild() = 0; - + // Debug/ checking virtual bool isSectionTracker() const = 0; virtual bool isIndexTracker() const = 0; }; - class TrackerContext { + class TrackerContext { enum RunState { NotStarted, @@ -110,30 +121,32 @@ namespace TestCaseTracking { Failed }; class TrackerHasName { - std::string m_name; + NameAndLocation m_nameAndLocation; public: - TrackerHasName( std::string const& name ) : m_name( name ) {} + TrackerHasName( NameAndLocation const& nameAndLocation ) : m_nameAndLocation( nameAndLocation ) {} bool operator ()( Ptr const& tracker ) { - return tracker->name() == m_name; + return + tracker->nameAndLocation().name == m_nameAndLocation.name && + tracker->nameAndLocation().location == m_nameAndLocation.location; } }; typedef std::vector > Children; - std::string m_name; + NameAndLocation m_nameAndLocation; TrackerContext& m_ctx; ITracker* m_parent; Children m_children; CycleState m_runState; public: - TrackerBase( std::string const& name, TrackerContext& ctx, ITracker* parent ) - : m_name( name ), + TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : m_nameAndLocation( nameAndLocation ), m_ctx( ctx ), m_parent( parent ), m_runState( NotStarted ) {} virtual ~TrackerBase(); - virtual std::string name() const CATCH_OVERRIDE { - return m_name; + virtual NameAndLocation const& nameAndLocation() const CATCH_OVERRIDE { + return m_nameAndLocation; } virtual bool isComplete() const CATCH_OVERRIDE { return m_runState == CompletedSuccessfully || m_runState == Failed; @@ -153,8 +166,8 @@ namespace TestCaseTracking { m_children.push_back( child ); } - virtual ITracker* findChild( std::string const& name ) CATCH_OVERRIDE { - Children::const_iterator it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( name ) ); + virtual ITracker* findChild( NameAndLocation const& nameAndLocation ) CATCH_OVERRIDE { + Children::const_iterator it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( nameAndLocation ) ); return( it != m_children.end() ) ? it->get() : CATCH_NULL; @@ -174,7 +187,7 @@ namespace TestCaseTracking { virtual bool isSectionTracker() const CATCH_OVERRIDE { return false; } virtual bool isIndexTracker() const CATCH_OVERRIDE { return false; } - + void open() { m_runState = Executing; moveToThis(); @@ -232,59 +245,83 @@ namespace TestCaseTracking { }; class SectionTracker : public TrackerBase { + std::vector m_filters; public: - SectionTracker( std::string const& name, TrackerContext& ctx, ITracker* parent ) - : TrackerBase( name, ctx, parent ) - {} + SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : TrackerBase( nameAndLocation, ctx, parent ) + { + if( parent ) { + while( !parent->isSectionTracker() ) + parent = &parent->parent(); + + SectionTracker& parentSection = static_cast( *parent ); + addNextFilters( parentSection.m_filters ); + } + } virtual ~SectionTracker(); virtual bool isSectionTracker() const CATCH_OVERRIDE { return true; } - - static SectionTracker& acquire( TrackerContext& ctx, std::string const& name ) { + + static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) { SectionTracker* section = CATCH_NULL; ITracker& currentTracker = ctx.currentTracker(); - if( ITracker* childTracker = currentTracker.findChild( name ) ) { + if( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isSectionTracker() ); section = static_cast( childTracker ); } else { - section = new SectionTracker( name, ctx, ¤tTracker ); + section = new SectionTracker( nameAndLocation, ctx, ¤tTracker ); currentTracker.addChild( section ); } - if( !ctx.completedCycle() && !section->isComplete() ) { - - section->open(); - } + if( !ctx.completedCycle() ) + section->tryOpen(); return *section; } + + void tryOpen() { + if( !isComplete() && (m_filters.empty() || m_filters[0].empty() || m_filters[0] == m_nameAndLocation.name ) ) + open(); + } + + void addInitialFilters( std::vector const& filters ) { + if( !filters.empty() ) { + m_filters.push_back(""); // Root - should never be consulted + m_filters.push_back(""); // Test Case - not a section filter + std::copy( filters.begin(), filters.end(), std::back_inserter( m_filters ) ); + } + } + void addNextFilters( std::vector const& filters ) { + if( filters.size() > 1 ) + std::copy( filters.begin()+1, filters.end(), std::back_inserter( m_filters ) ); + } }; class IndexTracker : public TrackerBase { int m_size; int m_index; public: - IndexTracker( std::string const& name, TrackerContext& ctx, ITracker* parent, int size ) - : TrackerBase( name, ctx, parent ), + IndexTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent, int size ) + : TrackerBase( nameAndLocation, ctx, parent ), m_size( size ), m_index( -1 ) {} virtual ~IndexTracker(); virtual bool isIndexTracker() const CATCH_OVERRIDE { return true; } - - static IndexTracker& acquire( TrackerContext& ctx, std::string const& name, int size ) { + + static IndexTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation, int size ) { IndexTracker* tracker = CATCH_NULL; ITracker& currentTracker = ctx.currentTracker(); - if( ITracker* childTracker = currentTracker.findChild( name ) ) { + if( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isIndexTracker() ); tracker = static_cast( childTracker ); } else { - tracker = new IndexTracker( name, ctx, ¤tTracker, size ); + tracker = new IndexTracker( nameAndLocation, ctx, ¤tTracker, size ); currentTracker.addChild( tracker ); } @@ -312,7 +349,7 @@ namespace TestCaseTracking { }; inline ITracker& TrackerContext::startRun() { - m_rootTracker = new SectionTracker( "{root}", *this, CATCH_NULL ); + m_rootTracker = new SectionTracker( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, CATCH_NULL ); m_currentTracker = CATCH_NULL; m_runState = Executing; return *m_rootTracker; diff --git a/3rdparty/catch/include/internal/catch_test_spec_parser.hpp b/3rdparty/catch/include/internal/catch_test_spec_parser.hpp index 3f794c6b97d..0c328365af4 100644 --- a/3rdparty/catch/include/internal/catch_test_spec_parser.hpp +++ b/3rdparty/catch/include/internal/catch_test_spec_parser.hpp @@ -19,11 +19,12 @@ namespace Catch { class TestSpecParser { - enum Mode{ None, Name, QuotedName, Tag }; + enum Mode{ None, Name, QuotedName, Tag, EscapedName }; Mode m_mode; bool m_exclusion; std::size_t m_start, m_pos; std::string m_arg; + std::vector m_escapeChars; TestSpec::Filter m_currentFilter; TestSpec m_testSpec; ITagAliasRegistry const* m_tagAliases; @@ -36,6 +37,7 @@ namespace Catch { m_exclusion = false; m_start = std::string::npos; m_arg = m_tagAliases->expandAliases( arg ); + m_escapeChars.clear(); for( m_pos = 0; m_pos < m_arg.size(); ++m_pos ) visitChar( m_arg[m_pos] ); if( m_mode == Name ) @@ -54,6 +56,7 @@ namespace Catch { case '~': m_exclusion = true; return; case '[': return startNewMode( Tag, ++m_pos ); case '"': return startNewMode( QuotedName, ++m_pos ); + case '\\': return escape(); default: startNewMode( Name, m_pos ); break; } } @@ -69,7 +72,11 @@ namespace Catch { addPattern(); startNewMode( Tag, ++m_pos ); } + else if( c == '\\' ) + escape(); } + else if( m_mode == EscapedName ) + m_mode = Name; else if( m_mode == QuotedName && c == '"' ) addPattern(); else if( m_mode == Tag && c == ']' ) @@ -79,10 +86,19 @@ namespace Catch { m_mode = mode; m_start = start; } + void escape() { + if( m_mode == None ) + m_start = m_pos; + m_mode = EscapedName; + m_escapeChars.push_back( m_pos ); + } std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); } template void addPattern() { std::string token = subString(); + for( size_t i = 0; i < m_escapeChars.size(); ++i ) + token = token.substr( 0, m_escapeChars[i]-i ) + token.substr( m_escapeChars[i]+1-i ); + m_escapeChars.clear(); if( startsWith( token, "exclude:" ) ) { m_exclusion = true; token = token.substr( 8 ); diff --git a/3rdparty/catch/include/internal/catch_timer.hpp b/3rdparty/catch/include/internal/catch_timer.hpp index 2ba709e36dd..00adfc3bf0f 100644 --- a/3rdparty/catch/include/internal/catch_timer.hpp +++ b/3rdparty/catch/include/internal/catch_timer.hpp @@ -15,7 +15,7 @@ #endif #ifdef CATCH_PLATFORM_WINDOWS -#include +#include "catch_windows_h_proxy.h" #else #include #endif diff --git a/3rdparty/catch/include/internal/catch_tostring.hpp b/3rdparty/catch/include/internal/catch_tostring.hpp index 0a20ee2de2b..e61191b9d2d 100644 --- a/3rdparty/catch/include/internal/catch_tostring.hpp +++ b/3rdparty/catch/include/internal/catch_tostring.hpp @@ -69,7 +69,7 @@ std::string toString( std::string const& value ) { } } } - return "\"" + s + "\""; + return '"' + s + '"'; } std::string toString( std::wstring const& value ) { @@ -90,19 +90,19 @@ std::string toString( char* const value ) { std::string toString( const wchar_t* const value ) { - return value ? Catch::toString( std::wstring(value) ) : std::string( "{null string}" ); + return value ? Catch::toString( std::wstring(value) ) : std::string( "{null string}" ); } std::string toString( wchar_t* const value ) { - return Catch::toString( static_cast( value ) ); + return Catch::toString( static_cast( value ) ); } std::string toString( int value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } @@ -110,7 +110,7 @@ std::string toString( unsigned long value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } @@ -138,7 +138,7 @@ std::string toString( const double value ) { return fpToString( value, 10 ); } std::string toString( const float value ) { - return fpToString( value, 5 ) + "f"; + return fpToString( value, 5 ) + 'f'; } std::string toString( bool value ) { @@ -146,9 +146,19 @@ std::string toString( bool value ) { } std::string toString( char value ) { - return value < ' ' - ? toString( static_cast( value ) ) - : Detail::makeString( value ); + if ( value == '\r' ) + return "'\\r'"; + if ( value == '\f' ) + return "'\\f'"; + if ( value == '\n' ) + return "'\\n'"; + if ( value == '\t' ) + return "'\\t'"; + if ( '\0' <= value && value < ' ' ) + return toString( static_cast( value ) ); + char chstr[] = "' '"; + chstr[1] = value; + return chstr; } std::string toString( signed char value ) { @@ -164,14 +174,14 @@ std::string toString( long long value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } std::string toString( unsigned long long value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } #endif diff --git a/3rdparty/catch/include/internal/catch_version.hpp b/3rdparty/catch/include/internal/catch_version.hpp index cca4c6e0816..279facf551b 100644 --- a/3rdparty/catch/include/internal/catch_version.hpp +++ b/3rdparty/catch/include/internal/catch_version.hpp @@ -26,18 +26,18 @@ namespace Catch { {} std::ostream& operator << ( std::ostream& os, Version const& version ) { - os << version.majorVersion << "." - << version.minorVersion << "." + os << version.majorVersion << '.' + << version.minorVersion << '.' << version.patchNumber; if( !version.branchName.empty() ) { - os << "-" << version.branchName - << "." << version.buildNumber; + os << '-' << version.branchName + << '.' << version.buildNumber; } return os; } - Version libraryVersion( 1, 5, 8, "", 0 ); + Version libraryVersion( 1, 7, 0, "", 0 ); } diff --git a/3rdparty/catch/include/internal/catch_wildcard_pattern.hpp b/3rdparty/catch/include/internal/catch_wildcard_pattern.hpp index cd8b07e1921..6ce66a4d189 100644 --- a/3rdparty/catch/include/internal/catch_wildcard_pattern.hpp +++ b/3rdparty/catch/include/internal/catch_wildcard_pattern.hpp @@ -27,11 +27,11 @@ namespace Catch m_wildcard( NoWildcard ), m_pattern( adjustCase( pattern ) ) { - if( startsWith( m_pattern, "*" ) ) { + if( startsWith( m_pattern, '*' ) ) { m_pattern = m_pattern.substr( 1 ); m_wildcard = WildcardAtStart; } - if( endsWith( m_pattern, "*" ) ) { + if( endsWith( m_pattern, '*' ) ) { m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); m_wildcard = static_cast( m_wildcard | WildcardAtEnd ); } diff --git a/3rdparty/catch/include/internal/catch_windows_h_proxy.h b/3rdparty/catch/include/internal/catch_windows_h_proxy.h new file mode 100644 index 00000000000..4f059b4a106 --- /dev/null +++ b/3rdparty/catch/include/internal/catch_windows_h_proxy.h @@ -0,0 +1,32 @@ +/* + * Created by Martin on 16/01/2017. + * + * 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_WINDOWS_H_PROXY_H_INCLUDED +#define TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED + +#ifdef CATCH_DEFINES_NOMINMAX +# define NOMINMAX +#endif +#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif + +#ifdef __AFXDLL +#include +#else +#include +#endif + +#ifdef CATCH_DEFINES_NOMINMAX +# undef NOMINMAX +#endif +#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# undef WIN32_LEAN_AND_MEAN +#endif + + +#endif // TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED diff --git a/3rdparty/catch/include/internal/catch_xmlwriter.hpp b/3rdparty/catch/include/internal/catch_xmlwriter.hpp index 97890d2f830..e5fe1775eab 100644 --- a/3rdparty/catch/include/internal/catch_xmlwriter.hpp +++ b/3rdparty/catch/include/internal/catch_xmlwriter.hpp @@ -57,7 +57,7 @@ namespace Catch { default: // Escape control chars - based on contribution by @espenalb in PR #465 and // by @mrpi PR #588 - if ( ( c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) + if ( ( c >= 0 && c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) os << "&#x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) << static_cast( c ) << ';'; else os << c; @@ -136,7 +136,7 @@ namespace Catch { XmlWriter& startElement( std::string const& name ) { ensureTagClosed(); newlineIfNecessary(); - stream() << m_indent << "<" << name; + stream() << m_indent << '<' << name; m_tags.push_back( name ); m_indent += " "; m_tagIsOpen = true; @@ -165,12 +165,12 @@ namespace Catch { XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ) { if( !name.empty() && !attribute.empty() ) - stream() << " " << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << "\""; + stream() << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; return *this; } XmlWriter& writeAttribute( std::string const& name, bool attribute ) { - stream() << " " << name << "=\"" << ( attribute ? "true" : "false" ) << "\""; + stream() << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; return *this; } @@ -202,7 +202,7 @@ namespace Catch { XmlWriter& writeBlankLine() { ensureTagClosed(); - stream() << "\n"; + stream() << '\n'; return *this; } @@ -227,7 +227,7 @@ namespace Catch { void newlineIfNecessary() { if( m_needsNewline ) { - stream() << "\n"; + stream() << '\n'; m_needsNewline = false; } } diff --git a/3rdparty/catch/include/reporters/catch_reporter_bases.hpp b/3rdparty/catch/include/reporters/catch_reporter_bases.hpp index cfc28f29d55..1469a9e18c6 100644 --- a/3rdparty/catch/include/reporters/catch_reporter_bases.hpp +++ b/3rdparty/catch/include/reporters/catch_reporter_bases.hpp @@ -108,12 +108,12 @@ namespace Catch { struct BySectionInfo { BySectionInfo( SectionInfo const& other ) : m_other( other ) {} - BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} + BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} bool operator() ( Ptr const& node ) const { return node->stats.sectionInfo.lineInfo == m_other.lineInfo; } private: - void operator=( BySectionInfo const& ); + void operator=( BySectionInfo const& ); SectionInfo const& m_other; }; @@ -170,6 +170,12 @@ namespace Catch { assert( !m_sectionStack.empty() ); SectionNode& sectionNode = *m_sectionStack.back(); sectionNode.assertions.push_back( assertionStats ); + // AssertionResult holds a pointer to a temporary DecomposedExpression, + // which getExpandedExpression() calls to build the expression string. + // Our section stack copy of the assertionResult will likely outlive the + // temporary, so it must be expanded or discarded now to avoid calling + // a destroyed object later. + prepareExpandedExpression( sectionNode.assertions.back().assertionResult ); return true; } virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE { @@ -204,6 +210,13 @@ namespace Catch { virtual void skipTest( TestCaseInfo const& ) CATCH_OVERRIDE {} + virtual void prepareExpandedExpression( AssertionResult& result ) const { + if( result.isOk() ) + result.discardDecomposedExpression(); + else + result.expandDecomposedExpression(); + } + Ptr m_config; std::ostream& stream; std::vector m_assertions; diff --git a/3rdparty/catch/include/reporters/catch_reporter_compact.hpp b/3rdparty/catch/include/reporters/catch_reporter_compact.hpp index a5a17297211..66db9078abe 100644 --- a/3rdparty/catch/include/reporters/catch_reporter_compact.hpp +++ b/3rdparty/catch/include/reporters/catch_reporter_compact.hpp @@ -34,7 +34,7 @@ namespace Catch { } virtual void noMatchingTestCases( std::string const& spec ) { - stream << "No test cases matched '" << spec << "'" << std::endl; + stream << "No test cases matched '" << spec << '\'' << std::endl; } virtual void assertionStarting( AssertionInfo const& ) { @@ -61,7 +61,7 @@ namespace Catch { virtual void testRunEnded( TestRunStats const& _testRunStats ) { printTotals( _testRunStats.totals ); - stream << "\n" << std::endl; + stream << '\n' << std::endl; StreamingReporterBase::testRunEnded( _testRunStats ); } @@ -161,26 +161,26 @@ namespace Catch { void printSourceInfo() const { Colour colourGuard( Colour::FileName ); - stream << result.getSourceInfo() << ":"; + stream << result.getSourceInfo() << ':'; } void printResultType( Colour::Code colour, std::string passOrFail ) const { if( !passOrFail.empty() ) { { Colour colourGuard( colour ); - stream << " " << passOrFail; + stream << ' ' << passOrFail; } - stream << ":"; + stream << ':'; } } void printIssue( std::string issue ) const { - stream << " " << issue; + stream << ' ' << issue; } void printExpressionWas() { if( result.hasExpression() ) { - stream << ";"; + stream << ';'; { Colour colour( dimColour() ); stream << " expression was:"; @@ -191,7 +191,7 @@ namespace Catch { void printOriginalExpression() const { if( result.hasExpression() ) { - stream << " " << result.getExpression(); + stream << ' ' << result.getExpression(); } } @@ -207,7 +207,7 @@ namespace Catch { void printMessage() { if ( itMessage != messages.end() ) { - stream << " '" << itMessage->message << "'"; + stream << " '" << itMessage->message << '\''; ++itMessage; } } @@ -222,13 +222,13 @@ namespace Catch { { Colour colourGuard( colour ); - stream << " with " << pluralise( N, "message" ) << ":"; + stream << " with " << pluralise( N, "message" ) << ':'; } for(; itMessage != itEnd; ) { // If this assertion is a warning ignore any INFO messages if( printInfoMessages || itMessage->type != ResultWas::Info ) { - stream << " '" << itMessage->message << "'"; + stream << " '" << itMessage->message << '\''; if ( ++itMessage != itEnd ) { Colour colourGuard( dimColour() ); stream << " and"; @@ -254,7 +254,7 @@ namespace Catch { // - green: Passed [both/all] N tests cases with M assertions. std::string bothOrAll( std::size_t count ) const { - return count == 1 ? "" : count == 2 ? "both " : "all " ; + return count == 1 ? std::string() : count == 2 ? "both " : "all " ; } void printTotals( const Totals& totals ) const { @@ -265,12 +265,12 @@ namespace Catch { Colour colour( Colour::ResultError ); const std::string qualify_assertions_failed = totals.assertions.failed == totals.assertions.total() ? - bothOrAll( totals.assertions.failed ) : ""; + bothOrAll( totals.assertions.failed ) : std::string(); stream << "Failed " << bothOrAll( totals.testCases.failed ) << pluralise( totals.testCases.failed, "test case" ) << ", " "failed " << qualify_assertions_failed << - pluralise( totals.assertions.failed, "assertion" ) << "."; + pluralise( totals.assertions.failed, "assertion" ) << '.'; } else if( totals.assertions.total() == 0 ) { stream << @@ -282,14 +282,14 @@ namespace Catch { Colour colour( Colour::ResultError ); stream << "Failed " << pluralise( totals.testCases.failed, "test case" ) << ", " - "failed " << pluralise( totals.assertions.failed, "assertion" ) << "."; + "failed " << pluralise( totals.assertions.failed, "assertion" ) << '.'; } else { Colour colour( Colour::ResultSuccess ); stream << "Passed " << bothOrAll( totals.testCases.passed ) << pluralise( totals.testCases.passed, "test case" ) << - " with " << pluralise( totals.assertions.passed, "assertion" ) << "."; + " with " << pluralise( totals.assertions.passed, "assertion" ) << '.'; } } }; diff --git a/3rdparty/catch/include/reporters/catch_reporter_console.hpp b/3rdparty/catch/include/reporters/catch_reporter_console.hpp index 5564d88514b..9303fb2e7ec 100644 --- a/3rdparty/catch/include/reporters/catch_reporter_console.hpp +++ b/3rdparty/catch/include/reporters/catch_reporter_console.hpp @@ -27,7 +27,7 @@ namespace Catch { } virtual void noMatchingTestCases( std::string const& spec ) CATCH_OVERRIDE { - stream << "No test cases matched '" << spec << "'" << std::endl; + stream << "No test cases matched '" << spec << '\'' << std::endl; } virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE { @@ -69,12 +69,12 @@ namespace Catch { } if( m_headerPrinted ) { if( m_config->showDurations() == ShowDurations::Always ) - stream << "Completed in " << _sectionStats.durationInSeconds << "s" << std::endl; + stream << "Completed in " << _sectionStats.durationInSeconds << 's' << std::endl; m_headerPrinted = false; } else { if( m_config->showDurations() == ShowDurations::Always ) - stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << "s" << std::endl; + stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << 's' << std::endl; } StreamingReporterBase::sectionEnded( _sectionStats ); } @@ -88,7 +88,7 @@ namespace Catch { printSummaryDivider(); stream << "Summary for group '" << _testGroupStats.groupInfo.name << "':\n"; printTotals( _testGroupStats.totals ); - stream << "\n" << std::endl; + stream << '\n' << std::endl; } StreamingReporterBase::testGroupEnded( _testGroupStats ); } @@ -180,13 +180,13 @@ namespace Catch { printSourceInfo(); if( stats.totals.assertions.total() > 0 ) { if( result.isOk() ) - stream << "\n"; + stream << '\n'; printResultType(); printOriginalExpression(); printReconstructedExpression(); } else { - stream << "\n"; + stream << '\n'; } printMessage(); } @@ -203,25 +203,25 @@ namespace Catch { Colour colourGuard( Colour::OriginalExpression ); stream << " "; stream << result.getExpressionInMacro(); - stream << "\n"; + stream << '\n'; } } void printReconstructedExpression() const { if( result.hasExpandedExpression() ) { stream << "with expansion:\n"; Colour colourGuard( Colour::ReconstructedExpression ); - stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << "\n"; + stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << '\n'; } } void printMessage() const { if( !messageLabel.empty() ) - stream << messageLabel << ":" << "\n"; + stream << messageLabel << ':' << '\n'; for( std::vector::const_iterator it = messages.begin(), itEnd = messages.end(); it != itEnd; ++it ) { // If this assertion is a warning ignore any INFO messages if( printInfoMessages || it->type != ResultWas::Info ) - stream << Text( it->message, TextAttributes().setIndent(2) ) << "\n"; + stream << Text( it->message, TextAttributes().setIndent(2) ) << '\n'; } } void printSourceInfo() const { @@ -253,7 +253,7 @@ namespace Catch { } } void lazyPrintRunInfo() { - stream << "\n" << getLineOfChars<'~'>() << "\n"; + stream << '\n' << getLineOfChars<'~'>() << '\n'; Colour colour( Colour::SecondaryText ); stream << currentTestRunInfo->name << " is a Catch v" << libraryVersion << " host application.\n" @@ -287,19 +287,19 @@ namespace Catch { SourceLineInfo lineInfo = m_sectionStack.front().lineInfo; if( !lineInfo.empty() ){ - stream << getLineOfChars<'-'>() << "\n"; + stream << getLineOfChars<'-'>() << '\n'; Colour colourGuard( Colour::FileName ); - stream << lineInfo << "\n"; + stream << lineInfo << '\n'; } - stream << getLineOfChars<'.'>() << "\n" << std::endl; + stream << getLineOfChars<'.'>() << '\n' << std::endl; } void printClosedHeader( std::string const& _name ) { printOpenHeader( _name ); - stream << getLineOfChars<'.'>() << "\n"; + stream << getLineOfChars<'.'>() << '\n'; } void printOpenHeader( std::string const& _name ) { - stream << getLineOfChars<'-'>() << "\n"; + stream << getLineOfChars<'-'>() << '\n'; { Colour colourGuard( Colour::Headers ); printHeaderString( _name ); @@ -316,7 +316,7 @@ namespace Catch { i = 0; stream << Text( _string, TextAttributes() .setIndent( indent+i) - .setInitialIndent( indent ) ) << "\n"; + .setInitialIndent( indent ) ) << '\n'; } struct SummaryColumn { @@ -331,9 +331,9 @@ namespace Catch { std::string row = oss.str(); for( std::vector::iterator it = rows.begin(); it != rows.end(); ++it ) { while( it->size() < row.size() ) - *it = " " + *it; + *it = ' ' + *it; while( it->size() > row.size() ) - row = " " + row; + row = ' ' + row; } rows.push_back( row ); return *this; @@ -353,8 +353,8 @@ namespace Catch { stream << Colour( Colour::ResultSuccess ) << "All tests passed"; stream << " (" << pluralise( totals.assertions.passed, "assertion" ) << " in " - << pluralise( totals.testCases.passed, "test case" ) << ")" - << "\n"; + << pluralise( totals.testCases.passed, "test case" ) << ')' + << '\n'; } else { @@ -389,10 +389,10 @@ namespace Catch { else if( value != "0" ) { stream << Colour( Colour::LightGrey ) << " | "; stream << Colour( it->colour ) - << value << " " << it->label; + << value << ' ' << it->label; } } - stream << "\n"; + stream << '\n'; } static std::size_t makeRatio( std::size_t number, std::size_t total ) { @@ -428,10 +428,10 @@ namespace Catch { else { stream << Colour( Colour::Warning ) << std::string( CATCH_CONFIG_CONSOLE_WIDTH-1, '=' ); } - stream << "\n"; + stream << '\n'; } void printSummaryDivider() { - stream << getLineOfChars<'-'>() << "\n"; + stream << getLineOfChars<'-'>() << '\n'; } private: diff --git a/3rdparty/catch/include/reporters/catch_reporter_junit.hpp b/3rdparty/catch/include/reporters/catch_reporter_junit.hpp index e656882f579..91d3e541f38 100644 --- a/3rdparty/catch/include/reporters/catch_reporter_junit.hpp +++ b/3rdparty/catch/include/reporters/catch_reporter_junit.hpp @@ -18,6 +18,35 @@ namespace Catch { + namespace { + std::string getCurrentTimestamp() { + // Beware, this is not reentrant because of backward compatibility issues + // Also, UTC only, again because of backward compatibility (%z is C++11) + time_t rawtime; + std::time(&rawtime); + const size_t timeStampSize = sizeof("2017-01-16T17:06:45Z"); + +#ifdef CATCH_PLATFORM_WINDOWS + std::tm timeInfo = {}; + gmtime_s(&timeInfo, &rawtime); +#else + std::tm* timeInfo; + timeInfo = std::gmtime(&rawtime); +#endif + + char timeStamp[timeStampSize]; + const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; + +#ifdef CATCH_PLATFORM_WINDOWS + std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); +#else + std::strftime(timeStamp, timeStampSize, fmt, timeInfo); +#endif + return std::string(timeStamp); + } + + } + class JunitReporter : public CumulativeReporterBase { public: JunitReporter( ReporterConfig const& _config ) @@ -82,7 +111,7 @@ namespace Catch { xml.writeAttribute( "time", "" ); else xml.writeAttribute( "time", suiteTime ); - xml.writeAttribute( "timestamp", "tbd" ); // !TBD + xml.writeAttribute( "timestamp", getCurrentTimestamp() ); // Write test cases for( TestGroupNode::ChildNodes::const_iterator @@ -117,7 +146,7 @@ namespace Catch { SectionNode const& sectionNode ) { std::string name = trim( sectionNode.stats.sectionInfo.name ); if( !rootName.empty() ) - name = rootName + "/" + name; + name = rootName + '/' + name; if( !sectionNode.assertions.empty() || !sectionNode.stdOut.empty() || @@ -195,14 +224,14 @@ namespace Catch { std::ostringstream oss; if( !result.getMessage().empty() ) - oss << result.getMessage() << "\n"; + oss << result.getMessage() << '\n'; for( std::vector::const_iterator it = stats.infoMessages.begin(), itEnd = stats.infoMessages.end(); it != itEnd; ++it ) if( it->type == ResultWas::Info ) - oss << it->message << "\n"; + oss << it->message << '\n'; oss << "at " << result.getSourceInfo(); xml.writeText( oss.str(), false ); diff --git a/3rdparty/catch/include/reporters/catch_reporter_multi.hpp b/3rdparty/catch/include/reporters/catch_reporter_multi.hpp index 7fc08f69934..0e06892fd1a 100644 --- a/3rdparty/catch/include/reporters/catch_reporter_multi.hpp +++ b/3rdparty/catch/include/reporters/catch_reporter_multi.hpp @@ -118,11 +118,11 @@ public: // IStreamingReporter ++it ) (*it)->skipTest( testInfo ); } - + virtual MultipleReporters* tryAsMulti() CATCH_OVERRIDE { return this; } - + }; Ptr addReporter( Ptr const& existingReporter, Ptr const& additionalReporter ) { diff --git a/3rdparty/catch/include/reporters/catch_reporter_xml.hpp b/3rdparty/catch/include/reporters/catch_reporter_xml.hpp index 153f0e7a4b1..c470ceb011c 100644 --- a/3rdparty/catch/include/reporters/catch_reporter_xml.hpp +++ b/3rdparty/catch/include/reporters/catch_reporter_xml.hpp @@ -20,6 +20,7 @@ namespace Catch { public: XmlReporter( ReporterConfig const& _config ) : StreamingReporterBase( _config ), + m_xml(_config.stream()), m_sectionDepth( 0 ) { m_reporterPrefs.shouldRedirectStdOut = true; @@ -39,7 +40,6 @@ namespace Catch { virtual void testRunStarting( TestRunInfo const& testInfo ) CATCH_OVERRIDE { StreamingReporterBase::testRunStarting( testInfo ); - m_xml.setStream( stream ); m_xml.startElement( "Catch" ); if( !m_config->name().empty() ) m_xml.writeAttribute( "name", m_config->name() ); @@ -96,7 +96,7 @@ namespace Catch { if( assertionResult.hasExpression() ) { m_xml.startElement( "Expression" ) .writeAttribute( "success", assertionResult.succeeded() ) - .writeAttribute( "type", assertionResult.getTestMacroName() ) + .writeAttribute( "type", assertionResult.getTestMacroName() ) .writeAttribute( "filename", assertionResult.getSourceInfo().file ) .writeAttribute( "line", assertionResult.getSourceInfo().line ); diff --git a/3rdparty/catch/projects/Benchmark/BenchMain.cpp b/3rdparty/catch/projects/Benchmark/BenchMain.cpp new file mode 100644 index 00000000000..32ef4ed9c23 --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/BenchMain.cpp @@ -0,0 +1,9 @@ +/* + * Created by Martin on 16/01/2017. + * + * 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) + */ + +#define CATCH_CONFIG_MAIN +#include "catch.hpp" diff --git a/3rdparty/catch/projects/Benchmark/StringificationBench.cpp b/3rdparty/catch/projects/Benchmark/StringificationBench.cpp new file mode 100644 index 00000000000..1c14939b407 --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/StringificationBench.cpp @@ -0,0 +1,46 @@ +/* + * Created by Martin on 16/01/2017. + * + * 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 "catch.hpp" + +#include + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE("Successful tests -- REQUIRE", "[Success]") { + const size_t sz = 1 * 1024 * 1024; + + + std::vector vec; vec.reserve(sz); + for (size_t i = 0; i < sz; ++i){ + vec.push_back(i); + REQUIRE(vec.back() == i); + } +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE("Successful tests -- CHECK", "[Success]") { + const size_t sz = 1 * 1024 * 1024; + + + std::vector vec; vec.reserve(sz); + for (size_t i = 0; i < sz; ++i){ + vec.push_back(i); + CHECK(vec.back() == i); + } +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE("Unsuccessful tests -- CHECK", "[Failure]") { + const size_t sz = 1024 * 1024; + + + std::vector vec; vec.reserve(sz); + for (size_t i = 0; i < sz; ++i){ + vec.push_back(i); + CHECK(vec.size() == i); + } +} diff --git a/3rdparty/catch/projects/Benchmark/readme.txt b/3rdparty/catch/projects/Benchmark/readme.txt new file mode 100644 index 00000000000..c4d2fabd921 --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/readme.txt @@ -0,0 +1,4 @@ +This is very much a work in progress. +The past results are standardized to a developer's machine, +the benchmarking script is basic and there are only 3 benchmarks, +but this should get better in time. For now, at least there is something to go by. diff --git a/3rdparty/catch/projects/Benchmark/results/2017-01-14T21-53-49-e3659cdddd43ba4df9e4846630be6a6a7bd85a07.result b/3rdparty/catch/projects/Benchmark/results/2017-01-14T21-53-49-e3659cdddd43ba4df9e4846630be6a6a7bd85a07.result new file mode 100644 index 00000000000..4b6fc6590ee --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/results/2017-01-14T21-53-49-e3659cdddd43ba4df9e4846630be6a6a7bd85a07.result @@ -0,0 +1,3 @@ +Successful tests -- CHECK: median: 3.38116 (s), stddev: 0.11567366292001534 (s) +Successful tests -- REQUIRE: median: 3.479955 (s), stddev: 0.16295972890734556 (s) +Unsuccessful tests -- CHECK: median: 1.966895 (s), stddev: 0.06323488524716572 (s) diff --git a/3rdparty/catch/projects/Benchmark/results/2017-01-14T21-59-08-a1e9b841ff500b2f39ccfd4193ae450cb653da05.result b/3rdparty/catch/projects/Benchmark/results/2017-01-14T21-59-08-a1e9b841ff500b2f39ccfd4193ae450cb653da05.result new file mode 100644 index 00000000000..98c84601780 --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/results/2017-01-14T21-59-08-a1e9b841ff500b2f39ccfd4193ae450cb653da05.result @@ -0,0 +1,3 @@ +Successful tests -- CHECK: median: 1.30312 (s), stddev: 0.08759818557862176 (s) +Successful tests -- REQUIRE: median: 1.341535 (s), stddev: 0.1479193390143576 (s) +Unsuccessful tests -- CHECK: median: 1.967755 (s), stddev: 0.07921104121269959 (s) diff --git a/3rdparty/catch/projects/Benchmark/results/2017-01-15T09-35-14-3b98a0166f7b7196eba2ad518174d1a77165166d.result b/3rdparty/catch/projects/Benchmark/results/2017-01-15T09-35-14-3b98a0166f7b7196eba2ad518174d1a77165166d.result new file mode 100644 index 00000000000..fe6366b89d1 --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/results/2017-01-15T09-35-14-3b98a0166f7b7196eba2ad518174d1a77165166d.result @@ -0,0 +1,3 @@ +Successful tests -- CHECK: median: 1.2982 (s), stddev: 0.019540648829214084 (s) +Successful tests -- REQUIRE: median: 1.30102 (s), stddev: 0.014758430547392974 (s) +Unsuccessful tests -- CHECK: median: 15.520199999999999 (s), stddev: 0.09536359426485094 (s) diff --git a/3rdparty/catch/projects/Benchmark/results/2017-01-29T22-08-36-60f8ebec49c5bc58d3604bf1a72cd3f7d129bf2e.result b/3rdparty/catch/projects/Benchmark/results/2017-01-29T22-08-36-60f8ebec49c5bc58d3604bf1a72cd3f7d129bf2e.result new file mode 100644 index 00000000000..c9b4d640b4e --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/results/2017-01-29T22-08-36-60f8ebec49c5bc58d3604bf1a72cd3f7d129bf2e.result @@ -0,0 +1,3 @@ +Successful tests -- CHECK: median: 0.7689014999999999 (s), stddev: 0.02127512078801068 (s) +Successful tests -- REQUIRE: median: 0.772845 (s), stddev: 0.03011638381365052 (s) +Unsuccessful tests -- CHECK: median: 15.49 (s), stddev: 0.536088571143903 (s) diff --git a/3rdparty/catch/projects/Benchmark/results/2017-01-29T23-13-35-bcaa2f9646c5ce50758f8582307c99501a932e1a.result b/3rdparty/catch/projects/Benchmark/results/2017-01-29T23-13-35-bcaa2f9646c5ce50758f8582307c99501a932e1a.result new file mode 100644 index 00000000000..5b82330f9c0 --- /dev/null +++ b/3rdparty/catch/projects/Benchmark/results/2017-01-29T23-13-35-bcaa2f9646c5ce50758f8582307c99501a932e1a.result @@ -0,0 +1,3 @@ +Successful tests -- CHECK: median: 0.775769 (s), stddev: 0.014802129132136525 (s) +Successful tests -- REQUIRE: median: 0.785235 (s), stddev: 0.03532672836834896 (s) +Unsuccessful tests -- CHECK: median: 15.156600000000001 (s), stddev: 0.2832375673450742 (s) diff --git a/3rdparty/catch/projects/CMake/CMakeLists.txt b/3rdparty/catch/projects/CMake/CMakeLists.txt deleted file mode 100644 index f4fb704f1a6..00000000000 --- a/3rdparty/catch/projects/CMake/CMakeLists.txt +++ /dev/null @@ -1,68 +0,0 @@ -cmake_minimum_required(VERSION 2.8) - -project(Catch) - -# define some folders -get_filename_component(CATCH_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH) -get_filename_component(CATCH_DIR "${CATCH_DIR}" PATH) -set(SELF_TEST_DIR ${CATCH_DIR}/projects/SelfTest) -if(USE_CPP11) - ## We can't turn this on by default, since it breaks on travis - message(STATUS "Enabling C++11") - set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") -endif() - -# define the sources of the self test -set(SOURCES - ${SELF_TEST_DIR}/ApproxTests.cpp - ${SELF_TEST_DIR}/BDDTests.cpp - ${SELF_TEST_DIR}/ClassTests.cpp - ${SELF_TEST_DIR}/ConditionTests.cpp - ${SELF_TEST_DIR}/ExceptionTests.cpp - ${SELF_TEST_DIR}/GeneratorTests.cpp - ${SELF_TEST_DIR}/MessageTests.cpp - ${SELF_TEST_DIR}/MiscTests.cpp - ${SELF_TEST_DIR}/PartTrackerTests.cpp - ${SELF_TEST_DIR}/TestMain.cpp - ${SELF_TEST_DIR}/TrickyTests.cpp - ${SELF_TEST_DIR}/VariadicMacrosTests.cpp - ${SELF_TEST_DIR}/EnumToString.cpp - ${SELF_TEST_DIR}/ToStringPair.cpp - ${SELF_TEST_DIR}/ToStringVector.cpp - ${SELF_TEST_DIR}/ToStringWhich.cpp - ${SELF_TEST_DIR}/ToStringTuple.cpp - ${SELF_TEST_DIR}/CmdLineTests.cpp - ${SELF_TEST_DIR}/TagAliasTests.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_common.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_console_colour.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_debugger.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_capture.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_config.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_exception.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_generators.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_registry_hub.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_reporter.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_runner.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_interfaces_testcase.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_message.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_option.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_ptr.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_stream.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_streambuf.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_test_spec.cpp - ${SELF_TEST_DIR}/SurrogateCpps/catch_xmlwriter.cpp - ) - -# configure the executable -include_directories(${CATCH_DIR}/include) -add_executable(SelfTest ${SOURCES}) - -# configure unit tests via CTest -enable_testing() -add_test(NAME RunTests COMMAND SelfTest) - -add_test(NAME ListTests COMMAND SelfTest --list-tests) -set_tests_properties(ListTests PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ test cases") - -add_test(NAME ListTags COMMAND SelfTest --list-tags) -set_tests_properties(ListTags PROPERTIES PASS_REGULAR_EXPRESSION "[0-9]+ tags") diff --git a/3rdparty/catch/projects/SelfTest/ApproxTests.cpp b/3rdparty/catch/projects/SelfTest/ApproxTests.cpp index 53656596c0a..6b7cf44a394 100644 --- a/3rdparty/catch/projects/SelfTest/ApproxTests.cpp +++ b/3rdparty/catch/projects/SelfTest/ApproxTests.cpp @@ -39,6 +39,36 @@ TEST_CASE REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ); } +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE +( + "Less-than inequalities with different epsilons", + "[Approx]" +) +{ + double d = 1.23; + + REQUIRE( d <= Approx( 1.24 ) ); + REQUIRE( d <= Approx( 1.23 ) ); + REQUIRE_FALSE( d <= Approx( 1.22 ) ); + REQUIRE( d <= Approx( 1.22 ).epsilon(0.1) ); +} + +/////////////////////////////////////////////////////////////////////////////// +TEST_CASE +( + "Greater-than inequalities with different epsilons", + "[Approx]" +) +{ + double d = 1.23; + + REQUIRE( d >= Approx( 1.22 ) ); + REQUIRE( d >= Approx( 1.23 ) ); + REQUIRE_FALSE( d >= Approx( 1.24 ) ); + REQUIRE( d >= Approx( 1.24 ).epsilon(0.1) ); +} + /////////////////////////////////////////////////////////////////////////////// TEST_CASE ( @@ -110,3 +140,48 @@ TEST_CASE( "Approximate PI", "[Approx][PI]" ) REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ); REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ); } + +//////////////////////////////////////////////////////////////////////////////// + +#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) +class StrongDoubleTypedef +{ + double d_ = 0.0; + + public: + explicit StrongDoubleTypedef(double d) : d_(d) {} + explicit operator double() const { return d_; } +}; + +inline std::ostream& operator<<( std::ostream& os, StrongDoubleTypedef td ) { + return os << "StrongDoubleTypedef(" << static_cast(td) << ")"; +} + +TEST_CASE +( + "Comparison with explicitly convertible types", + "[Approx]" +) +{ + StrongDoubleTypedef td(10.0); + + REQUIRE(td == Approx(10.0)); + REQUIRE(Approx(10.0) == td); + + REQUIRE(td != Approx(11.0)); + REQUIRE(Approx(11.0) != td); + + REQUIRE(td <= Approx(10.0)); + REQUIRE(td <= Approx(11.0)); + REQUIRE(Approx(10.0) <= td); + REQUIRE(Approx(9.0) <= td); + + REQUIRE(td >= Approx(9.0)); + REQUIRE(td >= Approx(10.0)); + REQUIRE(Approx(10.0) >= td); + REQUIRE(Approx(11.0) >= td); + +} +#endif + +//////////////////////////////////////////////////////////////////////////////// diff --git a/3rdparty/catch/projects/SelfTest/BDDTests.cpp b/3rdparty/catch/projects/SelfTest/BDDTests.cpp index 2c8bc2495b0..ed89bfbcf87 100644 --- a/3rdparty/catch/projects/SelfTest/BDDTests.cpp +++ b/3rdparty/catch/projects/SelfTest/BDDTests.cpp @@ -88,10 +88,10 @@ struct Fixture } SCENARIO_METHOD(Fixture, - "BDD tests requiring Fixtures to provide commonly-accessed data or methods", - "[bdd][fixtures]") { + "BDD tests requiring Fixtures to provide commonly-accessed data or methods", + "[bdd][fixtures]") { const int before(counter()); - GIVEN("No operations precede me") { + GIVEN("No operations precede me") { REQUIRE(before == 0); WHEN("We get the count") { const int after(counter()); diff --git a/3rdparty/catch/projects/SelfTest/Baselines/console.std.approved.txt b/3rdparty/catch/projects/SelfTest/Baselines/console.std.approved.txt index ee8d8072afa..ea2e10081c4 100644 --- a/3rdparty/catch/projects/SelfTest/Baselines/console.std.approved.txt +++ b/3rdparty/catch/projects/SelfTest/Baselines/console.std.approved.txt @@ -1,8 +1,48 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -CatchSelfTest is a host application. + is a host application. Run with -? for options +------------------------------------------------------------------------------- +'Not' checks that should fail +------------------------------------------------------------------------------- +ConditionTests.cpp: +............................................................................... + +ConditionTests.cpp:: FAILED: + CHECK( false != false ) + +ConditionTests.cpp:: FAILED: + CHECK( true != true ) + +ConditionTests.cpp:: FAILED: + CHECK( !true ) +with expansion: + false + +ConditionTests.cpp:: FAILED: + CHECK_FALSE( true ) + +ConditionTests.cpp:: FAILED: + CHECK( !trueValue ) +with expansion: + false + +ConditionTests.cpp:: FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true + +ConditionTests.cpp:: FAILED: + CHECK( !(1 == 1) ) +with expansion: + false + +ConditionTests.cpp:: FAILED: + CHECK_FALSE( 1 == 1 ) +with expansion: + !(1 == 1) + ------------------------------------------------------------------------------- A METHOD_AS_TEST_CASE based test run that fails ------------------------------------------------------------------------------- @@ -25,6 +65,97 @@ ClassTests.cpp:: FAILED: with expansion: 1 == 2 +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: +explicitly with message: + to infinity and beyond + +------------------------------------------------------------------------------- +A failing expression with a non streamable type is still captured +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x + +TrickyTests.cpp:: FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +An unchecked exception reports the line of the last assertion +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +Contains string matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Contains( "not there" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "not there" + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for nothrow +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + REQUIRE_NOTHROW( throwCustom() ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom exceptions can be translated when testing for throwing as something else +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + REQUIRE_THROWS_AS( throwCustom() ) +due to unexpected exception with message: + custom exception - not std + +------------------------------------------------------------------------------- +Custom std-exceptions can be custom translated +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: +due to unexpected exception with message: + custom std exception + +------------------------------------------------------------------------------- +EndsWith string matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" + ------------------------------------------------------------------------------- Equality checks that should fail ------------------------------------------------------------------------------- @@ -96,6 +227,100 @@ ConditionTests.cpp:: FAILED: with expansion: 1.3 == Approx( 1.301 ) +------------------------------------------------------------------------------- +Equals string matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" + +------------------------------------------------------------------------------- +Expected exceptions that don't throw or unexpected exceptions fail the test +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + CHECK_THROWS_AS( thisThrows() ) +due to unexpected exception with message: + expected exception + +ExceptionTests.cpp:: FAILED: + CHECK_THROWS_AS( thisDoesntThrow() ) +because no exception was thrown where one was expected: + +ExceptionTests.cpp:: FAILED: + CHECK_NOTHROW( thisThrows() ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +FAIL aborts the test +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: +explicitly with message: + This is a failure + +------------------------------------------------------------------------------- +FAIL does not require an argument +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + +------------------------------------------------------------------------------- +INFO and WARN do not abort tests +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: +warning: + this is a warning + +------------------------------------------------------------------------------- +INFO gets logged on failure +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + REQUIRE( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message should be logged + so should this + +------------------------------------------------------------------------------- +INFO gets logged on failure, even if captured before successful assertions +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + CHECK( a == 1 ) +with expansion: + 2 == 1 +with messages: + this message may be logged later + this message should be logged + +MessageTests.cpp:: FAILED: + CHECK( a == 0 ) +with expansion: + 2 == 0 +with message: + and this, but later + ------------------------------------------------------------------------------- Inequality checks that should fail ------------------------------------------------------------------------------- @@ -127,6 +352,60 @@ ConditionTests.cpp:: FAILED: with expansion: 5 != 5 +------------------------------------------------------------------------------- +Matchers can be composed with both && and || - failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator - failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), !Contains( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" + +------------------------------------------------------------------------------- +Mismatching exception messages failing the test +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + expected exception + +------------------------------------------------------------------------------- +Nice descriptive name +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +warning: + This one ran + +------------------------------------------------------------------------------- +Non-std exceptions can be translated +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: +due to unexpected exception with message: + custom exception + ------------------------------------------------------------------------------- Ordering comparison checks that should fail ------------------------------------------------------------------------------- @@ -229,64 +508,99 @@ with expansion: "hello" <= "a" ------------------------------------------------------------------------------- -'Not' checks that should fail +Output from all sections is reported + one ------------------------------------------------------------------------------- -ConditionTests.cpp: +MessageTests.cpp: ............................................................................... -ConditionTests.cpp:: FAILED: - CHECK( false != false ) - -ConditionTests.cpp:: FAILED: - CHECK( true != true ) - -ConditionTests.cpp:: FAILED: - CHECK( !true ) -with expansion: - false - -ConditionTests.cpp:: FAILED: - CHECK_FALSE( true ) - -ConditionTests.cpp:: FAILED: - CHECK( !trueValue ) -with expansion: - false - -ConditionTests.cpp:: FAILED: - CHECK_FALSE( trueValue ) -with expansion: - !true - -ConditionTests.cpp:: FAILED: - CHECK( !(1 == 1) ) -with expansion: - false - -ConditionTests.cpp:: FAILED: - CHECK_FALSE( 1 == 1 ) -with expansion: - !(1 == 1) +MessageTests.cpp:: FAILED: +explicitly with message: + Message from section one ------------------------------------------------------------------------------- -Expected exceptions that don't throw or unexpected exceptions fail the test +Output from all sections is reported + two +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: +explicitly with message: + Message from section two + +------------------------------------------------------------------------------- +Pointers can be converted to strings +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: +warning: + actual address of p: 0x + +MessageTests.cpp:: +warning: + toString(p): 0x + +------------------------------------------------------------------------------- +SCOPED_INFO is reset for each loop +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +with messages: + current counter 10 + i := 10 + +A string sent directly to stdout +A string sent directly to stderr +Message from section one +Message from section two +------------------------------------------------------------------------------- +StartsWith string matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" + +hello +hello +------------------------------------------------------------------------------- +Tabs and newlines show in output +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; + }" + == + "if ($b == 10) { + $a = 20; + } + " + +------------------------------------------------------------------------------- +Unexpected exceptions can be translated ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... ExceptionTests.cpp:: FAILED: - CHECK_THROWS_AS( thisThrows() ) due to unexpected exception with message: - expected exception - -ExceptionTests.cpp:: FAILED: - CHECK_THROWS_AS( thisDoesntThrow() ) -because no exception was thrown where one was expected: - -ExceptionTests.cpp:: FAILED: - CHECK_NOTHROW( thisThrows() ) -due to unexpected exception with message: - expected exception + 3.14 ------------------------------------------------------------------------------- When unchecked exceptions are thrown directly they are always failures @@ -299,29 +613,7 @@ due to unexpected exception with message: unexpected exception ------------------------------------------------------------------------------- -An unchecked exception reports the line of the last assertion -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - {Unknown expression after the reported line} -due to unexpected exception with message: - unexpected exception - -------------------------------------------------------------------------------- -When unchecked exceptions are thrown from sections they are always failures - section name -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: -due to unexpected exception with message: - unexpected exception - -------------------------------------------------------------------------------- -When unchecked exceptions are thrown from functions they are always failures +When unchecked exceptions are thrown during a CHECK the test should continue ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -344,8 +636,7 @@ due to unexpected exception with message: expected exception ------------------------------------------------------------------------------- -When unchecked exceptions are thrown during a CHECK the test should abort and -fail +When unchecked exceptions are thrown from functions they are always failures ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... @@ -356,168 +647,69 @@ due to unexpected exception with message: expected exception ------------------------------------------------------------------------------- -Non-std exceptions can be translated +When unchecked exceptions are thrown from sections they are always failures + section name ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... ExceptionTests.cpp:: FAILED: due to unexpected exception with message: - custom exception + unexpected exception ------------------------------------------------------------------------------- -Custom std-exceptions can be custom translated +Where the LHS is not a simple value ------------------------------------------------------------------------------- -ExceptionTests.cpp: +TrickyTests.cpp: ............................................................................... -ExceptionTests.cpp:: FAILED: -due to unexpected exception with message: - custom std exception - -------------------------------------------------------------------------------- -Custom exceptions can be translated when testing for nothrow -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - REQUIRE_NOTHROW( throwCustom() ) -due to unexpected exception with message: - custom exception - not std - -------------------------------------------------------------------------------- -Custom exceptions can be translated when testing for throwing as something else -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - REQUIRE_THROWS_AS( throwCustom() ) -due to unexpected exception with message: - custom exception - not std - -------------------------------------------------------------------------------- -Unexpected exceptions can be translated -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: -due to unexpected exception with message: - 3.14 - -------------------------------------------------------------------------------- -Mismatching exception messages failing the test -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) -with expansion: - expected exception - -------------------------------------------------------------------------------- -INFO and WARN do not abort tests -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: +TrickyTests.cpp:: warning: - this is a warning + Uncomment the code in this test to check that it gives a sensible compiler + error ------------------------------------------------------------------------------- -INFO gets logged on failure +Where there is more to the expression after the RHS ------------------------------------------------------------------------------- -MessageTests.cpp: +TrickyTests.cpp: ............................................................................... -MessageTests.cpp:: FAILED: - REQUIRE( a == 1 ) +TrickyTests.cpp:: +warning: + Uncomment the code in this test to check that it gives a sensible compiler + error + +------------------------------------------------------------------------------- +checkedElse, failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECKED_ELSE( flag ) with expansion: - 2 == 1 -with messages: - this message should be logged - so should this + false -------------------------------------------------------------------------------- -INFO gets logged on failure, even if captured before successful assertions -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: - CHECK( a == 1 ) +MiscTests.cpp:: FAILED: + REQUIRE( testCheckedElse( false ) ) with expansion: - 2 == 1 -with messages: - this message may be logged later - this message should be logged + false -MessageTests.cpp:: FAILED: - CHECK( a == 0 ) +------------------------------------------------------------------------------- +checkedIf, failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECKED_IF( flag ) with expansion: - 2 == 0 -with message: - and this, but later + false -------------------------------------------------------------------------------- -FAIL aborts the test -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: -explicitly with message: - This is a failure - -------------------------------------------------------------------------------- -FAIL does not require an argument -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: - -------------------------------------------------------------------------------- -Output from all sections is reported - one -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: -explicitly with message: - Message from section one - -------------------------------------------------------------------------------- -Output from all sections is reported - two -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: -explicitly with message: - Message from section two - -Message from section one -Message from section two -------------------------------------------------------------------------------- -SCOPED_INFO is reset for each loop -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: - REQUIRE( i < 10 ) +MiscTests.cpp:: FAILED: + REQUIRE( testCheckedIf( false ) ) with expansion: - 10 < 10 -with messages: - current counter 10 - i := 10 + false ------------------------------------------------------------------------------- just failure @@ -529,45 +721,6 @@ MessageTests.cpp:: FAILED: explicitly with message: Previous info should not be seen -------------------------------------------------------------------------------- -sends information to INFO -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: - REQUIRE( false ) -with messages: - hi - i := 7 - -------------------------------------------------------------------------------- -Pointers can be converted to strings -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: -warning: - actual address of p: 0x - -MessageTests.cpp:: -warning: - toString(p): 0x - -------------------------------------------------------------------------------- -more nested SECTION tests - s1 - s2 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - REQUIRE( a == b ) -with expansion: - 1 == 2 - ------------------------------------------------------------------------------- looped SECTION tests s1 @@ -628,39 +781,18 @@ with expansion: with message: Testing if fib[7] (21) is even -A string sent directly to stdout -A string sent directly to stderr ------------------------------------------------------------------------------- -checkedIf, failing +more nested SECTION tests + s1 + s2 ------------------------------------------------------------------------------- MiscTests.cpp: ............................................................................... MiscTests.cpp:: FAILED: - CHECKED_IF( flag ) + REQUIRE( a == b ) with expansion: - false - -MiscTests.cpp:: FAILED: - REQUIRE( testCheckedIf( false ) ) -with expansion: - false - -------------------------------------------------------------------------------- -checkedElse, failing -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECKED_ELSE( flag ) -with expansion: - false - -MiscTests.cpp:: FAILED: - REQUIRE( testCheckedElse( false ) ) -with expansion: - false + 1 == 2 ------------------------------------------------------------------------------- send a single char to INFO @@ -674,149 +806,16 @@ with message: 3 ------------------------------------------------------------------------------- -Contains string matcher +sends information to INFO ------------------------------------------------------------------------------- -MiscTests.cpp: +MessageTests.cpp: ............................................................................... -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), Contains( "not there" ) ) -with expansion: - "this string contains 'abc' as a substring" contains: "not there" - -------------------------------------------------------------------------------- -StartsWith string matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), StartsWith( "string" ) ) -with expansion: - "this string contains 'abc' as a substring" starts with: "string" - -------------------------------------------------------------------------------- -EndsWith string matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), EndsWith( "this" ) ) -with expansion: - "this string contains 'abc' as a substring" ends with: "this" - -------------------------------------------------------------------------------- -Equals string matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), Equals( "something else" ) ) -with expansion: - "this string contains 'abc' as a substring" equals: "something else" - -------------------------------------------------------------------------------- -Matchers can be composed with both && and || - failing -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) ) -with expansion: - "this string contains 'abc' as a substring" ( ( contains: "string" or - contains: "different" ) and contains: "random" ) - -------------------------------------------------------------------------------- -Matchers can be negated (Not) with the ! operator - failing -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), !Contains( "substring" ) ) -with expansion: - "this string contains 'abc' as a substring" not contains: "substring" - -------------------------------------------------------------------------------- -Nice descriptive name -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -warning: - This one ran - -------------------------------------------------------------------------------- -A couple of nested sections followed by a failure -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: -explicitly with message: - to infinity and beyond - -------------------------------------------------------------------------------- -Tabs and newlines show in output -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK( s1 == s2 ) -with expansion: - "if ($b == 10) { - $a= 20; - }" - == - "if ($b == 10) { - $a = 20; - } - " - -hello -hello -------------------------------------------------------------------------------- -Where there is more to the expression after the RHS -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -warning: - Uncomment the code in this test to check that it gives a sensible compiler - error - -------------------------------------------------------------------------------- -Where the LHS is not a simple value -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -warning: - Uncomment the code in this test to check that it gives a sensible compiler - error - -------------------------------------------------------------------------------- -A failing expression with a non streamable type is still captured -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: FAILED: - CHECK( &o1 == &o2 ) -with expansion: - 0x == 0x - -TrickyTests.cpp:: FAILED: - CHECK( o1 == o2 ) -with expansion: - {?} == {?} +MessageTests.cpp:: FAILED: + REQUIRE( false ) +with messages: + hi + i := 7 ------------------------------------------------------------------------------- string literals of different sizes can be compared @@ -830,6 +829,6 @@ with expansion: "first" == "second" =============================================================================== -test cases: 169 | 125 passed | 42 failed | 2 failed as expected -assertions: 921 | 825 passed | 78 failed | 18 failed as expected +test cases: 157 | 113 passed | 42 failed | 2 failed as expected +assertions: 913 | 817 passed | 78 failed | 18 failed as expected diff --git a/3rdparty/catch/projects/SelfTest/Baselines/console.sw.approved.txt b/3rdparty/catch/projects/SelfTest/Baselines/console.sw.approved.txt index 3359a0fa2e9..2ea4dd0bd6e 100644 --- a/3rdparty/catch/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/3rdparty/catch/projects/SelfTest/Baselines/console.sw.approved.txt @@ -1,129 +1,369 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -CatchSelfTest is a host application. + is a host application. Run with -? for options ------------------------------------------------------------------------------- -toString(enum) +# A test name that starts with a # ------------------------------------------------------------------------------- -EnumToString.cpp: +MiscTests.cpp: ............................................................................... -EnumToString.cpp:: +MiscTests.cpp:: PASSED: - CHECK( Catch::toString(e0) == "0" ) -with expansion: - "0" == "0" - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e1) == "1" ) -with expansion: - "1" == "1" +with message: + yay ------------------------------------------------------------------------------- -toString(enum w/operator<<) +'Not' checks that should fail ------------------------------------------------------------------------------- -EnumToString.cpp: +ConditionTests.cpp: ............................................................................... -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e0) == "E2{0}" ) -with expansion: - "E2{0}" == "E2{0}" +ConditionTests.cpp:: FAILED: + CHECK( false != false ) -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e1) == "E2{1}" ) +ConditionTests.cpp:: FAILED: + CHECK( true != true ) + +ConditionTests.cpp:: FAILED: + CHECK( !true ) with expansion: - "E2{1}" == "E2{1}" + false + +ConditionTests.cpp:: FAILED: + CHECK_FALSE( true ) + +ConditionTests.cpp:: FAILED: + CHECK( !trueValue ) +with expansion: + false + +ConditionTests.cpp:: FAILED: + CHECK_FALSE( trueValue ) +with expansion: + !true + +ConditionTests.cpp:: FAILED: + CHECK( !(1 == 1) ) +with expansion: + false + +ConditionTests.cpp:: FAILED: + CHECK_FALSE( 1 == 1 ) +with expansion: + !(1 == 1) ------------------------------------------------------------------------------- -toString(enum class) +'Not' checks that should succeed ------------------------------------------------------------------------------- -EnumToString.cpp: +ConditionTests.cpp: ............................................................................... -EnumToString.cpp:: +ConditionTests.cpp:: PASSED: - CHECK( Catch::toString(e0) == "0" ) -with expansion: - "0" == "0" + REQUIRE( false == false ) -EnumToString.cpp:: +ConditionTests.cpp:: PASSED: - CHECK( Catch::toString(e1) == "1" ) + REQUIRE( true == true ) + +ConditionTests.cpp:: +PASSED: + REQUIRE( !false ) with expansion: - "1" == "1" + true + +ConditionTests.cpp:: +PASSED: + REQUIRE_FALSE( false ) + +ConditionTests.cpp:: +PASSED: + REQUIRE( !falseValue ) +with expansion: + true + +ConditionTests.cpp:: +PASSED: + REQUIRE_FALSE( falseValue ) +with expansion: + !false + +ConditionTests.cpp:: +PASSED: + REQUIRE( !(1 == 2) ) +with expansion: + true + +ConditionTests.cpp:: +PASSED: + REQUIRE_FALSE( 1 == 2 ) +with expansion: + !(1 == 2) ------------------------------------------------------------------------------- -toString(enum class w/operator<<) +(unimplemented) static bools can be evaluated + compare to true ------------------------------------------------------------------------------- -EnumToString.cpp: +TrickyTests.cpp: ............................................................................... -EnumToString.cpp:: +TrickyTests.cpp:: PASSED: - CHECK( Catch::toString(e0) == "E2/V0" ) + REQUIRE( is_true::value == true ) with expansion: - "E2/V0" == "E2/V0" + true == true -EnumToString.cpp:: +TrickyTests.cpp:: PASSED: - CHECK( Catch::toString(e1) == "E2/V1" ) + REQUIRE( true == is_true::value ) with expansion: - "E2/V1" == "E2/V1" - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e3) == "Unknown enum value 10" ) -with expansion: - "Unknown enum value 10" - == - "Unknown enum value 10" + true == true ------------------------------------------------------------------------------- -Some simple comparisons between doubles +(unimplemented) static bools can be evaluated + compare to false +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( is_true::value == false ) +with expansion: + false == false + +TrickyTests.cpp:: +PASSED: + REQUIRE( false == is_true::value ) +with expansion: + false == false + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + negation +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( !is_true::value ) +with expansion: + true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + double negation +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( !!is_true::value ) +with expansion: + true + +------------------------------------------------------------------------------- +(unimplemented) static bools can be evaluated + direct +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( is_true::value ) +with expansion: + true + +TrickyTests.cpp:: +PASSED: + REQUIRE_FALSE( is_true::value ) +with expansion: + !false + +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that fails +------------------------------------------------------------------------------- +ClassTests.cpp: +............................................................................... + +ClassTests.cpp:: FAILED: + REQUIRE( s == "world" ) +with expansion: + "hello" == "world" + +------------------------------------------------------------------------------- +A METHOD_AS_TEST_CASE based test run that succeeds +------------------------------------------------------------------------------- +ClassTests.cpp: +............................................................................... + +ClassTests.cpp:: +PASSED: + REQUIRE( s == "hello" ) +with expansion: + "hello" == "hello" + +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that fails +------------------------------------------------------------------------------- +ClassTests.cpp: +............................................................................... + +ClassTests.cpp:: FAILED: + REQUIRE( m_a == 2 ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +A TEST_CASE_METHOD based test run that succeeds +------------------------------------------------------------------------------- +ClassTests.cpp: +............................................................................... + +ClassTests.cpp:: +PASSED: + REQUIRE( m_a == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure + Outer + Inner +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: +with message: + that's not flying - that's failing in style + +------------------------------------------------------------------------------- +A couple of nested sections followed by a failure +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: +explicitly with message: + to infinity and beyond + +------------------------------------------------------------------------------- +A failing expression with a non streamable type is still captured +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: FAILED: + CHECK( &o1 == &o2 ) +with expansion: + 0x == 0x + +TrickyTests.cpp:: FAILED: + CHECK( o1 == o2 ) +with expansion: + {?} == {?} + +------------------------------------------------------------------------------- +AllOf matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "string" and + contains: "abc" ) + +------------------------------------------------------------------------------- +An expression with side-effects should only be evaluated once +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( i++ == 7 ) +with expansion: + 7 == 7 + +TrickyTests.cpp:: +PASSED: + REQUIRE( i++ == 8 ) +with expansion: + 8 == 8 + +------------------------------------------------------------------------------- +An unchecked exception reports the line of the last assertion +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: +PASSED: + CHECK( 1 == 1 ) + +ExceptionTests.cpp:: FAILED: + {Unknown expression after the reported line} +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +Anonymous test case 1 +------------------------------------------------------------------------------- +VariadicMacrosTests.cpp: +............................................................................... + +VariadicMacrosTests.cpp:: +PASSED: +with message: + anonymous test case + +------------------------------------------------------------------------------- +AnyOf matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "string" or contains: + "not there" ) + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "not there" or + contains: "string" ) + +------------------------------------------------------------------------------- +Approximate PI ------------------------------------------------------------------------------- ApproxTests.cpp: ............................................................................... ApproxTests.cpp:: PASSED: - REQUIRE( d == Approx( 1.23 ) ) + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) with expansion: - 1.23 == Approx( 1.23 ) + 3.1428571429 == Approx( 3.141 ) ApproxTests.cpp:: PASSED: - REQUIRE( d != Approx( 1.22 ) ) + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) with expansion: - 1.23 != Approx( 1.22 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d != Approx( 1.24 ) ) -with expansion: - 1.23 != Approx( 1.24 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( Approx( d ) == 1.23 ) -with expansion: - Approx( 1.23 ) == 1.23 - -ApproxTests.cpp:: -PASSED: - REQUIRE( Approx( d ) != 1.22 ) -with expansion: - Approx( 1.23 ) != 1.22 - -ApproxTests.cpp:: -PASSED: - REQUIRE( Approx( d ) != 1.24 ) -with expansion: - Approx( 1.23 ) != 1.24 + 3.1428571429 != Approx( 3.141 ) ------------------------------------------------------------------------------- Approximate comparisons with different epsilons @@ -216,553 +456,169 @@ with expansion: 1.234 == Approx( 1.2339999676 ) ------------------------------------------------------------------------------- -Use a custom approx +Assertions then sections ------------------------------------------------------------------------------- -ApproxTests.cpp: +TrickyTests.cpp: ............................................................................... -ApproxTests.cpp:: +TrickyTests.cpp:: PASSED: - REQUIRE( d == approx( 1.23 ) ) + REQUIRE( Catch::alwaysTrue() ) with expansion: - 1.23 == Approx( 1.23 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d == approx( 1.22 ) ) -with expansion: - 1.23 == Approx( 1.22 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d == approx( 1.24 ) ) -with expansion: - 1.23 == Approx( 1.24 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d != approx( 1.25 ) ) -with expansion: - 1.23 != Approx( 1.25 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) == 1.23 ) -with expansion: - Approx( 1.23 ) == 1.23 - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) == 1.22 ) -with expansion: - Approx( 1.23 ) == 1.22 - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) == 1.24 ) -with expansion: - Approx( 1.23 ) == 1.24 - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) != 1.25 ) -with expansion: - Approx( 1.23 ) != 1.25 + true ------------------------------------------------------------------------------- -Approximate PI +Assertions then sections + A section ------------------------------------------------------------------------------- -ApproxTests.cpp: +TrickyTests.cpp: ............................................................................... -ApproxTests.cpp:: +TrickyTests.cpp:: PASSED: - REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) + REQUIRE( Catch::alwaysTrue() ) with expansion: - 3.1428571429 == Approx( 3.141 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) -with expansion: - 3.1428571429 != Approx( 3.141 ) + true ------------------------------------------------------------------------------- -A METHOD_AS_TEST_CASE based test run that succeeds +Assertions then sections + A section + Another section ------------------------------------------------------------------------------- -ClassTests.cpp: +TrickyTests.cpp: ............................................................................... -ClassTests.cpp:: +TrickyTests.cpp:: PASSED: - REQUIRE( s == "hello" ) + REQUIRE( Catch::alwaysTrue() ) with expansion: - "hello" == "hello" + true ------------------------------------------------------------------------------- -A METHOD_AS_TEST_CASE based test run that fails +Assertions then sections ------------------------------------------------------------------------------- -ClassTests.cpp: +TrickyTests.cpp: ............................................................................... -ClassTests.cpp:: FAILED: - REQUIRE( s == "world" ) -with expansion: - "hello" == "world" - -------------------------------------------------------------------------------- -A TEST_CASE_METHOD based test run that succeeds -------------------------------------------------------------------------------- -ClassTests.cpp: -............................................................................... - -ClassTests.cpp:: +TrickyTests.cpp:: PASSED: - REQUIRE( m_a == 1 ) + REQUIRE( Catch::alwaysTrue() ) with expansion: - 1 == 1 + true ------------------------------------------------------------------------------- -A TEST_CASE_METHOD based test run that fails +Assertions then sections + A section ------------------------------------------------------------------------------- -ClassTests.cpp: +TrickyTests.cpp: ............................................................................... -ClassTests.cpp:: FAILED: - REQUIRE( m_a == 2 ) +TrickyTests.cpp:: +PASSED: + REQUIRE( Catch::alwaysTrue() ) with expansion: - 1 == 2 + true ------------------------------------------------------------------------------- -Equality checks that should succeed +Assertions then sections + A section + Another other section +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( Catch::alwaysTrue() ) +with expansion: + true + +------------------------------------------------------------------------------- +Comparing function pointers +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( a ) +with expansion: + true + +TrickyTests.cpp:: +PASSED: + REQUIRE( a == &foo ) +with expansion: + 0x == 0x + +------------------------------------------------------------------------------- +Comparing member function pointers +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + CHECK( m == &S::f ) +with expansion: + 0x + == + 0x + +------------------------------------------------------------------------------- +Comparisons between ints where one side is computed ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... ConditionTests.cpp:: PASSED: - REQUIRE( data.int_seven == 7 ) + CHECK( 54 == 6*9 ) with expansion: - 7 == 7 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) -with expansion: - 9.1f == Approx( 9.1000003815 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) -with expansion: - 3.1415926535 == Approx( 3.1415926535 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello == "hello" ) -with expansion: - "hello" == "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( "hello" == data.str_hello ) -with expansion: - "hello" == "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello.size() == 5 ) -with expansion: - 5 == 5 - -ConditionTests.cpp:: -PASSED: - REQUIRE( x == Approx( 1.3 ) ) -with expansion: - 1.3 == Approx( 1.3 ) + 54 == 54 ------------------------------------------------------------------------------- -Equality checks that should fail -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven == 6 ) -with expansion: - 7 == 6 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven == 8 ) -with expansion: - 7 == 8 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven == 0 ) -with expansion: - 7 == 0 - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one == Approx( 9.11f ) ) -with expansion: - 9.1f == Approx( 9.1099996567 ) - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one == Approx( 9.0f ) ) -with expansion: - 9.1f == Approx( 9.0 ) - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one == Approx( 1 ) ) -with expansion: - 9.1f == Approx( 1.0 ) - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one == Approx( 0 ) ) -with expansion: - 9.1f == Approx( 0.0 ) - -ConditionTests.cpp:: FAILED: - CHECK( data.double_pi == Approx( 3.1415 ) ) -with expansion: - 3.1415926535 == Approx( 3.1415 ) - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello == "goodbye" ) -with expansion: - "hello" == "goodbye" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello == "hell" ) -with expansion: - "hello" == "hell" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello == "hello1" ) -with expansion: - "hello" == "hello1" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello.size() == 6 ) -with expansion: - 5 == 6 - -ConditionTests.cpp:: FAILED: - CHECK( x == Approx( 1.301 ) ) -with expansion: - 1.3 == Approx( 1.301 ) - -------------------------------------------------------------------------------- -Inequality checks that should succeed +Comparisons between unsigned ints and negative signed ints match c++ standard +behaviour ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... ConditionTests.cpp:: PASSED: - REQUIRE( data.int_seven != 6 ) + CHECK( ( -1 > 2u ) ) with expansion: - 7 != 6 + true ConditionTests.cpp:: PASSED: - REQUIRE( data.int_seven != 8 ) + CHECK( -1 > 2u ) with expansion: - 7 != 8 + -1 > 2 ConditionTests.cpp:: PASSED: - REQUIRE( data.float_nine_point_one != Approx( 9.11f ) ) + CHECK( ( 2u < -1 ) ) with expansion: - 9.1f != Approx( 9.1099996567 ) + true ConditionTests.cpp:: PASSED: - REQUIRE( data.float_nine_point_one != Approx( 9.0f ) ) + CHECK( 2u < -1 ) with expansion: - 9.1f != Approx( 9.0 ) + 2 < -1 ConditionTests.cpp:: PASSED: - REQUIRE( data.float_nine_point_one != Approx( 1 ) ) + CHECK( ( minInt > 2u ) ) with expansion: - 9.1f != Approx( 1.0 ) + true ConditionTests.cpp:: PASSED: - REQUIRE( data.float_nine_point_one != Approx( 0 ) ) + CHECK( minInt > 2u ) with expansion: - 9.1f != Approx( 0.0 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.double_pi != Approx( 3.1415 ) ) -with expansion: - 3.1415926535 != Approx( 3.1415 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello != "goodbye" ) -with expansion: - "hello" != "goodbye" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello != "hell" ) -with expansion: - "hello" != "hell" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello != "hello1" ) -with expansion: - "hello" != "hello1" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello.size() != 6 ) -with expansion: - 5 != 6 - -------------------------------------------------------------------------------- -Inequality checks that should fail -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven != 7 ) -with expansion: - 7 != 7 - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one != Approx( 9.1f ) ) -with expansion: - 9.1f != Approx( 9.1000003815 ) - -ConditionTests.cpp:: FAILED: - CHECK( data.double_pi != Approx( 3.1415926535 ) ) -with expansion: - 3.1415926535 != Approx( 3.1415926535 ) - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello != "hello" ) -with expansion: - "hello" != "hello" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello.size() != 5 ) -with expansion: - 5 != 5 - -------------------------------------------------------------------------------- -Ordering comparison checks that should succeed -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven < 8 ) -with expansion: - 7 < 8 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven > 6 ) -with expansion: - 7 > 6 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven > 0 ) -with expansion: - 7 > 0 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven > -1 ) -with expansion: - 7 > -1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven >= 7 ) -with expansion: - 7 >= 7 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven >= 6 ) -with expansion: - 7 >= 6 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven <= 7 ) -with expansion: - 7 <= 7 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven <= 8 ) -with expansion: - 7 <= 8 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one > 9 ) -with expansion: - 9.1f > 9 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one < 10 ) -with expansion: - 9.1f < 10 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one < 9.2 ) -with expansion: - 9.1f < 9.2 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello <= "hello" ) -with expansion: - "hello" <= "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello >= "hello" ) -with expansion: - "hello" >= "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello < "hellp" ) -with expansion: - "hello" < "hellp" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello < "zebra" ) -with expansion: - "hello" < "zebra" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello > "hellm" ) -with expansion: - "hello" > "hellm" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello > "a" ) -with expansion: - "hello" > "a" - -------------------------------------------------------------------------------- -Ordering comparison checks that should fail -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven > 7 ) -with expansion: - 7 > 7 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven < 7 ) -with expansion: - 7 < 7 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven > 8 ) -with expansion: - 7 > 8 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven < 6 ) -with expansion: - 7 < 6 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven < 0 ) -with expansion: - 7 < 0 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven < -1 ) -with expansion: - 7 < -1 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven >= 8 ) -with expansion: - 7 >= 8 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven <= 6 ) -with expansion: - 7 <= 6 - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one < 9 ) -with expansion: - 9.1f < 9 - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one > 10 ) -with expansion: - 9.1f > 10 - -ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one > 9.2 ) -with expansion: - 9.1f > 9.2 - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello > "hello" ) -with expansion: - "hello" > "hello" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello < "hello" ) -with expansion: - "hello" < "hello" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello > "hellp" ) -with expansion: - "hello" > "hellp" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello > "z" ) -with expansion: - "hello" > "z" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello < "hellm" ) -with expansion: - "hello" < "hellm" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello < "a" ) -with expansion: - "hello" < "a" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello >= "z" ) -with expansion: - "hello" >= "z" - -ConditionTests.cpp:: FAILED: - CHECK( data.str_hello <= "a" ) -with expansion: - "hello" <= "a" + -2147483648 > 2 ------------------------------------------------------------------------------- Comparisons with int literals don't warn when mixing signed/ unsigned @@ -851,390 +707,15 @@ with expansion: 4 ------------------------------------------------------------------------------- -comparisons between int variables +Contains string matcher ------------------------------------------------------------------------------- -ConditionTests.cpp: +MiscTests.cpp: ............................................................................... -ConditionTests.cpp:: -PASSED: - REQUIRE( long_var == unsigned_char_var ) +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Contains( "not there" ) ) with expansion: - 1 == 1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( long_var == unsigned_short_var ) -with expansion: - 1 == 1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( long_var == unsigned_int_var ) -with expansion: - 1 == 1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( long_var == unsigned_long_var ) -with expansion: - 1 == 1 - -------------------------------------------------------------------------------- -comparisons between const int variables -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - REQUIRE( unsigned_char_var == 1 ) -with expansion: - 1 == 1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( unsigned_short_var == 1 ) -with expansion: - 1 == 1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( unsigned_int_var == 1 ) -with expansion: - 1 == 1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( unsigned_long_var == 1 ) -with expansion: - 1 == 1 - -------------------------------------------------------------------------------- -Comparisons between unsigned ints and negative signed ints match c++ standard -behaviour -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - CHECK( ( -1 > 2u ) ) -with expansion: - true - -ConditionTests.cpp:: -PASSED: - CHECK( -1 > 2u ) -with expansion: - -1 > 2 - -ConditionTests.cpp:: -PASSED: - CHECK( ( 2u < -1 ) ) -with expansion: - true - -ConditionTests.cpp:: -PASSED: - CHECK( 2u < -1 ) -with expansion: - 2 < -1 - -ConditionTests.cpp:: -PASSED: - CHECK( ( minInt > 2u ) ) -with expansion: - true - -ConditionTests.cpp:: -PASSED: - CHECK( minInt > 2u ) -with expansion: - -2147483648 > 2 - -------------------------------------------------------------------------------- -Comparisons between ints where one side is computed -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - CHECK( 54 == 6*9 ) -with expansion: - 54 == 54 - -------------------------------------------------------------------------------- -Pointers can be compared to null -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - REQUIRE( p == nullptr ) -with expansion: - NULL == nullptr - -ConditionTests.cpp:: -PASSED: - REQUIRE( p == pNULL ) -with expansion: - NULL == NULL - -ConditionTests.cpp:: -PASSED: - REQUIRE( p != nullptr ) -with expansion: - 0x != nullptr - -ConditionTests.cpp:: -PASSED: - REQUIRE( cp != nullptr ) -with expansion: - 0x != nullptr - -ConditionTests.cpp:: -PASSED: - REQUIRE( cpc != nullptr ) -with expansion: - 0x != nullptr - -ConditionTests.cpp:: -PASSED: - REQUIRE( returnsNull() == nullptr ) -with expansion: - {null string} == nullptr - -ConditionTests.cpp:: -PASSED: - REQUIRE( returnsConstNull() == nullptr ) -with expansion: - {null string} == nullptr - -ConditionTests.cpp:: -PASSED: - REQUIRE( nullptr != p ) -with expansion: - nullptr != 0x - -------------------------------------------------------------------------------- -'Not' checks that should succeed -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - REQUIRE( false == false ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( true == true ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( !false ) -with expansion: - true - -ConditionTests.cpp:: -PASSED: - REQUIRE_FALSE( false ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( !falseValue ) -with expansion: - true - -ConditionTests.cpp:: -PASSED: - REQUIRE_FALSE( falseValue ) -with expansion: - !false - -ConditionTests.cpp:: -PASSED: - REQUIRE( !(1 == 2) ) -with expansion: - true - -ConditionTests.cpp:: -PASSED: - REQUIRE_FALSE( 1 == 2 ) -with expansion: - !(1 == 2) - -------------------------------------------------------------------------------- -'Not' checks that should fail -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: FAILED: - CHECK( false != false ) - -ConditionTests.cpp:: FAILED: - CHECK( true != true ) - -ConditionTests.cpp:: FAILED: - CHECK( !true ) -with expansion: - false - -ConditionTests.cpp:: FAILED: - CHECK_FALSE( true ) - -ConditionTests.cpp:: FAILED: - CHECK( !trueValue ) -with expansion: - false - -ConditionTests.cpp:: FAILED: - CHECK_FALSE( trueValue ) -with expansion: - !true - -ConditionTests.cpp:: FAILED: - CHECK( !(1 == 1) ) -with expansion: - false - -ConditionTests.cpp:: FAILED: - CHECK_FALSE( 1 == 1 ) -with expansion: - !(1 == 1) - -------------------------------------------------------------------------------- -When checked exceptions are thrown they can be expected or unexpected -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: -PASSED: - REQUIRE_THROWS_AS( thisThrows() ) - -ExceptionTests.cpp:: -PASSED: - REQUIRE_NOTHROW( thisDoesntThrow() ) - -ExceptionTests.cpp:: -PASSED: - REQUIRE_THROWS( thisThrows() ) - -------------------------------------------------------------------------------- -Expected exceptions that don't throw or unexpected exceptions fail the test -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - CHECK_THROWS_AS( thisThrows() ) -due to unexpected exception with message: - expected exception - -ExceptionTests.cpp:: FAILED: - CHECK_THROWS_AS( thisDoesntThrow() ) -because no exception was thrown where one was expected: - -ExceptionTests.cpp:: FAILED: - CHECK_NOTHROW( thisThrows() ) -due to unexpected exception with message: - expected exception - -------------------------------------------------------------------------------- -When unchecked exceptions are thrown directly they are always failures -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: -due to unexpected exception with message: - unexpected exception - -------------------------------------------------------------------------------- -An unchecked exception reports the line of the last assertion -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: -PASSED: - CHECK( 1 == 1 ) - -ExceptionTests.cpp:: FAILED: - {Unknown expression after the reported line} -due to unexpected exception with message: - unexpected exception - -------------------------------------------------------------------------------- -When unchecked exceptions are thrown from sections they are always failures - section name -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: -due to unexpected exception with message: - unexpected exception - -------------------------------------------------------------------------------- -When unchecked exceptions are thrown from functions they are always failures -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - CHECK( thisThrows() == 0 ) -due to unexpected exception with message: - expected exception - -------------------------------------------------------------------------------- -When unchecked exceptions are thrown during a REQUIRE the test should abort -fail -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - REQUIRE( thisThrows() == 0 ) -due to unexpected exception with message: - expected exception - -------------------------------------------------------------------------------- -When unchecked exceptions are thrown during a CHECK the test should abort and -fail -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: - CHECK( thisThrows() == 0 ) -due to unexpected exception with message: - expected exception - -------------------------------------------------------------------------------- -Non-std exceptions can be translated -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: -due to unexpected exception with message: - custom exception - -------------------------------------------------------------------------------- -Custom std-exceptions can be custom translated -------------------------------------------------------------------------------- -ExceptionTests.cpp: -............................................................................... - -ExceptionTests.cpp:: FAILED: -due to unexpected exception with message: - custom std exception + "this string contains 'abc' as a substring" contains: "not there" ------------------------------------------------------------------------------- Custom exceptions can be translated when testing for nothrow @@ -1259,24 +740,192 @@ due to unexpected exception with message: custom exception - not std ------------------------------------------------------------------------------- -Unexpected exceptions can be translated +Custom std-exceptions can be custom translated ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... ExceptionTests.cpp:: FAILED: due to unexpected exception with message: - 3.14 + custom std exception ------------------------------------------------------------------------------- -NotImplemented exception +Demonstrate that a non-const == is not used ------------------------------------------------------------------------------- -ExceptionTests.cpp: +TrickyTests.cpp: ............................................................................... -ExceptionTests.cpp:: +TrickyTests.cpp:: PASSED: - REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) ) + REQUIRE( t == 1u ) +with expansion: + {?} == 1 + +------------------------------------------------------------------------------- +EndsWith string matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), EndsWith( "this" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "this" + +------------------------------------------------------------------------------- +Equality checks that should fail +------------------------------------------------------------------------------- +ConditionTests.cpp: +............................................................................... + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven == 6 ) +with expansion: + 7 == 6 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven == 8 ) +with expansion: + 7 == 8 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven == 0 ) +with expansion: + 7 == 0 + +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.11f ) ) +with expansion: + 9.1f == Approx( 9.1099996567 ) + +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 9.0f ) ) +with expansion: + 9.1f == Approx( 9.0 ) + +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 1 ) ) +with expansion: + 9.1f == Approx( 1.0 ) + +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one == Approx( 0 ) ) +with expansion: + 9.1f == Approx( 0.0 ) + +ConditionTests.cpp:: FAILED: + CHECK( data.double_pi == Approx( 3.1415 ) ) +with expansion: + 3.1415926535 == Approx( 3.1415 ) + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello == "goodbye" ) +with expansion: + "hello" == "goodbye" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello == "hell" ) +with expansion: + "hello" == "hell" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello == "hello1" ) +with expansion: + "hello" == "hello1" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello.size() == 6 ) +with expansion: + 5 == 6 + +ConditionTests.cpp:: FAILED: + CHECK( x == Approx( 1.301 ) ) +with expansion: + 1.3 == Approx( 1.301 ) + +------------------------------------------------------------------------------- +Equality checks that should succeed +------------------------------------------------------------------------------- +ConditionTests.cpp: +............................................................................... + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven == 7 ) +with expansion: + 7 == 7 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) +with expansion: + 9.1f == Approx( 9.1000003815 ) + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) +with expansion: + 3.1415926535 == Approx( 3.1415926535 ) + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello == "hello" ) +with expansion: + "hello" == "hello" + +ConditionTests.cpp:: +PASSED: + REQUIRE( "hello" == data.str_hello ) +with expansion: + "hello" == "hello" + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello.size() == 5 ) +with expansion: + 5 == 5 + +ConditionTests.cpp:: +PASSED: + REQUIRE( x == Approx( 1.3 ) ) +with expansion: + 1.3 == Approx( 1.3 ) + +------------------------------------------------------------------------------- +Equals +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "this string contains + 'abc' as a substring" + +------------------------------------------------------------------------------- +Equals string matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), Equals( "something else" ) ) +with expansion: + "this string contains 'abc' as a substring" equals: "something else" + +------------------------------------------------------------------------------- +Equals string matcher, with NULL +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE_THAT( "", Equals(0) ) +with expansion: + "" equals: "" ------------------------------------------------------------------------------- Exception messages can be tested for @@ -1324,1315 +973,78 @@ PASSED: REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) ) ------------------------------------------------------------------------------- -Mismatching exception messages failing the test +Expected exceptions that don't throw or unexpected exceptions fail the test ------------------------------------------------------------------------------- ExceptionTests.cpp: ............................................................................... -ExceptionTests.cpp:: -PASSED: - REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +ExceptionTests.cpp:: FAILED: + CHECK_THROWS_AS( thisThrows() ) +due to unexpected exception with message: + expected exception ExceptionTests.cpp:: FAILED: - REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) -with expansion: + CHECK_THROWS_AS( thisDoesntThrow() ) +because no exception was thrown where one was expected: + +ExceptionTests.cpp:: FAILED: + CHECK_NOTHROW( thisThrows() ) +due to unexpected exception with message: expected exception ------------------------------------------------------------------------------- -Generators over two ranges +FAIL aborts the test ------------------------------------------------------------------------------- -GeneratorTests.cpp: +MessageTests.cpp: ............................................................................... -GeneratorTests.cpp:: +MessageTests.cpp:: FAILED: +explicitly with message: + This is a failure + +------------------------------------------------------------------------------- +FAIL does not require an argument +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + +------------------------------------------------------------------------------- +Factorials are computed +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + REQUIRE( Factorial(0) == 1 ) +with expansion: + 1 == 1 + +MiscTests.cpp:: +PASSED: + REQUIRE( Factorial(1) == 1 ) +with expansion: + 1 == 1 + +MiscTests.cpp:: +PASSED: + REQUIRE( Factorial(2) == 2 ) with expansion: 2 == 2 -GeneratorTests.cpp:: +MiscTests.cpp:: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) + REQUIRE( Factorial(3) == 6 ) with expansion: 6 == 6 -GeneratorTests.cpp:: +MiscTests.cpp:: PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) + REQUIRE( Factorial(10) == 3628800 ) with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 200 == 200 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 202 == 202 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 204 == 204 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 206 == 206 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 208 == 208 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 210 == 210 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 212 == 212 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 2 == 2 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 4 == 4 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 6 == 6 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 8 == 8 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 10 == 10 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 30 == 30 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 40 == 40 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 42 == 42 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 - -------------------------------------------------------------------------------- -Generators over two ranges -------------------------------------------------------------------------------- -GeneratorTests.cpp: -............................................................................... - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) -with expansion: - 72 == 72 - -GeneratorTests.cpp:: -PASSED: - CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) -with expansion: - 214 == 214 + 3628800 (0x) == 3628800 (0x) ------------------------------------------------------------------------------- Generator over a range of pairs @@ -2658,6 +1070,1332 @@ PASSED: with expansion: 2 == 2 +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 200 == 200 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 202 == 202 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 204 == 204 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 206 == 206 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 208 == 208 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 210 == 210 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 212 == 212 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 2 == 2 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 4 == 4 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 6 == 6 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 8 == 8 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 10 == 10 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 30 == 30 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 40 == 40 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 42 == 42 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Generators over two ranges +------------------------------------------------------------------------------- +GeneratorTests.cpp: +............................................................................... + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) +with expansion: + 72 == 72 + +GeneratorTests.cpp:: +PASSED: + CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) +with expansion: + 214 == 214 + +------------------------------------------------------------------------------- +Greater-than inequalities with different epsilons +------------------------------------------------------------------------------- +ApproxTests.cpp: +............................................................................... + +ApproxTests.cpp:: +PASSED: + REQUIRE( d >= Approx( 1.22 ) ) +with expansion: + 1.23 >= Approx( 1.22 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( d >= Approx( 1.23 ) ) +with expansion: + 1.23 >= Approx( 1.23 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE_FALSE( d >= Approx( 1.24 ) ) +with expansion: + !(1.23 >= Approx( 1.24 )) + +ApproxTests.cpp:: +PASSED: + REQUIRE( d >= Approx( 1.24 ).epsilon(0.1) ) +with expansion: + 1.23 >= Approx( 1.24 ) + ------------------------------------------------------------------------------- INFO and WARN do not abort tests ------------------------------------------------------------------------------- @@ -2669,17 +2407,6 @@ warning: this is a message this is a warning -------------------------------------------------------------------------------- -SUCCEED counts as a test pass -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: -PASSED: -with message: - this is a success - ------------------------------------------------------------------------------- INFO gets logged on failure ------------------------------------------------------------------------------- @@ -2731,1726 +2458,137 @@ with message: but not this ------------------------------------------------------------------------------- -FAIL aborts the test +Inequality checks that should fail ------------------------------------------------------------------------------- -MessageTests.cpp: +ConditionTests.cpp: ............................................................................... -MessageTests.cpp:: FAILED: -explicitly with message: - This is a failure - -------------------------------------------------------------------------------- -FAIL does not require an argument -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: - -------------------------------------------------------------------------------- -SUCCESS does not require an argument -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -Output from all sections is reported - one -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: -explicitly with message: - Message from section one - -------------------------------------------------------------------------------- -Output from all sections is reported - two -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: -explicitly with message: - Message from section two - -Message from section one -------------------------------------------------------------------------------- -Standard output from all sections is reported - one -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - - -No assertions in section 'one' - -Message from section two -------------------------------------------------------------------------------- -Standard output from all sections is reported - two -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - - -No assertions in section 'two' - -------------------------------------------------------------------------------- -SCOPED_INFO is reset for each loop -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 0 < 10 -with messages: - current counter 0 - i := 0 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 1 < 10 -with messages: - current counter 1 - i := 1 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 2 < 10 -with messages: - current counter 2 - i := 2 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 3 < 10 -with messages: - current counter 3 - i := 3 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 4 < 10 -with messages: - current counter 4 - i := 4 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 5 < 10 -with messages: - current counter 5 - i := 5 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 6 < 10 -with messages: - current counter 6 - i := 6 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 7 < 10 -with messages: - current counter 7 - i := 7 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 8 < 10 -with messages: - current counter 8 - i := 8 - -MessageTests.cpp:: -PASSED: - REQUIRE( i < 10 ) -with expansion: - 9 < 10 -with messages: - current counter 9 - i := 9 - -MessageTests.cpp:: FAILED: - REQUIRE( i < 10 ) -with expansion: - 10 < 10 -with messages: - current counter 10 - i := 10 - -------------------------------------------------------------------------------- -The NO_FAIL macro reports a failure but does not fail the test -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: -FAILED - but was ok: - CHECK_NOFAIL( 1 == 2 ) - -------------------------------------------------------------------------------- -just failure -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: -explicitly with message: - Previous info should not be seen - -------------------------------------------------------------------------------- -sends information to INFO -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: FAILED: - REQUIRE( false ) -with messages: - hi - i := 7 - -------------------------------------------------------------------------------- -Pointers can be converted to strings -------------------------------------------------------------------------------- -MessageTests.cpp: -............................................................................... - -MessageTests.cpp:: -warning: - actual address of p: 0x - -MessageTests.cpp:: -warning: - toString(p): 0x - -------------------------------------------------------------------------------- -random SECTION tests - s1 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( a != b ) -with expansion: - 1 != 2 - -MiscTests.cpp:: -PASSED: - REQUIRE( b != a ) -with expansion: - 2 != 1 - -------------------------------------------------------------------------------- -random SECTION tests - s2 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( a != b ) -with expansion: - 1 != 2 - -------------------------------------------------------------------------------- -nested SECTION tests - s1 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( a != b ) -with expansion: - 1 != 2 - -MiscTests.cpp:: -PASSED: - REQUIRE( b != a ) -with expansion: - 2 != 1 - -------------------------------------------------------------------------------- -nested SECTION tests - s1 - s2 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( a != b ) -with expansion: - 1 != 2 - -------------------------------------------------------------------------------- -more nested SECTION tests - s1 - s2 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - REQUIRE( a == b ) -with expansion: - 1 == 2 - -------------------------------------------------------------------------------- -more nested SECTION tests - s1 - s3 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( a != b ) -with expansion: - 1 != 2 - -------------------------------------------------------------------------------- -more nested SECTION tests - s1 - s4 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( a < b ) -with expansion: - 1 < 2 - -------------------------------------------------------------------------------- -even more nested SECTION tests - c - d (leaf) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -even more nested SECTION tests - c - e (leaf) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -even more nested SECTION tests - f (leaf) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -looped SECTION tests - s1 -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK( b > a ) -with expansion: - 0 > 1 - -------------------------------------------------------------------------------- -looped tests -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -with message: - Testing if fib[0] (1) is even - -MiscTests.cpp:: FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -with message: - Testing if fib[1] (1) is even - -MiscTests.cpp:: -PASSED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 0 == 0 -with message: - Testing if fib[2] (2) is even - -MiscTests.cpp:: FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -with message: - Testing if fib[3] (3) is even - -MiscTests.cpp:: FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -with message: - Testing if fib[4] (5) is even - -MiscTests.cpp:: -PASSED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 0 == 0 -with message: - Testing if fib[5] (8) is even - -MiscTests.cpp:: FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -with message: - Testing if fib[6] (13) is even - -MiscTests.cpp:: FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -with message: - Testing if fib[7] (21) is even - -A string sent directly to stdout -A string sent directly to stderr -------------------------------------------------------------------------------- -null strings -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( makeString( false ) != static_cast(nullptr) ) -with expansion: - "valid string" != {null string} - -MiscTests.cpp:: -PASSED: - REQUIRE( makeString( true ) == static_cast(nullptr) ) -with expansion: - {null string} == {null string} - -------------------------------------------------------------------------------- -checkedIf -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECKED_IF( flag ) -with expansion: - true - -MiscTests.cpp:: -PASSED: - REQUIRE( testCheckedIf( true ) ) -with expansion: - true - -------------------------------------------------------------------------------- -checkedIf, failing -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECKED_IF( flag ) -with expansion: - false - -MiscTests.cpp:: FAILED: - REQUIRE( testCheckedIf( false ) ) -with expansion: - false - -------------------------------------------------------------------------------- -checkedElse -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECKED_ELSE( flag ) -with expansion: - true - -MiscTests.cpp:: -PASSED: - REQUIRE( testCheckedElse( true ) ) -with expansion: - true - -------------------------------------------------------------------------------- -checkedElse, failing -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECKED_ELSE( flag ) -with expansion: - false - -MiscTests.cpp:: FAILED: - REQUIRE( testCheckedElse( false ) ) -with expansion: - false - -------------------------------------------------------------------------------- -xmlentitycheck - embedded xml -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -xmlentitycheck - encoded chars -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -send a single char to INFO -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - REQUIRE( false ) -with message: - 3 - -------------------------------------------------------------------------------- -atomic if -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( x == 0 ) -with expansion: - 0 == 0 - -------------------------------------------------------------------------------- -String matchers -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE_THAT( testStringForMatching(), Contains( "string" ) ) -with expansion: - "this string contains 'abc' as a substring" contains: "string" - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), Contains( "abc" ) ) -with expansion: - "this string contains 'abc' as a substring" contains: "abc" - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), StartsWith( "this" ) ) -with expansion: - "this string contains 'abc' as a substring" starts with: "this" - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), EndsWith( "substring" ) ) -with expansion: - "this string contains 'abc' as a substring" ends with: "substring" - -------------------------------------------------------------------------------- -Contains string matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), Contains( "not there" ) ) -with expansion: - "this string contains 'abc' as a substring" contains: "not there" - -------------------------------------------------------------------------------- -StartsWith string matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), StartsWith( "string" ) ) -with expansion: - "this string contains 'abc' as a substring" starts with: "string" - -------------------------------------------------------------------------------- -EndsWith string matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), EndsWith( "this" ) ) -with expansion: - "this string contains 'abc' as a substring" ends with: "this" - -------------------------------------------------------------------------------- -Equals string matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), Equals( "something else" ) ) -with expansion: - "this string contains 'abc' as a substring" equals: "something else" - -------------------------------------------------------------------------------- -Equals string matcher, with NULL -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE_THAT( "", Equals(nullptr) ) -with expansion: - "" equals: "" - -------------------------------------------------------------------------------- -AllOf matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) ) -with expansion: - "this string contains 'abc' as a substring" ( contains: "string" and - contains: "abc" ) - -------------------------------------------------------------------------------- -AnyOf matcher -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) ) -with expansion: - "this string contains 'abc' as a substring" ( contains: "string" or contains: - "not there" ) - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) ) -with expansion: - "this string contains 'abc' as a substring" ( contains: "not there" or - contains: "string" ) - -------------------------------------------------------------------------------- -Equals -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ) -with expansion: - "this string contains 'abc' as a substring" equals: "this string contains - 'abc' as a substring" - -------------------------------------------------------------------------------- -Matchers can be (AllOf) composed with the && operator -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), Contains( "string" ) && Contains( "abc" ) && Contains( "substring" ) && Contains( "contains" ) ) -with expansion: - "this string contains 'abc' as a substring" ( contains: "string" and - contains: "abc" and contains: "substring" and contains: "contains" ) - -------------------------------------------------------------------------------- -Matchers can be (AnyOf) composed with the || operator -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) ) -with expansion: - "this string contains 'abc' as a substring" ( contains: "string" or contains: - "different" or contains: "random" ) - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) ) -with expansion: - "some completely different text that contains one common word" ( contains: - "string" or contains: "different" or contains: "random" ) - -------------------------------------------------------------------------------- -Matchers can be composed with both && and || -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) ) -with expansion: - "this string contains 'abc' as a substring" ( ( contains: "string" or - contains: "different" ) and contains: "substring" ) - -------------------------------------------------------------------------------- -Matchers can be composed with both && and || - failing -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) ) -with expansion: - "this string contains 'abc' as a substring" ( ( contains: "string" or - contains: "different" ) and contains: "random" ) - -------------------------------------------------------------------------------- -Matchers can be negated (Not) with the ! operator -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK_THAT( testStringForMatching(), !Contains( "different" ) ) -with expansion: - "this string contains 'abc' as a substring" not contains: "different" - -------------------------------------------------------------------------------- -Matchers can be negated (Not) with the ! operator - failing -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK_THAT( testStringForMatching(), !Contains( "substring" ) ) -with expansion: - "this string contains 'abc' as a substring" not contains: "substring" - -------------------------------------------------------------------------------- -Factorials are computed -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( Factorial(0) == 1 ) -with expansion: - 1 == 1 - -MiscTests.cpp:: -PASSED: - REQUIRE( Factorial(1) == 1 ) -with expansion: - 1 == 1 - -MiscTests.cpp:: -PASSED: - REQUIRE( Factorial(2) == 2 ) -with expansion: - 2 == 2 - -MiscTests.cpp:: -PASSED: - REQUIRE( Factorial(3) == 6 ) -with expansion: - 6 == 6 - -MiscTests.cpp:: -PASSED: - REQUIRE( Factorial(10) == 3628800 ) -with expansion: - 3628800 (0x) == 3628800 (0x) - -------------------------------------------------------------------------------- -Nice descriptive name -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -warning: - This one ran - -------------------------------------------------------------------------------- -vectors can be sized and resized -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 5 ) -with expansion: - 5 == 5 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 5 ) -with expansion: - 5 >= 5 - -------------------------------------------------------------------------------- -vectors can be sized and resized - resizing bigger changes size and capacity -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 10 ) -with expansion: - 10 == 10 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 10 ) -with expansion: - 10 >= 10 - -------------------------------------------------------------------------------- -vectors can be sized and resized -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 5 ) -with expansion: - 5 == 5 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 5 ) -with expansion: - 5 >= 5 - -------------------------------------------------------------------------------- -vectors can be sized and resized - resizing smaller changes size but not capacity -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 0 ) -with expansion: - 0 == 0 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 5 ) -with expansion: - 5 >= 5 - -------------------------------------------------------------------------------- -vectors can be sized and resized - resizing smaller changes size but not capacity - We can use the 'swap trick' to reset the capacity -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() == 0 ) -with expansion: - 0 == 0 - -------------------------------------------------------------------------------- -vectors can be sized and resized -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 5 ) -with expansion: - 5 == 5 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 5 ) -with expansion: - 5 >= 5 - -------------------------------------------------------------------------------- -vectors can be sized and resized - reserving bigger changes capacity but not size -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 5 ) -with expansion: - 5 == 5 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 10 ) -with expansion: - 10 >= 10 - -------------------------------------------------------------------------------- -vectors can be sized and resized -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 5 ) -with expansion: - 5 == 5 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 5 ) -with expansion: - 5 >= 5 - -------------------------------------------------------------------------------- -vectors can be sized and resized - reserving smaller does not change size or capacity -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( v.size() == 5 ) -with expansion: - 5 == 5 - -MiscTests.cpp:: -PASSED: - REQUIRE( v.capacity() >= 5 ) -with expansion: - 5 >= 5 - -------------------------------------------------------------------------------- -A couple of nested sections followed by a failure - Outer - Inner -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: -with message: - that's not flying - that's failing in style - -------------------------------------------------------------------------------- -A couple of nested sections followed by a failure -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: -explicitly with message: - to infinity and beyond - -------------------------------------------------------------------------------- -not allowed -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -Tabs and newlines show in output -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: FAILED: - CHECK( s1 == s2 ) -with expansion: - "if ($b == 10) { - $a= 20; - }" - == - "if ($b == 10) { - $a = 20; - } - " - -------------------------------------------------------------------------------- -toString on const wchar_t const pointer returns the string contents -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK( result == "\"wide load\"" ) -with expansion: - ""wide load"" == ""wide load"" - -------------------------------------------------------------------------------- -toString on const wchar_t pointer returns the string contents -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK( result == "\"wide load\"" ) -with expansion: - ""wide load"" == ""wide load"" - -------------------------------------------------------------------------------- -toString on wchar_t const pointer returns the string contents -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK( result == "\"wide load\"" ) -with expansion: - ""wide load"" == ""wide load"" - -------------------------------------------------------------------------------- -toString on wchar_t returns the string contents -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - CHECK( result == "\"wide load\"" ) -with expansion: - ""wide load"" == ""wide load"" - -------------------------------------------------------------------------------- -XmlEncode - normal string -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "normal string" ) == "normal string" ) -with expansion: - "normal string" == "normal string" - -------------------------------------------------------------------------------- -XmlEncode - empty string -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "" ) == "" ) -with expansion: - "" == "" - -------------------------------------------------------------------------------- -XmlEncode - string with ampersand -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "smith & jones" ) == "smith & jones" ) -with expansion: - "smith & jones" == "smith & jones" - -------------------------------------------------------------------------------- -XmlEncode - string with less-than -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "smith < jones" ) == "smith < jones" ) -with expansion: - "smith < jones" == "smith < jones" - -------------------------------------------------------------------------------- -XmlEncode - string with greater-than -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "smith > jones" ) == "smith > jones" ) -with expansion: - "smith > jones" == "smith > jones" - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "smith ]]> jones" ) == "smith ]]> jones" ) -with expansion: - "smith ]]> jones" - == - "smith ]]> jones" - -------------------------------------------------------------------------------- -XmlEncode - string with quotes -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( stringWithQuotes ) == stringWithQuotes ) -with expansion: - "don't "quote" me on that" - == - "don't "quote" me on that" - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" ) -with expansion: - "don't "quote" me on that" - == - "don't "quote" me on that" - -------------------------------------------------------------------------------- -XmlEncode - string with control char (1) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "[\x01]" ) == "[]" ) -with expansion: - "[]" == "[]" - -------------------------------------------------------------------------------- -XmlEncode - string with control char (x7F) -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( encode( "[\x7F]" ) == "[]" ) -with expansion: - "[]" == "[]" - -------------------------------------------------------------------------------- -long long -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: - REQUIRE( l == std::numeric_limits::max() ) -with expansion: - 9223372036854775807 (0x) - == - 9223372036854775807 (0x) - -------------------------------------------------------------------------------- -This test 'should' fail but doesn't -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: -with message: - oops! - -------------------------------------------------------------------------------- -# A test name that starts with a # -------------------------------------------------------------------------------- -MiscTests.cpp: -............................................................................... - -MiscTests.cpp:: -PASSED: -with message: - yay - -------------------------------------------------------------------------------- -Process can be configured on command line - default - no arguments -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - CHECK( config.shouldDebugBreak == false ) -with expansion: - false == false - -TestMain.cpp:: -PASSED: - CHECK( config.abortAfter == -1 ) -with expansion: - -1 == -1 - -TestMain.cpp:: -PASSED: - CHECK( config.noThrow == false ) -with expansion: - false == false - -TestMain.cpp:: -PASSED: - CHECK( config.reporterNames.empty() ) -with expansion: - true - -------------------------------------------------------------------------------- -Process can be configured on command line - test lists - 1 test -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( cfg.testSpec().matches( fakeTestCase( "notIncluded" ) ) == false ) -with expansion: - false == false - -TestMain.cpp:: -PASSED: - REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) ) -with expansion: - true - -------------------------------------------------------------------------------- -Process can be configured on command line - test lists - Specify one test case exclusion using exclude: -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false ) -with expansion: - false == false - -TestMain.cpp:: -PASSED: - REQUIRE( cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) ) -with expansion: - true - -------------------------------------------------------------------------------- -Process can be configured on command line - test lists - Specify one test case exclusion using ~ -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false ) -with expansion: - false == false - -TestMain.cpp:: -PASSED: - REQUIRE( cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) ) -with expansion: - true - -------------------------------------------------------------------------------- -Process can be configured on command line - reporter - -r/console -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.reporterNames[0] == "console" ) -with expansion: - "console" == "console" - -------------------------------------------------------------------------------- -Process can be configured on command line - reporter - -r/xml -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.reporterNames[0] == "xml" ) -with expansion: - "xml" == "xml" - -------------------------------------------------------------------------------- -Process can be configured on command line - reporter - -r xml and junit -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.reporterNames.size() == 2 ) -with expansion: - 2 == 2 - -TestMain.cpp:: -PASSED: - REQUIRE( config.reporterNames[0] == "xml" ) +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven != 7 ) with expansion: - "xml" == "xml" + 7 != 7 -TestMain.cpp:: -PASSED: - REQUIRE( config.reporterNames[1] == "junit" ) +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one != Approx( 9.1f ) ) with expansion: - "junit" == "junit" - -------------------------------------------------------------------------------- -Process can be configured on command line - reporter - --reporter/junit -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + 9.1f != Approx( 9.1000003815 ) -TestMain.cpp:: -PASSED: - REQUIRE( config.reporterNames[0] == "junit" ) +ConditionTests.cpp:: FAILED: + CHECK( data.double_pi != Approx( 3.1415926535 ) ) with expansion: - "junit" == "junit" - -------------------------------------------------------------------------------- -Process can be configured on command line - debugger - -b -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + 3.1415926535 != Approx( 3.1415926535 ) -TestMain.cpp:: -PASSED: - REQUIRE( config.shouldDebugBreak == true ) +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello != "hello" ) with expansion: - true == true - -------------------------------------------------------------------------------- -Process can be configured on command line - debugger - --break -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + "hello" != "hello" -TestMain.cpp:: -PASSED: - REQUIRE( config.shouldDebugBreak ) +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello.size() != 5 ) with expansion: - true + 5 != 5 ------------------------------------------------------------------------------- -Process can be configured on command line - abort - -a aborts after first failure +Inequality checks that should succeed ------------------------------------------------------------------------------- -TestMain.cpp: +ConditionTests.cpp: ............................................................................... -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.abortAfter == 1 ) + REQUIRE( data.int_seven != 6 ) with expansion: - 1 == 1 - -------------------------------------------------------------------------------- -Process can be configured on command line - abort - -x 2 aborts after two failures -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + 7 != 6 -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - REQUIRE( config.abortAfter == 2 ) + REQUIRE( data.int_seven != 8 ) with expansion: - 2 == 2 + 7 != 8 -------------------------------------------------------------------------------- -Process can be configured on command line - abort - -x must be greater than zero -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ), Contains( "greater than zero" ) ) + REQUIRE( data.float_nine_point_one != Approx( 9.11f ) ) with expansion: - "Value after -x or --abortAfter must be greater than zero - - while parsing: (-x, --abortx )" contains: "greater than zero" - -------------------------------------------------------------------------------- -Process can be configured on command line - abort - -x must be numeric -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... + 9.1f != Approx( 9.1099996567 ) -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ), Contains( "-x" ) ) + REQUIRE( data.float_nine_point_one != Approx( 9.0f ) ) with expansion: - "Unable to convert oops to destination type - - while parsing: (-x, --abortx )" contains: "-x" + 9.1f != Approx( 9.0 ) -------------------------------------------------------------------------------- -Process can be configured on command line - nothrow - -e -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.noThrow == true ) + REQUIRE( data.float_nine_point_one != Approx( 1 ) ) with expansion: - true == true - -------------------------------------------------------------------------------- -Process can be configured on command line - nothrow - --nothrow -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + 9.1f != Approx( 1.0 ) -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - REQUIRE( config.noThrow == true ) + REQUIRE( data.float_nine_point_one != Approx( 0 ) ) with expansion: - true == true - -------------------------------------------------------------------------------- -Process can be configured on command line - output filename - -o filename -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... + 9.1f != Approx( 0.0 ) -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.outputFilename == "filename.ext" ) + REQUIRE( data.double_pi != Approx( 3.1415 ) ) with expansion: - "filename.ext" == "filename.ext" - -------------------------------------------------------------------------------- -Process can be configured on command line - output filename - --out -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + 3.1415926535 != Approx( 3.1415 ) -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - REQUIRE( config.outputFilename == "filename.ext" ) + REQUIRE( data.str_hello != "goodbye" ) with expansion: - "filename.ext" == "filename.ext" + "hello" != "goodbye" -------------------------------------------------------------------------------- -Process can be configured on command line - combinations - Single character flags can be combined -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - CHECK( config.abortAfter == 1 ) + REQUIRE( data.str_hello != "hell" ) with expansion: - 1 == 1 + "hello" != "hell" -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - CHECK( config.shouldDebugBreak ) + REQUIRE( data.str_hello != "hello1" ) with expansion: - true + "hello" != "hello1" -TestMain.cpp:: +ConditionTests.cpp:: PASSED: - CHECK( config.noThrow == true ) + REQUIRE( data.str_hello.size() != 6 ) with expansion: - true == true + 5 != 6 ------------------------------------------------------------------------------- -Process can be configured on command line - use-colour - without option +Less-than inequalities with different epsilons ------------------------------------------------------------------------------- -TestMain.cpp: +ApproxTests.cpp: ............................................................................... -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: +ApproxTests.cpp:: PASSED: - REQUIRE( config.useColour == UseColour::Auto ) + REQUIRE( d <= Approx( 1.24 ) ) with expansion: - 0 == 0 + 1.23 <= Approx( 1.24 ) -------------------------------------------------------------------------------- -Process can be configured on command line - use-colour - auto -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: +ApproxTests.cpp:: PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.useColour == UseColour::Auto ) + REQUIRE( d <= Approx( 1.23 ) ) with expansion: - 0 == 0 - -------------------------------------------------------------------------------- -Process can be configured on command line - use-colour - yes -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + 1.23 <= Approx( 1.23 ) -TestMain.cpp:: +ApproxTests.cpp:: PASSED: - REQUIRE( config.useColour == UseColour::Yes ) + REQUIRE_FALSE( d <= Approx( 1.22 ) ) with expansion: - 1 == 1 - -------------------------------------------------------------------------------- -Process can be configured on command line - use-colour - no -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... + !(1.23 <= Approx( 1.22 )) -TestMain.cpp:: +ApproxTests.cpp:: PASSED: - CHECK_NOTHROW( parseIntoConfig( argv, config ) ) - -TestMain.cpp:: -PASSED: - REQUIRE( config.useColour == UseColour::No ) + REQUIRE( d <= Approx( 1.22 ).epsilon(0.1) ) with expansion: - 2 == 2 - -------------------------------------------------------------------------------- -Process can be configured on command line - use-colour - error -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - REQUIRE_THROWS_WITH( parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) ) + 1.23 <= Approx( 1.22 ) ------------------------------------------------------------------------------- Long strings can be wrapped @@ -4794,13 +2932,9 @@ TestMain.cpp: TestMain.cpp:: PASSED: - CHECK( Text( "abcdef\n", TextAttributes().setWidth( 10 ) ).toString() == "abcdef\n" ) + CHECK( Text( "abcdef\n", TextAttributes().setWidth( 10 ) ).toString() == "abcdef" ) with expansion: - "abcdef - " - == - "abcdef - " + "abcdef" == "abcdef" TestMain.cpp:: PASSED: @@ -4810,13 +2944,19 @@ with expansion: TestMain.cpp:: PASSED: - CHECK( Text( "abcdef\n", TextAttributes().setWidth( 6 ) ).toString() == "abcdef\n" ) + CHECK( Text( "abcdef\n", TextAttributes().setWidth( 6 ) ).toString() == "abcdef" ) with expansion: - "abcdef - " + "abcdef" == "abcdef" + +TestMain.cpp:: +PASSED: + CHECK( Text( "abcdef\n", TextAttributes().setWidth( 5 ) ).toString() == "abcd-\nef" ) +with expansion: + "abcd- + ef" == - "abcdef - " + "abcd- + ef" ------------------------------------------------------------------------------- Long strings can be wrapped @@ -4886,181 +3026,107 @@ with expansion: ------------------------------------------------------------------------------- Long strings can be wrapped - With tabs + With wrap-before/ after characters + No wrapping ------------------------------------------------------------------------------- TestMain.cpp: ............................................................................... TestMain.cpp:: PASSED: - CHECK( Text( testString, TextAttributes().setWidth( 15 ) ).toString() == "one two three\n four\n five\n six" ) + CHECK( Text( testString, TextAttributes().setWidth( 80 ) ).toString() == testString ) with expansion: - "one two three - four - five - six" + "one,two(three) " == - "one two three - four - five - six" - -------------------------------------------------------------------------------- -replaceInPlace - replace single char -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... + "one,two(three) " TestMain.cpp:: PASSED: - CHECK( replaceInPlace( letters, "b", "z" ) ) + CHECK( Text( testString, TextAttributes().setWidth( 24 ) ).toString() == testString ) with expansion: - true - -TestMain.cpp:: -PASSED: - CHECK( letters == "azcdefcg" ) -with expansion: - "azcdefcg" == "azcdefcg" - -------------------------------------------------------------------------------- -replaceInPlace - replace two chars -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( replaceInPlace( letters, "c", "z" ) ) -with expansion: - true - -TestMain.cpp:: -PASSED: - CHECK( letters == "abzdefzg" ) -with expansion: - "abzdefzg" == "abzdefzg" - -------------------------------------------------------------------------------- -replaceInPlace - replace first char -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( replaceInPlace( letters, "a", "z" ) ) -with expansion: - true - -TestMain.cpp:: -PASSED: - CHECK( letters == "zbcdefcg" ) -with expansion: - "zbcdefcg" == "zbcdefcg" - -------------------------------------------------------------------------------- -replaceInPlace - replace last char -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( replaceInPlace( letters, "g", "z" ) ) -with expansion: - true - -TestMain.cpp:: -PASSED: - CHECK( letters == "abcdefcz" ) -with expansion: - "abcdefcz" == "abcdefcz" - -------------------------------------------------------------------------------- -replaceInPlace - replace all chars -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( replaceInPlace( letters, letters, "replaced" ) ) -with expansion: - true - -TestMain.cpp:: -PASSED: - CHECK( letters == "replaced" ) -with expansion: - "replaced" == "replaced" - -------------------------------------------------------------------------------- -replaceInPlace - replace no chars -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK_FALSE( replaceInPlace( letters, "x", "z" ) ) -with expansion: - !false - -TestMain.cpp:: -PASSED: - CHECK( letters == letters ) -with expansion: - "abcdefcg" == "abcdefcg" - -------------------------------------------------------------------------------- -replaceInPlace - escape ' -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( replaceInPlace( s, "'", "|'" ) ) -with expansion: - true - -TestMain.cpp:: -PASSED: - CHECK( s == "didn|'t" ) -with expansion: - "didn|'t" == "didn|'t" - -hello -hello -------------------------------------------------------------------------------- -Text can be formatted using the Text class -------------------------------------------------------------------------------- -TestMain.cpp: -............................................................................... - -TestMain.cpp:: -PASSED: - CHECK( Text( "hi there" ).toString() == "hi there" ) -with expansion: - "hi there" == "hi there" - -TestMain.cpp:: -PASSED: - CHECK( Text( "hi there", narrow ).toString() == "hi\nthere" ) -with expansion: - "hi - there" + "one,two(three) " == - "hi - there" + "one,two(three) " + +------------------------------------------------------------------------------- +Long strings can be wrapped + With wrap-before/ after characters + Wrap before +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( Text( testString, TextAttributes().setWidth( 11 ) ).toString() == "one,two\n(three)\n" ) +with expansion: + "one,two + (three) + " + == + "one,two + (three) + " + +------------------------------------------------------------------------------- +Long strings can be wrapped + With wrap-before/ after characters + Wrap after +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( Text( testString, TextAttributes().setWidth( 6 ) ).toString() == "one,\ntwo\n(thre-\ne)\n" ) +with expansion: + "one, + two + (thre- + e) + " + == + "one, + two + (thre- + e) + " + +TestMain.cpp:: +PASSED: + CHECK( Text( testString, TextAttributes().setWidth( 5 ) ).toString() == "one,\ntwo\n(thr-\nee)\n" ) +with expansion: + "one, + two + (thr- + ee) + " + == + "one, + two + (thr- + ee) + " + +TestMain.cpp:: +PASSED: + CHECK( Text( testString, TextAttributes().setWidth( 4 ) ).toString() == "one,\ntwo\n(th-\nree)\n" ) +with expansion: + "one, + two + (th- + ree) + " + == + "one, + two + (th- + ree) + " ------------------------------------------------------------------------------- Long text is truncted @@ -6086,214 +4152,130 @@ with message: was called ------------------------------------------------------------------------------- -Parsing a std::pair +Matchers can be (AllOf) composed with the && operator ------------------------------------------------------------------------------- -TrickyTests.cpp: +MiscTests.cpp: ............................................................................... -TrickyTests.cpp:: +MiscTests.cpp:: PASSED: - REQUIRE( (std::pair( 1, 2 )) == aNicePair ) + CHECK_THAT( testStringForMatching(), Contains( "string" ) && Contains( "abc" ) && Contains( "substring" ) && Contains( "contains" ) ) with expansion: - std::pair( 1, 2 ) == std::pair( 1, 2 ) + "this string contains 'abc' as a substring" ( contains: "string" and + contains: "abc" and contains: "substring" and contains: "contains" ) ------------------------------------------------------------------------------- -Where there is more to the expression after the RHS +Matchers can be (AnyOf) composed with the || operator ------------------------------------------------------------------------------- -TrickyTests.cpp: +MiscTests.cpp: ............................................................................... -TrickyTests.cpp:: +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( contains: "string" or contains: + "different" or contains: "random" ) + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) ) +with expansion: + "some completely different text that contains one common word" ( contains: + "string" or contains: "different" or contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be composed with both && and || +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "substring" ) + +------------------------------------------------------------------------------- +Matchers can be composed with both && and || - failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) ) +with expansion: + "this string contains 'abc' as a substring" ( ( contains: "string" or + contains: "different" ) and contains: "random" ) + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), !Contains( "different" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "different" + +------------------------------------------------------------------------------- +Matchers can be negated (Not) with the ! operator - failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), !Contains( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" not contains: "substring" + +------------------------------------------------------------------------------- +Mismatching exception messages failing the test +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: +PASSED: + REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) + +ExceptionTests.cpp:: FAILED: + REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) +with expansion: + expected exception + +------------------------------------------------------------------------------- +Nice descriptive name +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: warning: - Uncomment the code in this test to check that it gives a sensible compiler - error + This one ran ------------------------------------------------------------------------------- -Where the LHS is not a simple value +Non-std exceptions can be translated ------------------------------------------------------------------------------- -TrickyTests.cpp: +ExceptionTests.cpp: ............................................................................... -TrickyTests.cpp:: -warning: - Uncomment the code in this test to check that it gives a sensible compiler - error +ExceptionTests.cpp:: FAILED: +due to unexpected exception with message: + custom exception ------------------------------------------------------------------------------- -A failing expression with a non streamable type is still captured +NotImplemented exception ------------------------------------------------------------------------------- -TrickyTests.cpp: +ExceptionTests.cpp: ............................................................................... -TrickyTests.cpp:: FAILED: - CHECK( &o1 == &o2 ) -with expansion: - 0x == 0x - -TrickyTests.cpp:: FAILED: - CHECK( o1 == o2 ) -with expansion: - {?} == {?} - -------------------------------------------------------------------------------- -string literals of different sizes can be compared -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: FAILED: - REQUIRE( std::string( "first" ) == "second" ) -with expansion: - "first" == "second" - -------------------------------------------------------------------------------- -An expression with side-effects should only be evaluated once -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: +ExceptionTests.cpp:: PASSED: - REQUIRE( i++ == 7 ) -with expansion: - 7 == 7 - -TrickyTests.cpp:: -PASSED: - REQUIRE( i++ == 8 ) -with expansion: - 8 == 8 - -------------------------------------------------------------------------------- -Operators at different namespace levels not hijacked by Koenig lookup -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( 0x == o ) -with expansion: - 3221225472 (0x) == {?} - -------------------------------------------------------------------------------- -Demonstrate that a non-const == is not used -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( t == 1u ) -with expansion: - {?} == 1 - -------------------------------------------------------------------------------- -Test enum bit values -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( 0x == bit30and31 ) -with expansion: - 3221225472 (0x) == 3221225472 - -------------------------------------------------------------------------------- -boolean member -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( obj.prop != nullptr ) -with expansion: - 0x != nullptr - -------------------------------------------------------------------------------- -(unimplemented) static bools can be evaluated - compare to true -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( is_true::value == true ) -with expansion: - true == true - -TrickyTests.cpp:: -PASSED: - REQUIRE( true == is_true::value ) -with expansion: - true == true - -------------------------------------------------------------------------------- -(unimplemented) static bools can be evaluated - compare to false -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( is_true::value == false ) -with expansion: - false == false - -TrickyTests.cpp:: -PASSED: - REQUIRE( false == is_true::value ) -with expansion: - false == false - -------------------------------------------------------------------------------- -(unimplemented) static bools can be evaluated - negation -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( !is_true::value ) -with expansion: - true - -------------------------------------------------------------------------------- -(unimplemented) static bools can be evaluated - double negation -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( !!is_true::value ) -with expansion: - true - -------------------------------------------------------------------------------- -(unimplemented) static bools can be evaluated - direct -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( is_true::value ) -with expansion: - true - -TrickyTests.cpp:: -PASSED: - REQUIRE_FALSE( is_true::value ) -with expansion: - !false + REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) ) ------------------------------------------------------------------------------- Objects that evaluated in boolean contexts can be checked @@ -6320,1412 +4302,247 @@ with expansion: !false ------------------------------------------------------------------------------- -Assertions then sections +Operators at different namespace levels not hijacked by Koenig lookup ------------------------------------------------------------------------------- TrickyTests.cpp: ............................................................................... TrickyTests.cpp:: PASSED: - REQUIRE( Catch::alwaysTrue() ) + REQUIRE( 0x == o ) with expansion: - true + 3221225472 (0x) == {?} ------------------------------------------------------------------------------- -Assertions then sections - A section +Ordering comparison checks that should fail ------------------------------------------------------------------------------- -TrickyTests.cpp: +ConditionTests.cpp: ............................................................................... -TrickyTests.cpp:: -PASSED: - REQUIRE( Catch::alwaysTrue() ) +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven > 7 ) with expansion: - true + 7 > 7 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven < 7 ) +with expansion: + 7 < 7 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven > 8 ) +with expansion: + 7 > 8 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven < 6 ) +with expansion: + 7 < 6 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven < 0 ) +with expansion: + 7 < 0 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven < -1 ) +with expansion: + 7 < -1 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven >= 8 ) +with expansion: + 7 >= 8 + +ConditionTests.cpp:: FAILED: + CHECK( data.int_seven <= 6 ) +with expansion: + 7 <= 6 + +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one < 9 ) +with expansion: + 9.1f < 9 + +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 10 ) +with expansion: + 9.1f > 10 + +ConditionTests.cpp:: FAILED: + CHECK( data.float_nine_point_one > 9.2 ) +with expansion: + 9.1f > 9.2 + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello > "hello" ) +with expansion: + "hello" > "hello" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello < "hello" ) +with expansion: + "hello" < "hello" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello > "hellp" ) +with expansion: + "hello" > "hellp" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello > "z" ) +with expansion: + "hello" > "z" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello < "hellm" ) +with expansion: + "hello" < "hellm" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello < "a" ) +with expansion: + "hello" < "a" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello >= "z" ) +with expansion: + "hello" >= "z" + +ConditionTests.cpp:: FAILED: + CHECK( data.str_hello <= "a" ) +with expansion: + "hello" <= "a" ------------------------------------------------------------------------------- -Assertions then sections - A section - Another section +Ordering comparison checks that should succeed ------------------------------------------------------------------------------- -TrickyTests.cpp: +ConditionTests.cpp: ............................................................................... -TrickyTests.cpp:: +ConditionTests.cpp:: PASSED: - REQUIRE( Catch::alwaysTrue() ) + REQUIRE( data.int_seven < 8 ) with expansion: - true + 7 < 8 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven > 6 ) +with expansion: + 7 > 6 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven > 0 ) +with expansion: + 7 > 0 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven > -1 ) +with expansion: + 7 > -1 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven >= 7 ) +with expansion: + 7 >= 7 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven >= 6 ) +with expansion: + 7 >= 6 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven <= 7 ) +with expansion: + 7 <= 7 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.int_seven <= 8 ) +with expansion: + 7 <= 8 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.float_nine_point_one > 9 ) +with expansion: + 9.1f > 9 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.float_nine_point_one < 10 ) +with expansion: + 9.1f < 10 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.float_nine_point_one < 9.2 ) +with expansion: + 9.1f < 9.2 + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello <= "hello" ) +with expansion: + "hello" <= "hello" + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello >= "hello" ) +with expansion: + "hello" >= "hello" + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello < "hellp" ) +with expansion: + "hello" < "hellp" + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello < "zebra" ) +with expansion: + "hello" < "zebra" + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello > "hellm" ) +with expansion: + "hello" > "hellm" + +ConditionTests.cpp:: +PASSED: + REQUIRE( data.str_hello > "a" ) +with expansion: + "hello" > "a" ------------------------------------------------------------------------------- -Assertions then sections +Output from all sections is reported + one ------------------------------------------------------------------------------- -TrickyTests.cpp: +MessageTests.cpp: ............................................................................... -TrickyTests.cpp:: -PASSED: - REQUIRE( Catch::alwaysTrue() ) -with expansion: - true +MessageTests.cpp:: FAILED: +explicitly with message: + Message from section one ------------------------------------------------------------------------------- -Assertions then sections - A section +Output from all sections is reported + two ------------------------------------------------------------------------------- -TrickyTests.cpp: +MessageTests.cpp: ............................................................................... -TrickyTests.cpp:: -PASSED: - REQUIRE( Catch::alwaysTrue() ) -with expansion: - true - -------------------------------------------------------------------------------- -Assertions then sections - A section - Another other section -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( Catch::alwaysTrue() ) -with expansion: - true - -------------------------------------------------------------------------------- -non streamable - with conv. op -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( s == "7" ) -with expansion: - "7" == "7" - -------------------------------------------------------------------------------- -Comparing function pointers -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( a ) -with expansion: - true - -TrickyTests.cpp:: -PASSED: - REQUIRE( a == &foo ) -with expansion: - 0x == 0x - -------------------------------------------------------------------------------- -Comparing member function pointers -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - CHECK( m == &S::f ) -with expansion: - 0x - == - 0x - -------------------------------------------------------------------------------- -pointer to class -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( p == 0 ) -with expansion: - NULL == 0 - -------------------------------------------------------------------------------- -null_ptr -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - REQUIRE( ptr.get() == nullptr ) -with expansion: - NULL == nullptr - -------------------------------------------------------------------------------- -X/level/0/a -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -X/level/0/b -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -X/level/1/a -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -X/level/1/b -------------------------------------------------------------------------------- -TrickyTests.cpp: -............................................................................... - -TrickyTests.cpp:: -PASSED: - -------------------------------------------------------------------------------- -toString( has_toString ) -------------------------------------------------------------------------------- -ToStringWhich.cpp: -............................................................................... - -ToStringWhich.cpp:: -PASSED: - REQUIRE( Catch::toString( item ) == "toString( has_toString )" ) -with expansion: - "toString( has_toString )" - == - "toString( has_toString )" - -------------------------------------------------------------------------------- -toString( has_maker ) -------------------------------------------------------------------------------- -ToStringWhich.cpp: -............................................................................... - -ToStringWhich.cpp:: -PASSED: - REQUIRE( Catch::toString( item ) == "StringMaker" ) -with expansion: - "StringMaker" - == - "StringMaker" - -------------------------------------------------------------------------------- -toString( has_maker_and_toString ) -------------------------------------------------------------------------------- -ToStringWhich.cpp: -............................................................................... - -ToStringWhich.cpp:: -PASSED: - REQUIRE( Catch::toString( item ) == "toString( has_maker_and_toString )" ) -with expansion: - "toString( has_maker_and_toString )" - == - "toString( has_maker_and_toString )" - -------------------------------------------------------------------------------- -toString( vectors -............................................................................... - -ToStringWhich.cpp:: -PASSED: - REQUIRE( Catch::toString( v ) == "{ {?} }" ) -with expansion: - "{ {?} }" == "{ {?} }" - -------------------------------------------------------------------------------- -toString( vectors -............................................................................... - -ToStringWhich.cpp:: -PASSED: - REQUIRE( Catch::toString( v ) == "{ StringMaker }" ) -with expansion: - "{ StringMaker }" - == - "{ StringMaker }" - -------------------------------------------------------------------------------- -toString( vectors -............................................................................... - -ToStringWhich.cpp:: -PASSED: - REQUIRE( Catch::toString( v ) == "{ StringMaker }" ) -with expansion: - "{ StringMaker }" - == - "{ StringMaker }" - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - successfully close one section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isSuccessfullyCompleted() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isSuccessfullyCompleted() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - fail one section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - fail one section - re-enter after failed section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isSuccessfullyCompleted() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - fail one section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - fail one section - re-enter after failed section and find next section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isSuccessfullyCompleted() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - successfully close one section, then find another -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - successfully close one section, then find another - Re-enter - skips S1 and enters S2 -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - successfully close one section, then find another - Re-enter - skips S1 and enters S2 - Successfully close S2 -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isSuccessfullyCompleted() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isSuccessfullyCompleted() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - successfully close one section, then find another -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - successfully close one section, then find another - Re-enter - skips S1 and enters S2 -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - successfully close one section, then find another - Re-enter - skips S1 and enters S2 - fail S2 -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( ctx.completedCycle() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase3.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1c.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2c.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase3.isSuccessfullyCompleted() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - open a nested section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - start a generator -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.index() == 0 ) -with expansion: - 0 == 0 - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - start a generator - close outer section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - start a generator - close outer section - Re-enter for second generation -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.index() == 1 ) -with expansion: - 1 == 1 - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isComplete() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - start a generator -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.index() == 0 ) -with expansion: - 0 == 0 - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - start a generator - Start a new inner section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - start a generator - Start a new inner section - Re-enter for second generation -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.index() == 1 ) -with expansion: - 1 == 1 - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isComplete() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isOpen() ) -with expansion: - true - -------------------------------------------------------------------------------- -Tracker - start a generator -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.index() == 0 ) -with expansion: - 0 == 0 - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - start a generator - Fail an inner section -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2.isSuccessfullyCompleted() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase.isComplete() == false ) -with expansion: - false == false - -------------------------------------------------------------------------------- -Tracker - start a generator - Fail an inner section - Re-enter for second generation -------------------------------------------------------------------------------- -PartTrackerTests.cpp: -............................................................................... - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.index() == 0 ) -with expansion: - 0 == 0 - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2b.isOpen() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1b.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1b.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase2.isComplete() == false ) -with expansion: - false == false - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase3.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1c.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1c.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1c.index() == 1 ) -with expansion: - 1 == 1 - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2c.isOpen() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s2c.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( g1c.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( s1c.isComplete() ) -with expansion: - true - -PartTrackerTests.cpp:: -PASSED: - REQUIRE( testCase3.isComplete() ) -with expansion: - true - -------------------------------------------------------------------------------- -std::pair -> toString -------------------------------------------------------------------------------- -ToStringPair.cpp: -............................................................................... - -ToStringPair.cpp:: -PASSED: - REQUIRE( Catch::toString( value ) == "{ 34, \"xyzzy\" }" ) -with expansion: - "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" - -------------------------------------------------------------------------------- -std::pair -> toString -------------------------------------------------------------------------------- -ToStringPair.cpp: -............................................................................... - -ToStringPair.cpp:: -PASSED: - REQUIRE( Catch::toString(value) == "{ 34, \"xyzzy\" }" ) -with expansion: - "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" - -------------------------------------------------------------------------------- -std::vector > -> toString -------------------------------------------------------------------------------- -ToStringPair.cpp: -............................................................................... - -ToStringPair.cpp:: -PASSED: - REQUIRE( Catch::toString( pr ) == "{ { \"green\", 55 } }" ) -with expansion: - "{ { "green", 55 } }" - == - "{ { "green", 55 } }" - -------------------------------------------------------------------------------- -pair > -> toString -------------------------------------------------------------------------------- -ToStringPair.cpp: -............................................................................... - -ToStringPair.cpp:: -PASSED: - REQUIRE( Catch::toString( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" ) -with expansion: - "{ { 42, "Arthur" }, { "Ford", 24 } }" - == - "{ { 42, "Arthur" }, { "Ford", 24 } }" - -------------------------------------------------------------------------------- -vector -> toString -------------------------------------------------------------------------------- -ToStringVector.cpp: -............................................................................... - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ }" ) -with expansion: - "{ }" == "{ }" - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ 42 }" ) -with expansion: - "{ 42 }" == "{ 42 }" - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ 42, 250 }" ) -with expansion: - "{ 42, 250 }" == "{ 42, 250 }" - -------------------------------------------------------------------------------- -vector -> toString -------------------------------------------------------------------------------- -ToStringVector.cpp: -............................................................................... - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ }" ) -with expansion: - "{ }" == "{ }" - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ \"hello\" }" ) -with expansion: - "{ "hello" }" == "{ "hello" }" - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ \"hello\", \"world\" }" ) -with expansion: - "{ "hello", "world" }" - == - "{ "hello", "world" }" - -------------------------------------------------------------------------------- -vector -> toString -------------------------------------------------------------------------------- -ToStringVector.cpp: -............................................................................... - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ }" ) -with expansion: - "{ }" == "{ }" - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ 42 }" ) -with expansion: - "{ 42 }" == "{ 42 }" - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(vv) == "{ 42, 250 }" ) -with expansion: - "{ 42, 250 }" == "{ 42, 250 }" - -------------------------------------------------------------------------------- -vec> -> toString -------------------------------------------------------------------------------- -ToStringVector.cpp: -............................................................................... - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(v) == "{ }" ) -with expansion: - "{ }" == "{ }" - -ToStringVector.cpp:: -PASSED: - REQUIRE( Catch::toString(v) == "{ { \"hello\" }, { \"world\" } }" ) -with expansion: - "{ { "hello" }, { "world" } }" - == - "{ { "hello" }, { "world" } }" +MessageTests.cpp:: FAILED: +explicitly with message: + Message from section two ------------------------------------------------------------------------------- Parse test names and tags @@ -8755,194 +5572,717 @@ with expansion: true == true ------------------------------------------------------------------------------- -tuple<> +Parsing a std::pair ------------------------------------------------------------------------------- -ToStringTuple.cpp: +TrickyTests.cpp: ............................................................................... -ToStringTuple.cpp:: +TrickyTests.cpp:: PASSED: - CHECK( "{ }" == Catch::toString(type{}) ) + REQUIRE( (std::pair( 1, 2 )) == aNicePair ) with expansion: - "{ }" == "{ }" - -ToStringTuple.cpp:: -PASSED: - CHECK( "{ }" == Catch::toString(value) ) -with expansion: - "{ }" == "{ }" + std::pair( 1, 2 ) == std::pair( 1, 2 ) ------------------------------------------------------------------------------- -tuple +Pointers can be compared to null ------------------------------------------------------------------------------- -ToStringTuple.cpp: +ConditionTests.cpp: ............................................................................... -ToStringTuple.cpp:: +ConditionTests.cpp:: PASSED: - CHECK( "{ 0 }" == Catch::toString(type{0}) ) + REQUIRE( p == 0 ) with expansion: - "{ 0 }" == "{ 0 }" + NULL == 0 + +ConditionTests.cpp:: +PASSED: + REQUIRE( p == pNULL ) +with expansion: + NULL == NULL + +ConditionTests.cpp:: +PASSED: + REQUIRE( p != 0 ) +with expansion: + 0x != 0 + +ConditionTests.cpp:: +PASSED: + REQUIRE( cp != 0 ) +with expansion: + 0x != 0 + +ConditionTests.cpp:: +PASSED: + REQUIRE( cpc != 0 ) +with expansion: + 0x != 0 + +ConditionTests.cpp:: +PASSED: + REQUIRE( returnsNull() == 0 ) +with expansion: + {null string} == 0 + +ConditionTests.cpp:: +PASSED: + REQUIRE( returnsConstNull() == 0 ) +with expansion: + {null string} == 0 + +ConditionTests.cpp:: +PASSED: + REQUIRE( 0 != p ) +with expansion: + 0 != 0x ------------------------------------------------------------------------------- -tuple +Pointers can be converted to strings ------------------------------------------------------------------------------- -ToStringTuple.cpp: +MessageTests.cpp: ............................................................................... -ToStringTuple.cpp:: -PASSED: - CHECK( "1.2f" == Catch::toString(float(1.2)) ) -with expansion: - "1.2f" == "1.2f" +MessageTests.cpp:: +warning: + actual address of p: 0x -ToStringTuple.cpp:: -PASSED: - CHECK( "{ 1.2f, 0 }" == Catch::toString(type{1.2,0}) ) -with expansion: - "{ 1.2f, 0 }" == "{ 1.2f, 0 }" +MessageTests.cpp:: +warning: + toString(p): 0x ------------------------------------------------------------------------------- -tuple +Process can be configured on command line + default - no arguments ------------------------------------------------------------------------------- -ToStringTuple.cpp: +TestMain.cpp: ............................................................................... -ToStringTuple.cpp:: +TestMain.cpp:: PASSED: - CHECK( "{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"}) ) + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + CHECK( config.shouldDebugBreak == false ) with expansion: - "{ "hello", "world" }" - == - "{ "hello", "world" }" + false == false + +TestMain.cpp:: +PASSED: + CHECK( config.abortAfter == -1 ) +with expansion: + -1 == -1 + +TestMain.cpp:: +PASSED: + CHECK( config.noThrow == false ) +with expansion: + false == false + +TestMain.cpp:: +PASSED: + CHECK( config.reporterNames.empty() ) +with expansion: + true ------------------------------------------------------------------------------- -tuple,tuple<>,float> +Process can be configured on command line + test lists + 1 test ------------------------------------------------------------------------------- -ToStringTuple.cpp: +TestMain.cpp: ............................................................................... -ToStringTuple.cpp:: +TestMain.cpp:: PASSED: - CHECK( "{ { 42 }, { }, 1.2f }" == Catch::toString(value) ) + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( cfg.testSpec().matches( fakeTestCase( "notIncluded" ) ) == false ) with expansion: - "{ { 42 }, { }, 1.2f }" - == - "{ { 42 }, { }, 1.2f }" + false == false + +TestMain.cpp:: +PASSED: + REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) ) +with expansion: + true ------------------------------------------------------------------------------- -tuple +Process can be configured on command line + test lists + Specify one test case exclusion using exclude: ------------------------------------------------------------------------------- -ToStringTuple.cpp: +TestMain.cpp: ............................................................................... -ToStringTuple.cpp:: +TestMain.cpp:: PASSED: - CHECK( "{ nullptr, 42, \"Catch me\" }" == Catch::toString(value) ) + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false ) with expansion: - "{ nullptr, 42, "Catch me" }" - == - "{ nullptr, 42, "Catch me" }" + false == false + +TestMain.cpp:: +PASSED: + REQUIRE( cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) ) +with expansion: + true ------------------------------------------------------------------------------- -Tag alias can be registered against tag patterns - The same tag alias can only be registered once +Process can be configured on command line + test lists + Specify one test case exclusion using ~ ------------------------------------------------------------------------------- -TagAliasTests.cpp: +TestMain.cpp: ............................................................................... -TagAliasTests.cpp:: +TestMain.cpp:: PASSED: - CHECK_THAT( what, Contains( "[@zzz]" ) ) -with expansion: - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: " - [@zzz]" + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TagAliasTests.cpp:: +TestMain.cpp:: PASSED: - CHECK_THAT( what, Contains( "file" ) ) + REQUIRE( cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false ) with expansion: - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: - "file" + false == false -TagAliasTests.cpp:: +TestMain.cpp:: PASSED: - CHECK_THAT( what, Contains( "2" ) ) + REQUIRE( cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) ) with expansion: - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: - "2" - -TagAliasTests.cpp:: -PASSED: - CHECK_THAT( what, Contains( "10" ) ) -with expansion: - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: - "10" + true ------------------------------------------------------------------------------- -Tag alias can be registered against tag patterns - Tag aliases must be of the form [@name] +Process can be configured on command line + reporter + -r/console ------------------------------------------------------------------------------- -TagAliasTests.cpp: +TestMain.cpp: ............................................................................... -TagAliasTests.cpp:: +TestMain.cpp:: PASSED: - CHECK_THROWS( registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TagAliasTests.cpp:: +TestMain.cpp:: PASSED: - CHECK_THROWS( registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) - -TagAliasTests.cpp:: -PASSED: - CHECK_THROWS( registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) - -TagAliasTests.cpp:: -PASSED: - CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) ) + REQUIRE( config.reporterNames[0] == "console" ) +with expansion: + "console" == "console" ------------------------------------------------------------------------------- -Anonymous test case 1 +Process can be configured on command line + reporter + -r/xml ------------------------------------------------------------------------------- -VariadicMacrosTests.cpp: +TestMain.cpp: ............................................................................... -VariadicMacrosTests.cpp:: +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.reporterNames[0] == "xml" ) +with expansion: + "xml" == "xml" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + -r xml and junit +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.reporterNames.size() == 2 ) +with expansion: + 2 == 2 + +TestMain.cpp:: +PASSED: + REQUIRE( config.reporterNames[0] == "xml" ) +with expansion: + "xml" == "xml" + +TestMain.cpp:: +PASSED: + REQUIRE( config.reporterNames[1] == "junit" ) +with expansion: + "junit" == "junit" + +------------------------------------------------------------------------------- +Process can be configured on command line + reporter + --reporter/junit +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.reporterNames[0] == "junit" ) +with expansion: + "junit" == "junit" + +------------------------------------------------------------------------------- +Process can be configured on command line + debugger + -b +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.shouldDebugBreak == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + debugger + --break +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.shouldDebugBreak ) +with expansion: + true + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -a aborts after first failure +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.abortAfter == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -x 2 aborts after two failures +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.abortAfter == 2 ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -x must be greater than zero +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ), Contains( "greater than zero" ) ) +with expansion: + "Value after -x or --abortAfter must be greater than zero + - while parsing: (-x, --abortx )" contains: "greater than zero" + +------------------------------------------------------------------------------- +Process can be configured on command line + abort + -x must be numeric +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ), Contains( "-x" ) ) +with expansion: + "Unable to convert oops to destination type + - while parsing: (-x, --abortx )" contains: "-x" + +------------------------------------------------------------------------------- +Process can be configured on command line + nothrow + -e +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.noThrow == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + nothrow + --nothrow +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.noThrow == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + output filename + -o filename +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.outputFilename == "filename.ext" ) +with expansion: + "filename.ext" == "filename.ext" + +------------------------------------------------------------------------------- +Process can be configured on command line + output filename + --out +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.outputFilename == "filename.ext" ) +with expansion: + "filename.ext" == "filename.ext" + +------------------------------------------------------------------------------- +Process can be configured on command line + combinations + Single character flags can be combined +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + CHECK( config.abortAfter == 1 ) +with expansion: + 1 == 1 + +TestMain.cpp:: +PASSED: + CHECK( config.shouldDebugBreak ) +with expansion: + true + +TestMain.cpp:: +PASSED: + CHECK( config.noThrow == true ) +with expansion: + true == true + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + without option +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.useColour == UseColour::Auto ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + auto +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.useColour == UseColour::Auto ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + yes +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.useColour == UseColour::Yes ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + no +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_NOTHROW( parseIntoConfig( argv, config ) ) + +TestMain.cpp:: +PASSED: + REQUIRE( config.useColour == UseColour::No ) +with expansion: + 2 == 2 + +------------------------------------------------------------------------------- +Process can be configured on command line + use-colour + error +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + REQUIRE_THROWS_WITH( parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) ) + +------------------------------------------------------------------------------- +SCOPED_INFO is reset for each loop +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 0 < 10 +with messages: + current counter 0 + i := 0 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 1 < 10 +with messages: + current counter 1 + i := 1 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 2 < 10 +with messages: + current counter 2 + i := 2 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 3 < 10 +with messages: + current counter 3 + i := 3 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 4 < 10 +with messages: + current counter 4 + i := 4 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 5 < 10 +with messages: + current counter 5 + i := 5 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 6 < 10 +with messages: + current counter 6 + i := 6 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 7 < 10 +with messages: + current counter 7 + i := 7 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 8 < 10 +with messages: + current counter 8 + i := 8 + +MessageTests.cpp:: +PASSED: + REQUIRE( i < 10 ) +with expansion: + 9 < 10 +with messages: + current counter 9 + i := 9 + +MessageTests.cpp:: FAILED: + REQUIRE( i < 10 ) +with expansion: + 10 < 10 +with messages: + current counter 10 + i := 10 + +------------------------------------------------------------------------------- +SUCCEED counts as a test pass +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: PASSED: with message: - anonymous test case + this is a success ------------------------------------------------------------------------------- -Test case with one argument +SUCCESS does not require an argument ------------------------------------------------------------------------------- -VariadicMacrosTests.cpp: +MessageTests.cpp: ............................................................................... -VariadicMacrosTests.cpp:: +MessageTests.cpp:: PASSED: -with message: - no assertions ------------------------------------------------------------------------------- -Variadic macros - Section with one argument +Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or + methods + Given: No operations precede me ------------------------------------------------------------------------------- -VariadicMacrosTests.cpp: +BDDTests.cpp: ............................................................................... -VariadicMacrosTests.cpp:: +BDDTests.cpp:: PASSED: -with message: - no assertions + REQUIRE( before == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or + methods + Given: No operations precede me + When: We get the count + Then: Subsequently values are higher +------------------------------------------------------------------------------- +BDDTests.cpp: +............................................................................... + +BDDTests.cpp:: +PASSED: + REQUIRE( after > before ) +with expansion: + 1 > 0 ------------------------------------------------------------------------------- Scenario: Do that thing with the thing @@ -8975,6 +6315,24 @@ PASSED: with expansion: true +------------------------------------------------------------------------------- +Scenario: This is a really long scenario name to see how the list command deals + with wrapping + Given: A section name that is so long that it cannot fit in a single + console width + When: The test headers are printed as part of the normal running of the + scenario + Then: The, deliberately very long and overly verbose (you see what I did + there?) section names must wrap, along with an indent +------------------------------------------------------------------------------- +BDDTests.cpp: +............................................................................... + +BDDTests.cpp:: +PASSED: +with message: + boo! + ------------------------------------------------------------------------------- Scenario: Vector resizing affects size and capacity Given: an empty vector @@ -9066,55 +6424,2607 @@ PASSED: with expansion: 0 == 0 +A string sent directly to stdout +A string sent directly to stderr ------------------------------------------------------------------------------- -Scenario: This is a really long scenario name to see how the list command deals - with wrapping - Given: A section name that is so long that it cannot fit in a single - console width - When: The test headers are printed as part of the normal running of the - scenario - Then: The, deliberately very long and overly verbose (you see what I did - there?) section names must wrap, along with an indent +Some simple comparisons between doubles ------------------------------------------------------------------------------- -BDDTests.cpp: +ApproxTests.cpp: ............................................................................... -BDDTests.cpp:: +ApproxTests.cpp:: +PASSED: + REQUIRE( d == Approx( 1.23 ) ) +with expansion: + 1.23 == Approx( 1.23 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( d != Approx( 1.22 ) ) +with expansion: + 1.23 != Approx( 1.22 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( d != Approx( 1.24 ) ) +with expansion: + 1.23 != Approx( 1.24 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( Approx( d ) == 1.23 ) +with expansion: + Approx( 1.23 ) == 1.23 + +ApproxTests.cpp:: +PASSED: + REQUIRE( Approx( d ) != 1.22 ) +with expansion: + Approx( 1.23 ) != 1.22 + +ApproxTests.cpp:: +PASSED: + REQUIRE( Approx( d ) != 1.24 ) +with expansion: + Approx( 1.23 ) != 1.24 + +Message from section one +------------------------------------------------------------------------------- +Standard output from all sections is reported + one +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + + +No assertions in section 'one' + +Message from section two +------------------------------------------------------------------------------- +Standard output from all sections is reported + two +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + + +No assertions in section 'two' + +------------------------------------------------------------------------------- +StartsWith string matcher +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK_THAT( testStringForMatching(), StartsWith( "string" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "string" + +------------------------------------------------------------------------------- +String matchers +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE_THAT( testStringForMatching(), Contains( "string" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "string" + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), Contains( "abc" ) ) +with expansion: + "this string contains 'abc' as a substring" contains: "abc" + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), StartsWith( "this" ) ) +with expansion: + "this string contains 'abc' as a substring" starts with: "this" + +MiscTests.cpp:: +PASSED: + CHECK_THAT( testStringForMatching(), EndsWith( "substring" ) ) +with expansion: + "this string contains 'abc' as a substring" ends with: "substring" + +hello +hello +------------------------------------------------------------------------------- +Tabs and newlines show in output +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK( s1 == s2 ) +with expansion: + "if ($b == 10) { + $a = 20; + }" + == + "if ($b == 10) { + $a = 20; + } + " + +------------------------------------------------------------------------------- +Tag alias can be registered against tag patterns + The same tag alias can only be registered once +------------------------------------------------------------------------------- +TagAliasTests.cpp: +............................................................................... + +TagAliasTests.cpp:: +PASSED: + CHECK_THAT( what, Contains( "[@zzz]" ) ) +with expansion: + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "[@zzz]" + +TagAliasTests.cpp:: +PASSED: + CHECK_THAT( what, Contains( "file" ) ) +with expansion: + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "file" + +TagAliasTests.cpp:: +PASSED: + CHECK_THAT( what, Contains( "2" ) ) +with expansion: + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "2" + +TagAliasTests.cpp:: +PASSED: + CHECK_THAT( what, Contains( "10" ) ) +with expansion: + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "10" + +------------------------------------------------------------------------------- +Tag alias can be registered against tag patterns + Tag aliases must be of the form [@name] +------------------------------------------------------------------------------- +TagAliasTests.cpp: +............................................................................... + +TagAliasTests.cpp:: +PASSED: + CHECK_THROWS( registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +TagAliasTests.cpp:: +PASSED: + CHECK_THROWS( registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +TagAliasTests.cpp:: +PASSED: + CHECK_THROWS( registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +TagAliasTests.cpp:: +PASSED: + CHECK_THROWS( registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) ) + +------------------------------------------------------------------------------- +Test case with one argument +------------------------------------------------------------------------------- +VariadicMacrosTests.cpp: +............................................................................... + +VariadicMacrosTests.cpp:: PASSED: with message: - boo! + no assertions ------------------------------------------------------------------------------- -Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or - methods - Given: No operations precede me +Test enum bit values ------------------------------------------------------------------------------- -BDDTests.cpp: +TrickyTests.cpp: ............................................................................... -BDDTests.cpp:: +TrickyTests.cpp:: PASSED: - REQUIRE( before == 0 ) + REQUIRE( 0x == bit30and31 ) +with expansion: + 3221225472 (0x) == 3221225472 + +------------------------------------------------------------------------------- +Text can be formatted using the Text class +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( Text( "hi there" ).toString() == "hi there" ) +with expansion: + "hi there" == "hi there" + +TestMain.cpp:: +PASSED: + CHECK( Text( "hi there", narrow ).toString() == "hi\nthere" ) +with expansion: + "hi + there" + == + "hi + there" + +------------------------------------------------------------------------------- +The NO_FAIL macro reports a failure but does not fail the test +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: +FAILED - but was ok: + CHECK_NOFAIL( 1 == 2 ) + +------------------------------------------------------------------------------- +This test 'should' fail but doesn't +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: +with message: + oops! + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isSuccessfullyCompleted() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + fail one section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + fail one section + re-enter after failed section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + fail one section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + fail one section + re-enter after failed section and find next section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 + Successfully close S2 +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isSuccessfullyCompleted() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + successfully close one section, then find another + Re-enter - skips S1 and enters S2 + fail S2 +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( ctx.completedCycle() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase3.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1c.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2c.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase3.isSuccessfullyCompleted() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + open a nested section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + start a generator +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.index() == 0 ) +with expansion: + 0 == 0 + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + start a generator + close outer section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + start a generator + close outer section + Re-enter for second generation +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.index() == 1 ) +with expansion: + 1 == 1 + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isComplete() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + start a generator +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.index() == 0 ) +with expansion: + 0 == 0 + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + start a generator + Start a new inner section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + start a generator + Start a new inner section + Re-enter for second generation +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.index() == 1 ) +with expansion: + 1 == 1 + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isComplete() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isOpen() ) +with expansion: + true + +------------------------------------------------------------------------------- +Tracker + start a generator +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.index() == 0 ) +with expansion: + 0 == 0 + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + start a generator + Fail an inner section +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2.isSuccessfullyCompleted() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase.isComplete() == false ) +with expansion: + false == false + +------------------------------------------------------------------------------- +Tracker + start a generator + Fail an inner section + Re-enter for second generation +------------------------------------------------------------------------------- +PartTrackerTests.cpp: +............................................................................... + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.index() == 0 ) +with expansion: + 0 == 0 + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2b.isOpen() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1b.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1b.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase2.isComplete() == false ) +with expansion: + false == false + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase3.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1c.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1c.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1c.index() == 1 ) +with expansion: + 1 == 1 + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2c.isOpen() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s2c.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( g1c.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( s1c.isComplete() ) +with expansion: + true + +PartTrackerTests.cpp:: +PASSED: + REQUIRE( testCase3.isComplete() ) +with expansion: + true + +------------------------------------------------------------------------------- +Unexpected exceptions can be translated +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: +due to unexpected exception with message: + 3.14 + +------------------------------------------------------------------------------- +Use a custom approx +------------------------------------------------------------------------------- +ApproxTests.cpp: +............................................................................... + +ApproxTests.cpp:: +PASSED: + REQUIRE( d == approx( 1.23 ) ) +with expansion: + 1.23 == Approx( 1.23 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( d == approx( 1.22 ) ) +with expansion: + 1.23 == Approx( 1.22 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( d == approx( 1.24 ) ) +with expansion: + 1.23 == Approx( 1.24 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( d != approx( 1.25 ) ) +with expansion: + 1.23 != Approx( 1.25 ) + +ApproxTests.cpp:: +PASSED: + REQUIRE( approx( d ) == 1.23 ) +with expansion: + Approx( 1.23 ) == 1.23 + +ApproxTests.cpp:: +PASSED: + REQUIRE( approx( d ) == 1.22 ) +with expansion: + Approx( 1.23 ) == 1.22 + +ApproxTests.cpp:: +PASSED: + REQUIRE( approx( d ) == 1.24 ) +with expansion: + Approx( 1.23 ) == 1.24 + +ApproxTests.cpp:: +PASSED: + REQUIRE( approx( d ) != 1.25 ) +with expansion: + Approx( 1.23 ) != 1.25 + +------------------------------------------------------------------------------- +Variadic macros + Section with one argument +------------------------------------------------------------------------------- +VariadicMacrosTests.cpp: +............................................................................... + +VariadicMacrosTests.cpp:: +PASSED: +with message: + no assertions + +------------------------------------------------------------------------------- +When checked exceptions are thrown they can be expected or unexpected +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: +PASSED: + REQUIRE_THROWS_AS( thisThrows() ) + +ExceptionTests.cpp:: +PASSED: + REQUIRE_NOTHROW( thisDoesntThrow() ) + +ExceptionTests.cpp:: +PASSED: + REQUIRE_THROWS( thisThrows() ) + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown directly they are always failures +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a CHECK the test should continue +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown during a REQUIRE the test should abort +fail +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + REQUIRE( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from functions they are always failures +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: + CHECK( thisThrows() == 0 ) +due to unexpected exception with message: + expected exception + +------------------------------------------------------------------------------- +When unchecked exceptions are thrown from sections they are always failures + section name +------------------------------------------------------------------------------- +ExceptionTests.cpp: +............................................................................... + +ExceptionTests.cpp:: FAILED: +due to unexpected exception with message: + unexpected exception + +------------------------------------------------------------------------------- +Where the LHS is not a simple value +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +warning: + Uncomment the code in this test to check that it gives a sensible compiler + error + +------------------------------------------------------------------------------- +Where there is more to the expression after the RHS +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +warning: + Uncomment the code in this test to check that it gives a sensible compiler + error + +------------------------------------------------------------------------------- +X/level/0/a +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +X/level/0/b +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +X/level/1/a +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +X/level/1/b +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +XmlEncode + normal string +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "normal string" ) == "normal string" ) +with expansion: + "normal string" == "normal string" + +------------------------------------------------------------------------------- +XmlEncode + empty string +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "" ) == "" ) +with expansion: + "" == "" + +------------------------------------------------------------------------------- +XmlEncode + string with ampersand +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "smith & jones" ) == "smith & jones" ) +with expansion: + "smith & jones" == "smith & jones" + +------------------------------------------------------------------------------- +XmlEncode + string with less-than +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "smith < jones" ) == "smith < jones" ) +with expansion: + "smith < jones" == "smith < jones" + +------------------------------------------------------------------------------- +XmlEncode + string with greater-than +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "smith > jones" ) == "smith > jones" ) +with expansion: + "smith > jones" == "smith > jones" + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "smith ]]> jones" ) == "smith ]]> jones" ) +with expansion: + "smith ]]> jones" + == + "smith ]]> jones" + +------------------------------------------------------------------------------- +XmlEncode + string with quotes +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( stringWithQuotes ) == stringWithQuotes ) +with expansion: + "don't "quote" me on that" + == + "don't "quote" me on that" + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't "quote" me on that" ) +with expansion: + "don't "quote" me on that" + == + "don't "quote" me on that" + +------------------------------------------------------------------------------- +XmlEncode + string with control char (1) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "[\x01]" ) == "[]" ) +with expansion: + "[]" == "[]" + +------------------------------------------------------------------------------- +XmlEncode + string with control char (x7F) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( encode( "[\x7F]" ) == "[]" ) +with expansion: + "[]" == "[]" + +------------------------------------------------------------------------------- +atomic if +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( x == 0 ) with expansion: 0 == 0 ------------------------------------------------------------------------------- -Scenario: BDD tests requiring Fixtures to provide commonly-accessed data or - methods - Given: No operations precede me - When: We get the count - Then: Subsequently values are higher +boolean member ------------------------------------------------------------------------------- -BDDTests.cpp: +TrickyTests.cpp: ............................................................................... -BDDTests.cpp:: +TrickyTests.cpp:: PASSED: - REQUIRE( after > before ) + REQUIRE( obj.prop != 0 ) with expansion: - 1 > 0 + 0x != 0 + +------------------------------------------------------------------------------- +checkedElse +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECKED_ELSE( flag ) +with expansion: + true + +MiscTests.cpp:: +PASSED: + REQUIRE( testCheckedElse( true ) ) +with expansion: + true + +------------------------------------------------------------------------------- +checkedElse, failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECKED_ELSE( flag ) +with expansion: + false + +MiscTests.cpp:: FAILED: + REQUIRE( testCheckedElse( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +checkedIf +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECKED_IF( flag ) +with expansion: + true + +MiscTests.cpp:: +PASSED: + REQUIRE( testCheckedIf( true ) ) +with expansion: + true + +------------------------------------------------------------------------------- +checkedIf, failing +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECKED_IF( flag ) +with expansion: + false + +MiscTests.cpp:: FAILED: + REQUIRE( testCheckedIf( false ) ) +with expansion: + false + +------------------------------------------------------------------------------- +comparisons between const int variables +------------------------------------------------------------------------------- +ConditionTests.cpp: +............................................................................... + +ConditionTests.cpp:: +PASSED: + REQUIRE( unsigned_char_var == 1 ) +with expansion: + 1 == 1 + +ConditionTests.cpp:: +PASSED: + REQUIRE( unsigned_short_var == 1 ) +with expansion: + 1 == 1 + +ConditionTests.cpp:: +PASSED: + REQUIRE( unsigned_int_var == 1 ) +with expansion: + 1 == 1 + +ConditionTests.cpp:: +PASSED: + REQUIRE( unsigned_long_var == 1 ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +comparisons between int variables +------------------------------------------------------------------------------- +ConditionTests.cpp: +............................................................................... + +ConditionTests.cpp:: +PASSED: + REQUIRE( long_var == unsigned_char_var ) +with expansion: + 1 == 1 + +ConditionTests.cpp:: +PASSED: + REQUIRE( long_var == unsigned_short_var ) +with expansion: + 1 == 1 + +ConditionTests.cpp:: +PASSED: + REQUIRE( long_var == unsigned_int_var ) +with expansion: + 1 == 1 + +ConditionTests.cpp:: +PASSED: + REQUIRE( long_var == unsigned_long_var ) +with expansion: + 1 == 1 + +------------------------------------------------------------------------------- +even more nested SECTION tests + c + d (leaf) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + c + e (leaf) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +even more nested SECTION tests + f (leaf) +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +just failure +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: +explicitly with message: + Previous info should not be seen + +------------------------------------------------------------------------------- +looped SECTION tests + s1 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK( b > a ) +with expansion: + 0 > 1 + +------------------------------------------------------------------------------- +looped tests +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[0] (1) is even + +MiscTests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[1] (1) is even + +MiscTests.cpp:: +PASSED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 0 == 0 +with message: + Testing if fib[2] (2) is even + +MiscTests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[3] (3) is even + +MiscTests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[4] (5) is even + +MiscTests.cpp:: +PASSED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 0 == 0 +with message: + Testing if fib[5] (8) is even + +MiscTests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[6] (13) is even + +MiscTests.cpp:: FAILED: + CHECK( ( fib[i] % 2 ) == 0 ) +with expansion: + 1 == 0 +with message: + Testing if fib[7] (21) is even + +------------------------------------------------------------------------------- +more nested SECTION tests + s1 + s2 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + REQUIRE( a == b ) +with expansion: + 1 == 2 + +------------------------------------------------------------------------------- +more nested SECTION tests + s1 + s3 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +more nested SECTION tests + s1 + s4 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( a < b ) +with expansion: + 1 < 2 + +------------------------------------------------------------------------------- +nested SECTION tests + s1 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +MiscTests.cpp:: +PASSED: + REQUIRE( b != a ) +with expansion: + 2 != 1 + +------------------------------------------------------------------------------- +nested SECTION tests + s1 + s2 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +non streamable - with conv. op +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( s == "7" ) +with expansion: + "7" == "7" + +------------------------------------------------------------------------------- +not allowed +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +null strings +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( makeString( false ) != static_cast(0) ) +with expansion: + "valid string" != {null string} + +MiscTests.cpp:: +PASSED: + REQUIRE( makeString( true ) == static_cast(0) ) +with expansion: + {null string} == {null string} + +------------------------------------------------------------------------------- +pair > -> toString +------------------------------------------------------------------------------- +ToStringPair.cpp: +............................................................................... + +ToStringPair.cpp:: +PASSED: + REQUIRE( Catch::toString( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" ) +with expansion: + "{ { 42, "Arthur" }, { "Ford", 24 } }" + == + "{ { 42, "Arthur" }, { "Ford", 24 } }" + +------------------------------------------------------------------------------- +pointer to class +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: +PASSED: + REQUIRE( p == 0 ) +with expansion: + NULL == 0 + +------------------------------------------------------------------------------- +random SECTION tests + s1 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +MiscTests.cpp:: +PASSED: + REQUIRE( b != a ) +with expansion: + 2 != 1 + +------------------------------------------------------------------------------- +random SECTION tests + s2 +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 + +------------------------------------------------------------------------------- +replaceInPlace + replace single char +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( replaceInPlace( letters, "b", "z" ) ) +with expansion: + true + +TestMain.cpp:: +PASSED: + CHECK( letters == "azcdefcg" ) +with expansion: + "azcdefcg" == "azcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + replace two chars +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( replaceInPlace( letters, "c", "z" ) ) +with expansion: + true + +TestMain.cpp:: +PASSED: + CHECK( letters == "abzdefzg" ) +with expansion: + "abzdefzg" == "abzdefzg" + +------------------------------------------------------------------------------- +replaceInPlace + replace first char +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( replaceInPlace( letters, "a", "z" ) ) +with expansion: + true + +TestMain.cpp:: +PASSED: + CHECK( letters == "zbcdefcg" ) +with expansion: + "zbcdefcg" == "zbcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + replace last char +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( replaceInPlace( letters, "g", "z" ) ) +with expansion: + true + +TestMain.cpp:: +PASSED: + CHECK( letters == "abcdefcz" ) +with expansion: + "abcdefcz" == "abcdefcz" + +------------------------------------------------------------------------------- +replaceInPlace + replace all chars +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( replaceInPlace( letters, letters, "replaced" ) ) +with expansion: + true + +TestMain.cpp:: +PASSED: + CHECK( letters == "replaced" ) +with expansion: + "replaced" == "replaced" + +------------------------------------------------------------------------------- +replaceInPlace + replace no chars +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK_FALSE( replaceInPlace( letters, "x", "z" ) ) +with expansion: + !false + +TestMain.cpp:: +PASSED: + CHECK( letters == letters ) +with expansion: + "abcdefcg" == "abcdefcg" + +------------------------------------------------------------------------------- +replaceInPlace + escape ' +------------------------------------------------------------------------------- +TestMain.cpp: +............................................................................... + +TestMain.cpp:: +PASSED: + CHECK( replaceInPlace( s, "'", "|'" ) ) +with expansion: + true + +TestMain.cpp:: +PASSED: + CHECK( s == "didn|'t" ) +with expansion: + "didn|'t" == "didn|'t" + +------------------------------------------------------------------------------- +send a single char to INFO +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: FAILED: + REQUIRE( false ) +with message: + 3 + +------------------------------------------------------------------------------- +sends information to INFO +------------------------------------------------------------------------------- +MessageTests.cpp: +............................................................................... + +MessageTests.cpp:: FAILED: + REQUIRE( false ) +with messages: + hi + i := 7 + +------------------------------------------------------------------------------- +std::pair -> toString +------------------------------------------------------------------------------- +ToStringPair.cpp: +............................................................................... + +ToStringPair.cpp:: +PASSED: + REQUIRE( Catch::toString(value) == "{ 34, \"xyzzy\" }" ) +with expansion: + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + +------------------------------------------------------------------------------- +std::pair -> toString +------------------------------------------------------------------------------- +ToStringPair.cpp: +............................................................................... + +ToStringPair.cpp:: +PASSED: + REQUIRE( Catch::toString( value ) == "{ 34, \"xyzzy\" }" ) +with expansion: + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + +------------------------------------------------------------------------------- +std::vector > -> toString +------------------------------------------------------------------------------- +ToStringPair.cpp: +............................................................................... + +ToStringPair.cpp:: +PASSED: + REQUIRE( Catch::toString( pr ) == "{ { \"green\", 55 } }" ) +with expansion: + "{ { "green", 55 } }" + == + "{ { "green", 55 } }" + +------------------------------------------------------------------------------- +string literals of different sizes can be compared +------------------------------------------------------------------------------- +TrickyTests.cpp: +............................................................................... + +TrickyTests.cpp:: FAILED: + REQUIRE( std::string( "first" ) == "second" ) +with expansion: + "first" == "second" + +------------------------------------------------------------------------------- +toString on const wchar_t const pointer returns the string contents +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on const wchar_t pointer returns the string contents +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on wchar_t const pointer returns the string contents +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString on wchar_t returns the string contents +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + CHECK( result == "\"wide load\"" ) +with expansion: + ""wide load"" == ""wide load"" + +------------------------------------------------------------------------------- +toString( has_maker ) +------------------------------------------------------------------------------- +ToStringWhich.cpp: +............................................................................... + +ToStringWhich.cpp:: +PASSED: + REQUIRE( Catch::toString( item ) == "StringMaker" ) +with expansion: + "StringMaker" + == + "StringMaker" + +------------------------------------------------------------------------------- +toString( has_maker_and_toString ) +------------------------------------------------------------------------------- +ToStringWhich.cpp: +............................................................................... + +ToStringWhich.cpp:: +PASSED: + REQUIRE( Catch::toString( item ) == "toString( has_maker_and_toString )" ) +with expansion: + "toString( has_maker_and_toString )" + == + "toString( has_maker_and_toString )" + +------------------------------------------------------------------------------- +toString( has_toString ) +------------------------------------------------------------------------------- +ToStringWhich.cpp: +............................................................................... + +ToStringWhich.cpp:: +PASSED: + REQUIRE( Catch::toString( item ) == "toString( has_toString )" ) +with expansion: + "toString( has_toString )" + == + "toString( has_toString )" + +------------------------------------------------------------------------------- +toString( vectors +............................................................................... + +ToStringWhich.cpp:: +PASSED: + REQUIRE( Catch::toString( v ) == "{ StringMaker }" ) +with expansion: + "{ StringMaker }" + == + "{ StringMaker }" + +------------------------------------------------------------------------------- +toString(enum w/operator<<) +------------------------------------------------------------------------------- +EnumToString.cpp: +............................................................................... + +EnumToString.cpp:: +PASSED: + CHECK( Catch::toString(e0) == "E2{0}" ) +with expansion: + "E2{0}" == "E2{0}" + +EnumToString.cpp:: +PASSED: + CHECK( Catch::toString(e1) == "E2{1}" ) +with expansion: + "E2{1}" == "E2{1}" + +------------------------------------------------------------------------------- +toString(enum) +------------------------------------------------------------------------------- +EnumToString.cpp: +............................................................................... + +EnumToString.cpp:: +PASSED: + CHECK( Catch::toString(e0) == "0" ) +with expansion: + "0" == "0" + +EnumToString.cpp:: +PASSED: + CHECK( Catch::toString(e1) == "1" ) +with expansion: + "1" == "1" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.cpp: +............................................................................... + +ToStringVector.cpp:: +PASSED: + REQUIRE( Catch::toString(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.cpp:: +PASSED: + REQUIRE( Catch::toString(vv) == "{ 42 }" ) +with expansion: + "{ 42 }" == "{ 42 }" + +ToStringVector.cpp:: +PASSED: + REQUIRE( Catch::toString(vv) == "{ 42, 250 }" ) +with expansion: + "{ 42, 250 }" == "{ 42, 250 }" + +------------------------------------------------------------------------------- +vector -> toString +------------------------------------------------------------------------------- +ToStringVector.cpp: +............................................................................... + +ToStringVector.cpp:: +PASSED: + REQUIRE( Catch::toString(vv) == "{ }" ) +with expansion: + "{ }" == "{ }" + +ToStringVector.cpp:: +PASSED: + REQUIRE( Catch::toString(vv) == "{ \"hello\" }" ) +with expansion: + "{ "hello" }" == "{ "hello" }" + +ToStringVector.cpp:: +PASSED: + REQUIRE( Catch::toString(vv) == "{ \"hello\", \"world\" }" ) +with expansion: + "{ "hello", "world" }" + == + "{ "hello", "world" }" + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing bigger changes size and capacity +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 10 ) +with expansion: + 10 == 10 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing smaller changes size but not capacity +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 0 ) +with expansion: + 0 == 0 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + resizing smaller changes size but not capacity + We can use the 'swap trick' to reset the capacity +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() == 0 ) +with expansion: + 0 == 0 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + reserving bigger changes capacity but not size +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 10 ) +with expansion: + 10 >= 10 + +------------------------------------------------------------------------------- +vectors can be sized and resized +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +vectors can be sized and resized + reserving smaller does not change size or capacity +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + REQUIRE( v.size() == 5 ) +with expansion: + 5 == 5 + +MiscTests.cpp:: +PASSED: + REQUIRE( v.capacity() >= 5 ) +with expansion: + 5 >= 5 + +------------------------------------------------------------------------------- +xmlentitycheck + embedded xml +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: + +------------------------------------------------------------------------------- +xmlentitycheck + encoded chars +------------------------------------------------------------------------------- +MiscTests.cpp: +............................................................................... + +MiscTests.cpp:: +PASSED: =============================================================================== -test cases: 169 | 124 passed | 43 failed | 2 failed as expected -assertions: 923 | 825 passed | 80 failed | 18 failed as expected +test cases: 157 | 112 passed | 43 failed | 2 failed as expected +assertions: 915 | 817 passed | 80 failed | 18 failed as expected diff --git a/3rdparty/catch/projects/SelfTest/Baselines/console.swa4.approved.txt b/3rdparty/catch/projects/SelfTest/Baselines/console.swa4.approved.txt index 76af9f5523e..ee0f5d313f5 100644 --- a/3rdparty/catch/projects/SelfTest/Baselines/console.swa4.approved.txt +++ b/3rdparty/catch/projects/SelfTest/Baselines/console.swa4.approved.txt @@ -1,615 +1,40 @@ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -CatchSelfTest is a host application. + is a host application. Run with -? for options ------------------------------------------------------------------------------- -toString(enum) +# A test name that starts with a # ------------------------------------------------------------------------------- -EnumToString.cpp: +MiscTests.cpp: ............................................................................... -EnumToString.cpp:: +MiscTests.cpp:: PASSED: - CHECK( Catch::toString(e0) == "0" ) -with expansion: - "0" == "0" - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e1) == "1" ) -with expansion: - "1" == "1" +with message: + yay ------------------------------------------------------------------------------- -toString(enum w/operator<<) -------------------------------------------------------------------------------- -EnumToString.cpp: -............................................................................... - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e0) == "E2{0}" ) -with expansion: - "E2{0}" == "E2{0}" - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e1) == "E2{1}" ) -with expansion: - "E2{1}" == "E2{1}" - -------------------------------------------------------------------------------- -toString(enum class) -------------------------------------------------------------------------------- -EnumToString.cpp: -............................................................................... - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e0) == "0" ) -with expansion: - "0" == "0" - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e1) == "1" ) -with expansion: - "1" == "1" - -------------------------------------------------------------------------------- -toString(enum class w/operator<<) -------------------------------------------------------------------------------- -EnumToString.cpp: -............................................................................... - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e0) == "E2/V0" ) -with expansion: - "E2/V0" == "E2/V0" - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e1) == "E2/V1" ) -with expansion: - "E2/V1" == "E2/V1" - -EnumToString.cpp:: -PASSED: - CHECK( Catch::toString(e3) == "Unknown enum value 10" ) -with expansion: - "Unknown enum value 10" - == - "Unknown enum value 10" - -------------------------------------------------------------------------------- -Some simple comparisons between doubles -------------------------------------------------------------------------------- -ApproxTests.cpp: -............................................................................... - -ApproxTests.cpp:: -PASSED: - REQUIRE( d == Approx( 1.23 ) ) -with expansion: - 1.23 == Approx( 1.23 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d != Approx( 1.22 ) ) -with expansion: - 1.23 != Approx( 1.22 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d != Approx( 1.24 ) ) -with expansion: - 1.23 != Approx( 1.24 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( Approx( d ) == 1.23 ) -with expansion: - Approx( 1.23 ) == 1.23 - -ApproxTests.cpp:: -PASSED: - REQUIRE( Approx( d ) != 1.22 ) -with expansion: - Approx( 1.23 ) != 1.22 - -ApproxTests.cpp:: -PASSED: - REQUIRE( Approx( d ) != 1.24 ) -with expansion: - Approx( 1.23 ) != 1.24 - -------------------------------------------------------------------------------- -Approximate comparisons with different epsilons -------------------------------------------------------------------------------- -ApproxTests.cpp: -............................................................................... - -ApproxTests.cpp:: -PASSED: - REQUIRE( d != Approx( 1.231 ) ) -with expansion: - 1.23 != Approx( 1.231 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ) -with expansion: - 1.23 == Approx( 1.231 ) - -------------------------------------------------------------------------------- -Approximate comparisons with floats -------------------------------------------------------------------------------- -ApproxTests.cpp: -............................................................................... - -ApproxTests.cpp:: -PASSED: - REQUIRE( 1.23f == Approx( 1.23f ) ) -with expansion: - 1.23f == Approx( 1.2300000191 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( 0.0f == Approx( 0.0f ) ) -with expansion: - 0.0f == Approx( 0.0 ) - -------------------------------------------------------------------------------- -Approximate comparisons with ints -------------------------------------------------------------------------------- -ApproxTests.cpp: -............................................................................... - -ApproxTests.cpp:: -PASSED: - REQUIRE( 1 == Approx( 1 ) ) -with expansion: - 1 == Approx( 1.0 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( 0 == Approx( 0 ) ) -with expansion: - 0 == Approx( 0.0 ) - -------------------------------------------------------------------------------- -Approximate comparisons with mixed numeric types -------------------------------------------------------------------------------- -ApproxTests.cpp: -............................................................................... - -ApproxTests.cpp:: -PASSED: - REQUIRE( 1.0f == Approx( 1 ) ) -with expansion: - 1.0f == Approx( 1.0 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( 0 == Approx( dZero) ) -with expansion: - 0 == Approx( 0.0 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( 0 == Approx( dSmall ).epsilon( 0.001 ) ) -with expansion: - 0 == Approx( 0.00001 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( 1.234f == Approx( dMedium ) ) -with expansion: - 1.234f == Approx( 1.234 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( dMedium == Approx( 1.234f ) ) -with expansion: - 1.234 == Approx( 1.2339999676 ) - -------------------------------------------------------------------------------- -Use a custom approx -------------------------------------------------------------------------------- -ApproxTests.cpp: -............................................................................... - -ApproxTests.cpp:: -PASSED: - REQUIRE( d == approx( 1.23 ) ) -with expansion: - 1.23 == Approx( 1.23 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d == approx( 1.22 ) ) -with expansion: - 1.23 == Approx( 1.22 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d == approx( 1.24 ) ) -with expansion: - 1.23 == Approx( 1.24 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( d != approx( 1.25 ) ) -with expansion: - 1.23 != Approx( 1.25 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) == 1.23 ) -with expansion: - Approx( 1.23 ) == 1.23 - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) == 1.22 ) -with expansion: - Approx( 1.23 ) == 1.22 - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) == 1.24 ) -with expansion: - Approx( 1.23 ) == 1.24 - -ApproxTests.cpp:: -PASSED: - REQUIRE( approx( d ) != 1.25 ) -with expansion: - Approx( 1.23 ) != 1.25 - -------------------------------------------------------------------------------- -Approximate PI -------------------------------------------------------------------------------- -ApproxTests.cpp: -............................................................................... - -ApproxTests.cpp:: -PASSED: - REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) -with expansion: - 3.1428571429 == Approx( 3.141 ) - -ApproxTests.cpp:: -PASSED: - REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) -with expansion: - 3.1428571429 != Approx( 3.141 ) - -------------------------------------------------------------------------------- -A METHOD_AS_TEST_CASE based test run that succeeds -------------------------------------------------------------------------------- -ClassTests.cpp: -............................................................................... - -ClassTests.cpp:: -PASSED: - REQUIRE( s == "hello" ) -with expansion: - "hello" == "hello" - -------------------------------------------------------------------------------- -A METHOD_AS_TEST_CASE based test run that fails -------------------------------------------------------------------------------- -ClassTests.cpp: -............................................................................... - -ClassTests.cpp:: FAILED: - REQUIRE( s == "world" ) -with expansion: - "hello" == "world" - -------------------------------------------------------------------------------- -A TEST_CASE_METHOD based test run that succeeds -------------------------------------------------------------------------------- -ClassTests.cpp: -............................................................................... - -ClassTests.cpp:: -PASSED: - REQUIRE( m_a == 1 ) -with expansion: - 1 == 1 - -------------------------------------------------------------------------------- -A TEST_CASE_METHOD based test run that fails -------------------------------------------------------------------------------- -ClassTests.cpp: -............................................................................... - -ClassTests.cpp:: FAILED: - REQUIRE( m_a == 2 ) -with expansion: - 1 == 2 - -------------------------------------------------------------------------------- -Equality checks that should succeed -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven == 7 ) -with expansion: - 7 == 7 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) -with expansion: - 9.1f == Approx( 9.1000003815 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) -with expansion: - 3.1415926535 == Approx( 3.1415926535 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello == "hello" ) -with expansion: - "hello" == "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( "hello" == data.str_hello ) -with expansion: - "hello" == "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello.size() == 5 ) -with expansion: - 5 == 5 - -ConditionTests.cpp:: -PASSED: - REQUIRE( x == Approx( 1.3 ) ) -with expansion: - 1.3 == Approx( 1.3 ) - -------------------------------------------------------------------------------- -Equality checks that should fail +'Not' checks that should fail ------------------------------------------------------------------------------- ConditionTests.cpp: ............................................................................... ConditionTests.cpp:: FAILED: - CHECK( data.int_seven == 6 ) -with expansion: - 7 == 6 + CHECK( false != false ) ConditionTests.cpp:: FAILED: - CHECK( data.int_seven == 8 ) -with expansion: - 7 == 8 - -------------------------------------------------------------------------------- -Inequality checks that should succeed -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven != 6 ) -with expansion: - 7 != 6 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven != 8 ) -with expansion: - 7 != 8 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one != Approx( 9.11f ) ) -with expansion: - 9.1f != Approx( 9.1099996567 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one != Approx( 9.0f ) ) -with expansion: - 9.1f != Approx( 9.0 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one != Approx( 1 ) ) -with expansion: - 9.1f != Approx( 1.0 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one != Approx( 0 ) ) -with expansion: - 9.1f != Approx( 0.0 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.double_pi != Approx( 3.1415 ) ) -with expansion: - 3.1415926535 != Approx( 3.1415 ) - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello != "goodbye" ) -with expansion: - "hello" != "goodbye" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello != "hell" ) -with expansion: - "hello" != "hell" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello != "hello1" ) -with expansion: - "hello" != "hello1" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello.size() != 6 ) -with expansion: - 5 != 6 - -------------------------------------------------------------------------------- -Inequality checks that should fail -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... + CHECK( true != true ) ConditionTests.cpp:: FAILED: - CHECK( data.int_seven != 7 ) + CHECK( !true ) with expansion: - 7 != 7 + false ConditionTests.cpp:: FAILED: - CHECK( data.float_nine_point_one != Approx( 9.1f ) ) -with expansion: - 9.1f != Approx( 9.1000003815 ) - -------------------------------------------------------------------------------- -Ordering comparison checks that should succeed -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven < 8 ) -with expansion: - 7 < 8 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven > 6 ) -with expansion: - 7 > 6 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven > 0 ) -with expansion: - 7 > 0 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven > -1 ) -with expansion: - 7 > -1 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven >= 7 ) -with expansion: - 7 >= 7 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven >= 6 ) -with expansion: - 7 >= 6 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven <= 7 ) -with expansion: - 7 <= 7 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.int_seven <= 8 ) -with expansion: - 7 <= 8 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one > 9 ) -with expansion: - 9.1f > 9 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one < 10 ) -with expansion: - 9.1f < 10 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.float_nine_point_one < 9.2 ) -with expansion: - 9.1f < 9.2 - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello <= "hello" ) -with expansion: - "hello" <= "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello >= "hello" ) -with expansion: - "hello" >= "hello" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello < "hellp" ) -with expansion: - "hello" < "hellp" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello < "zebra" ) -with expansion: - "hello" < "zebra" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello > "hellm" ) -with expansion: - "hello" > "hellm" - -ConditionTests.cpp:: -PASSED: - REQUIRE( data.str_hello > "a" ) -with expansion: - "hello" > "a" - -------------------------------------------------------------------------------- -Ordering comparison checks that should fail -------------------------------------------------------------------------------- -ConditionTests.cpp: -............................................................................... - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven > 7 ) -with expansion: - 7 > 7 - -ConditionTests.cpp:: FAILED: - CHECK( data.int_seven < 7 ) -with expansion: - 7 < 7 + CHECK_FALSE( true ) =============================================================================== -test cases: 21 | 16 passed | 3 failed | 2 failed as expected -assertions: 81 | 73 passed | 4 failed | 4 failed as expected +test cases: 2 | 1 passed | 1 failed +assertions: 5 | 1 passed | 4 failed diff --git a/3rdparty/catch/projects/SelfTest/Baselines/junit.sw.approved.txt b/3rdparty/catch/projects/SelfTest/Baselines/junit.sw.approved.txt index 3fd998f052a..55ee56c922c 100644 --- a/3rdparty/catch/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/3rdparty/catch/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -1,30 +1,119 @@ - - - - - - - - - - - - - + + + + +ConditionTests.cpp: + + +ConditionTests.cpp: + + +ConditionTests.cpp: + + +ConditionTests.cpp: + + +ConditionTests.cpp: + + +ConditionTests.cpp: + + +ConditionTests.cpp: + + +ConditionTests.cpp: + + + + + + + + ClassTests.cpp: - + ClassTests.cpp: - + + + +to infinity and beyond +MiscTests.cpp: + + + + + +TrickyTests.cpp: + + +TrickyTests.cpp: + + + + + + +unexpected exception +ExceptionTests.cpp: + + + + + + + + + + + + + + + + + + + + +MiscTests.cpp: + + + + +custom exception - not std +ExceptionTests.cpp: + + + + +custom exception - not std +ExceptionTests.cpp: + + + + +custom std exception +ExceptionTests.cpp: + + + + + +MiscTests.cpp: + + ConditionTests.cpp: @@ -66,7 +155,63 @@ ConditionTests.cpp: ConditionTests.cpp: - + + + + +MiscTests.cpp: + + + + + + + + +expected exception +ExceptionTests.cpp: + + +ExceptionTests.cpp: + + +expected exception +ExceptionTests.cpp: + + + + +This is a failure +MessageTests.cpp: + + + + +MessageTests.cpp: + + + + + + + + + +this message should be logged +so should this +MessageTests.cpp: + + + + +this message should be logged +MessageTests.cpp: + + +and this, but later +MessageTests.cpp: + + ConditionTests.cpp: @@ -84,7 +229,53 @@ ConditionTests.cpp: ConditionTests.cpp: - + + + + + + + + + + + + + + + + + + + + + + + +MiscTests.cpp: + + + + + +MiscTests.cpp: + + + + +ExceptionTests.cpp: + + + + + +custom exception +ExceptionTests.cpp: + + + + + ConditionTests.cpp: @@ -144,161 +335,7 @@ ConditionTests.cpp: ConditionTests.cpp: - - - - - - - - - -ConditionTests.cpp: - - -ConditionTests.cpp: - - -ConditionTests.cpp: - - -ConditionTests.cpp: - - -ConditionTests.cpp: - - -ConditionTests.cpp: - - -ConditionTests.cpp: - - -ConditionTests.cpp: - - - - - -expected exception -ExceptionTests.cpp: - - -ExceptionTests.cpp: - - -expected exception -ExceptionTests.cpp: - - - - -unexpected exception -ExceptionTests.cpp: - - - - -unexpected exception -ExceptionTests.cpp: - - - - -unexpected exception -ExceptionTests.cpp: - - - - -expected exception -ExceptionTests.cpp: - - - - -expected exception -ExceptionTests.cpp: - - - - -expected exception -ExceptionTests.cpp: - - - - -custom exception -ExceptionTests.cpp: - - - - -custom std exception -ExceptionTests.cpp: - - - - -custom exception - not std -ExceptionTests.cpp: - - - - -custom exception - not std -ExceptionTests.cpp: - - - - -3.14 -ExceptionTests.cpp: - - - - - - - - -ExceptionTests.cpp: - - - - - - - - -this message should be logged -so should this -MessageTests.cpp: - - - - -this message should be logged -MessageTests.cpp: - - -and this, but later -MessageTests.cpp: - - - - -This is a failure -MessageTests.cpp: - - - - -MessageTests.cpp: - - - + Message from section one @@ -311,320 +348,6 @@ Message from section two MessageTests.cpp: - - -Message from section one -Message from section two - - - - -current counter 10 -i := 10 -MessageTests.cpp: - - - - - -Previous info should not be seen -MessageTests.cpp: - - - - -hi -i := 7 -MessageTests.cpp: - - - - - - - - - -MiscTests.cpp: - - - - - - - - - -MiscTests.cpp: - - - - -Testing if fib[0] (1) is even -MiscTests.cpp: - - -Testing if fib[1] (1) is even -MiscTests.cpp: - - -Testing if fib[3] (3) is even -MiscTests.cpp: - - -Testing if fib[4] (5) is even -MiscTests.cpp: - - -Testing if fib[6] (13) is even -MiscTests.cpp: - - -Testing if fib[7] (21) is even -MiscTests.cpp: - - - - -A string sent directly to stdout - - -A string sent directly to stderr - - - - - - -MiscTests.cpp: - - -MiscTests.cpp: - - - - - -MiscTests.cpp: - - -MiscTests.cpp: - - - - - - -3 -MiscTests.cpp: - - - - - - -MiscTests.cpp: - - - - -MiscTests.cpp: - - - - -MiscTests.cpp: - - - - -MiscTests.cpp: - - - - - - - - - - - -MiscTests.cpp: - - - - - -MiscTests.cpp: - - - - - - - - - - - - -to infinity and beyond -MiscTests.cpp: - - - - - - -MiscTests.cpp: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -hello -hello - - - - - - - - - - -TrickyTests.cpp: - - -TrickyTests.cpp: - - - - -TrickyTests.cpp: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -656,30 +379,297 @@ TrickyTests.cpp: - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +current counter 10 +i := 10 +MessageTests.cpp: + + + + + + + - - - - + + +A string sent directly to stdout + + +A string sent directly to stderr + + + + + Message from section one Message from section two + + + + +MiscTests.cpp: + + + + + +hello +hello + + + + +MiscTests.cpp: + + + + + + + + + + + + + + + + + + + + + + + + + + + + +3.14 +ExceptionTests.cpp: + + + + + + + +unexpected exception +ExceptionTests.cpp: + + + + +expected exception +ExceptionTests.cpp: + + + + +expected exception +ExceptionTests.cpp: + + + + +expected exception +ExceptionTests.cpp: + + + + +unexpected exception +ExceptionTests.cpp: + + + + + + + + + + + + + + + + + + + + + +MiscTests.cpp: + + +MiscTests.cpp: + + + + + +MiscTests.cpp: + + +MiscTests.cpp: + + + + + + + + + +Previous info should not be seen +MessageTests.cpp: + + + + +MiscTests.cpp: + + + + +Testing if fib[0] (1) is even +MiscTests.cpp: + + +Testing if fib[1] (1) is even +MiscTests.cpp: + + +Testing if fib[3] (3) is even +MiscTests.cpp: + + +Testing if fib[4] (5) is even +MiscTests.cpp: + + +Testing if fib[6] (13) is even +MiscTests.cpp: + + +Testing if fib[7] (21) is even +MiscTests.cpp: + + + + +MiscTests.cpp: + + + + + + + + + + + + + + + + + + + + + + +3 +MiscTests.cpp: + + + + +hi +i := 7 +MessageTests.cpp: + + + + + + + +TrickyTests.cpp: + + + + + + + + + + + + + + + + + + + + + + + A string sent directly to stdout +Message from section one +Message from section two hello hello diff --git a/3rdparty/catch/projects/SelfTest/Baselines/xml.sw.approved.txt b/3rdparty/catch/projects/SelfTest/Baselines/xml.sw.approved.txt index ed730bbdbde..dc192152a1a 100644 --- a/3rdparty/catch/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/3rdparty/catch/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -1,1344 +1,11 @@ - - - - - - Catch::toString(e0) == "0" - - - "0" == "0" - - - - - Catch::toString(e1) == "1" - - - "1" == "1" - - - - - - - - Catch::toString(e0) == "E2{0}" - - - "E2{0}" == "E2{0}" - - - - - Catch::toString(e1) == "E2{1}" - - - "E2{1}" == "E2{1}" - - - - - - - - Catch::toString(e0) == "0" - - - "0" == "0" - - - - - Catch::toString(e1) == "1" - - - "1" == "1" - - - - - - - - Catch::toString(e0) == "E2/V0" - - - "E2/V0" == "E2/V0" - - - - - Catch::toString(e1) == "E2/V1" - - - "E2/V1" == "E2/V1" - - - - - Catch::toString(e3) == "Unknown enum value 10" - - - "Unknown enum value 10" -== -"Unknown enum value 10" - - - - - - - - d == Approx( 1.23 ) - - - 1.23 == Approx( 1.23 ) - - - - - d != Approx( 1.22 ) - - - 1.23 != Approx( 1.22 ) - - - - - d != Approx( 1.24 ) - - - 1.23 != Approx( 1.24 ) - - - - - Approx( d ) == 1.23 - - - Approx( 1.23 ) == 1.23 - - - - - Approx( d ) != 1.22 - - - Approx( 1.23 ) != 1.22 - - - - - Approx( d ) != 1.24 - - - Approx( 1.23 ) != 1.24 - - - - - - - - d != Approx( 1.231 ) - - - 1.23 != Approx( 1.231 ) - - - - - d == Approx( 1.231 ).epsilon( 0.1 ) - - - 1.23 == Approx( 1.231 ) - - - - - - - - 1.23f == Approx( 1.23f ) - - - 1.23f == Approx( 1.2300000191 ) - - - - - 0.0f == Approx( 0.0f ) - - - 0.0f == Approx( 0.0 ) - - - - - - - - 1 == Approx( 1 ) - - - 1 == Approx( 1.0 ) - - - - - 0 == Approx( 0 ) - - - 0 == Approx( 0.0 ) - - - - - - - - 1.0f == Approx( 1 ) - - - 1.0f == Approx( 1.0 ) - - - - - 0 == Approx( dZero) - - - 0 == Approx( 0.0 ) - - - - - 0 == Approx( dSmall ).epsilon( 0.001 ) - - - 0 == Approx( 0.00001 ) - - - - - 1.234f == Approx( dMedium ) - - - 1.234f == Approx( 1.234 ) - - - - - dMedium == Approx( 1.234f ) - - - 1.234 == Approx( 1.2339999676 ) - - - - - - - - d == approx( 1.23 ) - - - 1.23 == Approx( 1.23 ) - - - - - d == approx( 1.22 ) - - - 1.23 == Approx( 1.22 ) - - - - - d == approx( 1.24 ) - - - 1.23 == Approx( 1.24 ) - - - - - d != approx( 1.25 ) - - - 1.23 != Approx( 1.25 ) - - - - - approx( d ) == 1.23 - - - Approx( 1.23 ) == 1.23 - - - - - approx( d ) == 1.22 - - - Approx( 1.23 ) == 1.22 - - - - - approx( d ) == 1.24 - - - Approx( 1.23 ) == 1.24 - - - - - approx( d ) != 1.25 - - - Approx( 1.23 ) != 1.25 - - - - - - - - divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) - - - 3.1428571429 == Approx( 3.141 ) - - - - - divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) - - - 3.1428571429 != Approx( 3.141 ) - - - - - - - - s == "hello" - - - "hello" == "hello" - - - - - - - - s == "world" - - - "hello" == "world" - - - - - - - - m_a == 1 - - - 1 == 1 - - - - - - - - m_a == 2 - - - 1 == 2 - - - - - - - - data.int_seven == 7 - - - 7 == 7 - - - - - data.float_nine_point_one == Approx( 9.1f ) - - - 9.1f == Approx( 9.1000003815 ) - - - - - data.double_pi == Approx( 3.1415926535 ) - - - 3.1415926535 == Approx( 3.1415926535 ) - - - - - data.str_hello == "hello" - - - "hello" == "hello" - - - - - "hello" == data.str_hello - - - "hello" == "hello" - - - - - data.str_hello.size() == 5 - - - 5 == 5 - - - - - x == Approx( 1.3 ) - - - 1.3 == Approx( 1.3 ) - - - - - - - - data.int_seven == 6 - - - 7 == 6 - - - - - data.int_seven == 8 - - - 7 == 8 - - - - - data.int_seven == 0 - - - 7 == 0 - - - - - data.float_nine_point_one == Approx( 9.11f ) - - - 9.1f == Approx( 9.1099996567 ) - - - - - data.float_nine_point_one == Approx( 9.0f ) - - - 9.1f == Approx( 9.0 ) - - - - - data.float_nine_point_one == Approx( 1 ) - - - 9.1f == Approx( 1.0 ) - - - - - data.float_nine_point_one == Approx( 0 ) - - - 9.1f == Approx( 0.0 ) - - - - - data.double_pi == Approx( 3.1415 ) - - - 3.1415926535 == Approx( 3.1415 ) - - - - - data.str_hello == "goodbye" - - - "hello" == "goodbye" - - - - - data.str_hello == "hell" - - - "hello" == "hell" - - - - - data.str_hello == "hello1" - - - "hello" == "hello1" - - - - - data.str_hello.size() == 6 - - - 5 == 6 - - - - - x == Approx( 1.301 ) - - - 1.3 == Approx( 1.301 ) - - - - - - - - data.int_seven != 6 - - - 7 != 6 - - - - - data.int_seven != 8 - - - 7 != 8 - - - - - data.float_nine_point_one != Approx( 9.11f ) - - - 9.1f != Approx( 9.1099996567 ) - - - - - data.float_nine_point_one != Approx( 9.0f ) - - - 9.1f != Approx( 9.0 ) - - - - - data.float_nine_point_one != Approx( 1 ) - - - 9.1f != Approx( 1.0 ) - - - - - data.float_nine_point_one != Approx( 0 ) - - - 9.1f != Approx( 0.0 ) - - - - - data.double_pi != Approx( 3.1415 ) - - - 3.1415926535 != Approx( 3.1415 ) - - - - - data.str_hello != "goodbye" - - - "hello" != "goodbye" - - - - - data.str_hello != "hell" - - - "hello" != "hell" - - - - - data.str_hello != "hello1" - - - "hello" != "hello1" - - - - - data.str_hello.size() != 6 - - - 5 != 6 - - - - - - - - data.int_seven != 7 - - - 7 != 7 - - - - - data.float_nine_point_one != Approx( 9.1f ) - - - 9.1f != Approx( 9.1000003815 ) - - - - - data.double_pi != Approx( 3.1415926535 ) - - - 3.1415926535 != Approx( 3.1415926535 ) - - - - - data.str_hello != "hello" - - - "hello" != "hello" - - - - - data.str_hello.size() != 5 - - - 5 != 5 - - - - - - - - data.int_seven < 8 - - - 7 < 8 - - - - - data.int_seven > 6 - - - 7 > 6 - - - - - data.int_seven > 0 - - - 7 > 0 - - - - - data.int_seven > -1 - - - 7 > -1 - - - - - data.int_seven >= 7 - - - 7 >= 7 - - - - - data.int_seven >= 6 - - - 7 >= 6 - - - - - data.int_seven <= 7 - - - 7 <= 7 - - - - - data.int_seven <= 8 - - - 7 <= 8 - - - - - data.float_nine_point_one > 9 - - - 9.1f > 9 - - - - - data.float_nine_point_one < 10 - - - 9.1f < 10 - - - - - data.float_nine_point_one < 9.2 - - - 9.1f < 9.2 - - - - - data.str_hello <= "hello" - - - "hello" <= "hello" - - - - - data.str_hello >= "hello" - - - "hello" >= "hello" - - - - - data.str_hello < "hellp" - - - "hello" < "hellp" - - - - - data.str_hello < "zebra" - - - "hello" < "zebra" - - - - - data.str_hello > "hellm" - - - "hello" > "hellm" - - - - - data.str_hello > "a" - - - "hello" > "a" - - - - - - - - data.int_seven > 7 - - - 7 > 7 - - - - - data.int_seven < 7 - - - 7 < 7 - - - - - data.int_seven > 8 - - - 7 > 8 - - - - - data.int_seven < 6 - - - 7 < 6 - - - - - data.int_seven < 0 - - - 7 < 0 - - - - - data.int_seven < -1 - - - 7 < -1 - - - - - data.int_seven >= 8 - - - 7 >= 8 - - - - - data.int_seven <= 6 - - - 7 <= 6 - - - - - data.float_nine_point_one < 9 - - - 9.1f < 9 - - - - - data.float_nine_point_one > 10 - - - 9.1f > 10 - - - - - data.float_nine_point_one > 9.2 - - - 9.1f > 9.2 - - - - - data.str_hello > "hello" - - - "hello" > "hello" - - - - - data.str_hello < "hello" - - - "hello" < "hello" - - - - - data.str_hello > "hellp" - - - "hello" > "hellp" - - - - - data.str_hello > "z" - - - "hello" > "z" - - - - - data.str_hello < "hellm" - - - "hello" < "hellm" - - - - - data.str_hello < "a" - - - "hello" < "a" - - - - - data.str_hello >= "z" - - - "hello" >= "z" - - - - - data.str_hello <= "a" - - - "hello" <= "a" - - - - - - - - i == 1 - - - 1 == 1 - - - - - ui == 2 - - - 2 == 2 - - - - - l == 3 - - - 3 == 3 - - - - - ul == 4 - - - 4 == 4 - - - - - c == 5 - - - 5 == 5 - - - - - uc == 6 - - - 6 == 6 - - - - - 1 == i - - - 1 == 1 - - - - - 2 == ui - - - 2 == 2 - - - - - 3 == l - - - 3 == 3 - - - - - 4 == ul - - - 4 == 4 - - - - - 5 == c - - - 5 == 5 - - - - - 6 == uc - - - 6 == 6 - - - - - (std::numeric_limits<unsigned long>::max)() > ul - - - 18446744073709551615 (0x) -> -4 - - - - - - - - long_var == unsigned_char_var - - - 1 == 1 - - - - - long_var == unsigned_short_var - - - 1 == 1 - - - - - long_var == unsigned_int_var - - - 1 == 1 - - - - - long_var == unsigned_long_var - - - 1 == 1 - - - - - - - - unsigned_char_var == 1 - - - 1 == 1 - - - - - unsigned_short_var == 1 - - - 1 == 1 - - - - - unsigned_int_var == 1 - - - 1 == 1 - - - - - unsigned_long_var == 1 - - - 1 == 1 - - - - - - - - ( -1 > 2u ) - - - true - - - - - -1 > 2u - - - -1 > 2 - - - - - ( 2u < -1 ) - - - true - - - - - 2u < -1 - - - 2 < -1 - - - - - ( minInt > 2u ) - - - true - - - - - minInt > 2u - - - -2147483648 > 2 - - - - - - - - 54 == 6*9 - - - 54 == 54 - - - - - - - - p == nullptr - - - NULL == nullptr - - - - - p == pNULL - - - NULL == NULL - - - - - p != nullptr - - - 0x != nullptr - - - - - cp != nullptr - - - 0x != nullptr - - - - - cpc != nullptr - - - 0x != nullptr - - - - - returnsNull() == nullptr - - - {null string} == nullptr - - - - - returnsConstNull() == nullptr - - - {null string} == nullptr - - - - - nullptr != p - - - nullptr != 0x - - - - - - - - false == false - - - false == false - - - - - true == true - - - true == true - - - - - !false - - - true - - - - - !false - - - !false - - - - - !falseValue - - - true - - - - - !falseValue - - - !false - - - - - !(1 == 2) - - - true - - - - - !1 == 2 - - - !(1 == 2) - - + + + - + false != false @@ -1346,7 +13,7 @@ false != false - + true != true @@ -1354,7 +21,7 @@ true != true - + !true @@ -1362,7 +29,7 @@ false - + !true @@ -1370,7 +37,7 @@ !true - + !trueValue @@ -1378,7 +45,7 @@ false - + !trueValue @@ -1386,7 +53,7 @@ !true - + !(1 == 1) @@ -1394,7 +61,7 @@ false - + !1 == 1 @@ -1404,2483 +71,197 @@ - - + + - thisThrows() + false == false - thisThrows() + false == false - + - thisDoesntThrow() + true == true - thisDoesntThrow() + true == true - + - thisThrows() + !false - thisThrows() + true + + + + + !false + + + !false + + + + + !falseValue + + + true + + + + + !falseValue + + + !false + + + + + !(1 == 2) + + + true + + + + + !1 == 2 + + + !(1 == 2) - - - - thisThrows() - - - thisThrows() - - - expected exception - - - - - thisDoesntThrow() - - - thisDoesntThrow() - - - - - thisThrows() - - - thisThrows() - - - expected exception - - - - - - - unexpected exception - - - - - - - 1 == 1 - - - 1 == 1 - - - - - {Unknown expression after the reported line} - - - {Unknown expression after the reported line} - - - unexpected exception - - - - - -
- - unexpected exception - - -
- -
- - - - thisThrows() == 0 - - - thisThrows() == 0 - - - expected exception - - - - - - - - thisThrows() == 0 - - - thisThrows() == 0 - - - expected exception - - - - - - - - thisThrows() == 0 - - - thisThrows() == 0 - - - expected exception - - - - - - - - - - custom exception - - - - - - custom std exception - - - - - - - throwCustom() - - - throwCustom() - - - custom exception - not std - - - - - - - - throwCustom() - - - throwCustom() - - - custom exception - not std - - - - - - - 3.14 - - - - - - - thisFunctionNotImplemented( 7 ) - - - thisFunctionNotImplemented( 7 ) - - - - - -
- + +
+ - thisThrows(), "expected exception" + is_true<true>::value == true - thisThrows(), "expected exception" + true == true + + + + + true == is_true<true>::value + + + true == true + + + +
+
+ + + is_true<false>::value == false + + + false == false + + + + + false == is_true<false>::value + + + false == false + + + +
+
+ + + !is_true<false>::value + + + true
-
- +
+ - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + !!is_true<true>::value - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + true
-
- +
+ - thisThrows(), StartsWith( "expected" ) + is_true<true>::value - thisThrows(), StartsWith( "expected" ) + true - + - thisThrows(), EndsWith( "exception" ) + !is_true<false>::value - thisThrows(), EndsWith( "exception" ) + !false - - - thisThrows(), Contains( "except" ) - - - thisThrows(), Contains( "except" ) - - - - - thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) - - - thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) - - - +
- - + + - thisThrows(), "expected exception" + s == "world" - thisThrows(), "expected exception" - - - - - thisThrows(), "should fail" - - - expected exception + "hello" == "world" - - + + - multiply( i, 2 ) == i*2 + s == "hello" - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 200 == 200 - - - - - multiply( i, 2 ) == i*2 - - - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 202 == 202 - - - - - multiply( i, 2 ) == i*2 - - - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 204 == 204 - - - - - multiply( i, 2 ) == i*2 - - - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 206 == 206 - - - - - multiply( i, 2 ) == i*2 - - - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 208 == 208 - - - - - multiply( i, 2 ) == i*2 - - - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 210 == 210 - - - - - multiply( i, 2 ) == i*2 - - - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 212 == 212 - - - - - multiply( i, 2 ) == i*2 - - - 2 == 2 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 4 == 4 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 6 == 6 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 8 == 8 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 10 == 10 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 30 == 30 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 40 == 40 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 42 == 42 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 - - - - - multiply( i, 2 ) == i*2 - - - 72 == 72 - - - - - multiply( j, 2 ) == j*2 - - - 214 == 214 + "hello" == "hello" - - + + - i->first == i->second-1 - - - 0 == 0 - - - - - i->first == i->second-1 - - - 2 == 2 - - - - - - - this is a message - - - this is a warning - - - - - - - - - this message should be logged - - - so should this - - - - a == 1 - - - 2 == 1 - - - - - - - - a == 2 - - - 2 == 2 - - - - this message should be logged - - - - a == 1 - - - 2 == 1 - - - - and this, but later - - - - a == 0 - - - 2 == 0 - - - - - a == 2 - - - 2 == 2 - - - - - - - This is a failure - - - - - - - - - - - -
- - Message from section one - - -
-
- - Message from section two - - -
- -
- -
- -
-
- -
- -
- - - - i < 10 - - - 0 < 10 - - - - - i < 10 - - - 1 < 10 - - - - - i < 10 - - - 2 < 10 - - - - - i < 10 - - - 3 < 10 - - - - - i < 10 - - - 4 < 10 - - - - - i < 10 - - - 5 < 10 - - - - - i < 10 - - - 6 < 10 - - - - - i < 10 - - - 7 < 10 - - - - - i < 10 - - - 8 < 10 - - - - - i < 10 - - - 9 < 10 - - - - current counter 10 - - - i := 10 - - - - i < 10 - - - 10 < 10 - - - - - - - - 1 == 2 + m_a == 2 1 == 2 - - - - - - - - Previous info should not be seen - - - - hi - - - i := 7 - - + + - false - - - false - - - - - - - actual address of p: 0x - - - toString(p): 0x - - - - -
- - - a != b - - - 1 != 2 - - - - - b != a - - - 2 != 1 - - - -
-
- - - a != b - - - 1 != 2 - - - -
- -
- -
- - - a != b - - - 1 != 2 - - - - - b != a - - - 2 != 1 - - -
- - - a != b - - - 1 != 2 - - - -
- -
- -
- -
-
- - - a == b - - - 1 == 2 - - - -
- -
-
-
- - - a != b - - - 1 != 2 - - - -
- -
-
-
- - - a < b - - - 1 < 2 - - - -
- -
- -
- -
-
- -
- -
-
-
- -
- -
-
- -
- -
- -
- - - b > a - - - 0 > 1 - - - -
- -
- - - Testing if fib[0] (1) is even - - - - ( fib[i] % 2 ) == 0 - - - 1 == 0 - - - - Testing if fib[1] (1) is even - - - - ( fib[i] % 2 ) == 0 - - - 1 == 0 - - - - - ( fib[i] % 2 ) == 0 - - - 0 == 0 - - - - Testing if fib[3] (3) is even - - - - ( fib[i] % 2 ) == 0 - - - 1 == 0 - - - - Testing if fib[4] (5) is even - - - - ( fib[i] % 2 ) == 0 - - - 1 == 0 - - - - - ( fib[i] % 2 ) == 0 - - - 0 == 0 - - - - Testing if fib[6] (13) is even - - - - ( fib[i] % 2 ) == 0 - - - 1 == 0 - - - - Testing if fib[7] (21) is even - - - - ( fib[i] % 2 ) == 0 - - - 1 == 0 - - - - - - - - - - - makeString( false ) != static_cast<char*>(nullptr) - - - "valid string" != {null string} - - - - - makeString( true ) == static_cast<char*>(nullptr) - - - {null string} == {null string} - - - - - - - - flag - - - true - - - - - testCheckedIf( true ) - - - true - - - - - - - - flag - - - false - - - - - testCheckedIf( false ) - - - false - - - - - - - - flag - - - true - - - - - testCheckedElse( true ) - - - true - - - - - - - - flag - - - false - - - - - testCheckedElse( false ) - - - false - - - - - -
- -
-
- -
- -
- - - 3 - - - - false - - - false - - - - - - - - x == 0 - - - 0 == 0 - - - - - - - - testStringForMatching(), Contains( "string" ) - - - "this string contains 'abc' as a substring" contains: "string" - - - - - testStringForMatching(), Contains( "abc" ) - - - "this string contains 'abc' as a substring" contains: "abc" - - - - - testStringForMatching(), StartsWith( "this" ) - - - "this string contains 'abc' as a substring" starts with: "this" - - - - - testStringForMatching(), EndsWith( "substring" ) - - - "this string contains 'abc' as a substring" ends with: "substring" - - - - - - - - testStringForMatching(), Contains( "not there" ) - - - "this string contains 'abc' as a substring" contains: "not there" - - - - - - - - testStringForMatching(), StartsWith( "string" ) - - - "this string contains 'abc' as a substring" starts with: "string" - - - - - - - - testStringForMatching(), EndsWith( "this" ) - - - "this string contains 'abc' as a substring" ends with: "this" - - - - - - - - testStringForMatching(), Equals( "something else" ) - - - "this string contains 'abc' as a substring" equals: "something else" - - - - - - - - "", Equals(nullptr) - - - "" equals: "" - - - - - - - - testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) - - - "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" ) - - - - - - - - testStringForMatching(), AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) - - - "this string contains 'abc' as a substring" ( contains: "string" or contains: "not there" ) - - - - - testStringForMatching(), AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) - - - "this string contains 'abc' as a substring" ( contains: "not there" or contains: "string" ) - - - - - - - - testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) - - - "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" - - - - - - - - testStringForMatching(), Contains( "string" ) && Contains( "abc" ) && Contains( "substring" ) && Contains( "contains" ) - - - "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) - - - - - - - - testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) - - - "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) - - - - - testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) - - - "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) - - - - - - - - testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) - - - "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) - - - - - - - - testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) - - - "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) - - - - - - - - testStringForMatching(), !Contains( "different" ) - - - "this string contains 'abc' as a substring" not contains: "different" - - - - - - - - testStringForMatching(), !Contains( "substring" ) - - - "this string contains 'abc' as a substring" not contains: "substring" - - - - - - - - Factorial(0) == 1 + m_a == 1 1 == 1 - - - Factorial(1) == 1 - - - 1 == 1 - - - - - Factorial(2) == 2 - - - 2 == 2 - - - - - Factorial(3) == 6 - - - 6 == 6 - - - - - Factorial(10) == 3628800 - - - 3628800 (0x) == 3628800 (0x) - - - - - - - - - - This one ran - - - - - - - - - - - - - v.size() == 5 - - - 5 == 5 - - - - - v.capacity() >= 5 - - - 5 >= 5 - - -
- - - v.size() == 10 - - - 10 == 10 - - - - - v.capacity() >= 10 - - - 10 >= 10 - - - -
- - - v.size() == 5 - - - 5 == 5 - - - - - v.capacity() >= 5 - - - 5 >= 5 - - -
- - - v.size() == 0 - - - 0 == 0 - - - - - v.capacity() >= 5 - - - 5 >= 5 - - -
- - - v.capacity() == 0 - - - 0 == 0 - - - -
- -
- - - v.size() == 5 - - - 5 == 5 - - - - - v.capacity() >= 5 - - - 5 >= 5 - - -
- - - v.size() == 5 - - - 5 == 5 - - - - - v.capacity() >= 10 - - - 10 >= 10 - - - -
- - - v.size() == 5 - - - 5 == 5 - - - - - v.capacity() >= 5 - - - 5 >= 5 - - -
- - - v.size() == 5 - - - 5 == 5 - - - - - v.capacity() >= 5 - - - 5 >= 5 - - - -
@@ -3895,793 +276,2348 @@ - - - - - + + - s1 == s2 + &o1 == &o2 - "if ($b == 10) { - $a = 20; -}" -== -"if ($b == 10) { - $a = 20; -} -" + 0x == 0x + + + + + o1 == o2 + + + {?} == {?} - - + + - result == "\"wide load\"" + testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) - ""wide load"" == ""wide load"" + "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" ) - - + + + + + - result == "\"wide load\"" + i++ == 7 - ""wide load"" == ""wide load"" + 7 == 7 + + + + + i++ == 8 + + + 8 == 8 - - + + - result == "\"wide load\"" + 1 == 1 - ""wide load"" == ""wide load"" + 1 == 1 - - - - + - result == "\"wide load\"" + {Unknown expression after the reported line} - ""wide load"" == ""wide load"" + {Unknown expression after the reported line} + + unexpected exception + - - - -
- - - encode( "normal string" ) == "normal string" - - - "normal string" == "normal string" - - - -
-
- - - encode( "" ) == "" - - - "" == "" - - - -
-
- - - encode( "smith & jones" ) == "smith &amp; jones" - - - "smith &amp; jones" == "smith &amp; jones" - - - -
-
- - - encode( "smith < jones" ) == "smith &lt; jones" - - - "smith &lt; jones" == "smith &lt; jones" - - - -
-
- - - encode( "smith > jones" ) == "smith > jones" - - - "smith > jones" == "smith > jones" - - - - - encode( "smith ]]> jones" ) == "smith ]]&gt; jones" - - - "smith ]]&gt; jones" -== -"smith ]]&gt; jones" - - - -
-
- - - encode( stringWithQuotes ) == stringWithQuotes - - - "don't "quote" me on that" -== -"don't "quote" me on that" - - - - - encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't &quot;quote&quot; me on that" - - - "don't &quot;quote&quot; me on that" -== -"don't &quot;quote&quot; me on that" - - - -
-
- - - encode( "[\x01]" ) == "[&#x01;]" - - - "[&#x01;]" == "[&#x01;]" - - - -
-
- - - encode( "[\x7F]" ) == "[&#x7F;]" - - - "[&#x7F;]" == "[&#x7F;]" - - - -
- -
- - - - l == std::numeric_limits<long long>::max() - - - 9223372036854775807 (0x) -== -9223372036854775807 (0x) - - - - - - + - -
- + + + + testStringForMatching(), AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) + + + "this string contains 'abc' as a substring" ( contains: "string" or contains: "not there" ) + + + + + testStringForMatching(), AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) + + + "this string contains 'abc' as a substring" ( contains: "not there" or contains: "string" ) + + + + + + + + divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) + + + 3.1428571429 == Approx( 3.141 ) + + + + + divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) + + + 3.1428571429 != Approx( 3.141 ) + + + + + + + + d != Approx( 1.231 ) + + + 1.23 != Approx( 1.231 ) + + + + + d == Approx( 1.231 ).epsilon( 0.1 ) + + + 1.23 == Approx( 1.231 ) + + + + + + + + 1.23f == Approx( 1.23f ) + + + 1.23f == Approx( 1.2300000191 ) + + + + + 0.0f == Approx( 0.0f ) + + + 0.0f == Approx( 0.0 ) + + + + + + + + 1 == Approx( 1 ) + + + 1 == Approx( 1.0 ) + + + + + 0 == Approx( 0 ) + + + 0 == Approx( 0.0 ) + + + + + + + + 1.0f == Approx( 1 ) + + + 1.0f == Approx( 1.0 ) + + + + + 0 == Approx( dZero) + + + 0 == Approx( 0.0 ) + + + + + 0 == Approx( dSmall ).epsilon( 0.001 ) + + + 0 == Approx( 0.00001 ) + + + + + 1.234f == Approx( dMedium ) + + + 1.234f == Approx( 1.234 ) + + + + + dMedium == Approx( 1.234f ) + + + 1.234 == Approx( 1.2339999676 ) + + + + + + + + Catch::alwaysTrue() + + + true + + +
+ - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.shouldDebugBreak == false - - - false == false - - - - - config.abortAfter == -1 - - - -1 == -1 - - - - - config.noThrow == false - - - false == false - - - - - config.reporterNames.empty() + Catch::alwaysTrue() true - -
-
-
- +
+ - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - cfg.testSpec().matches( fakeTestCase( "notIncluded" ) ) == false - - - false == false - - - - - cfg.testSpec().matches( fakeTestCase( "test1" ) ) + Catch::alwaysTrue() true - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false - - - false == false - - - - - cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) - - - true - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false - - - false == false - - - - - cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) - - - true - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.reporterNames[0] == "console" - - - "console" == "console" - - - +
-
-
- + + + Catch::alwaysTrue() + + + true + + +
+ + + Catch::alwaysTrue() + + + true + + +
+ - parseIntoConfig( argv, config ) + Catch::alwaysTrue() - parseIntoConfig( argv, config ) + true - - - config.reporterNames[0] == "xml" - - - "xml" == "xml" - - - +
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.reporterNames.size() == 2 - - - 2 == 2 - - - - - config.reporterNames[0] == "xml" - - - "xml" == "xml" - - - - - config.reporterNames[1] == "junit" - - - "junit" == "junit" - - - -
+ + + + + + a + + + true + + + + + a == &foo + + + 0x == 0x + + + + + + + + m == &S::f + + + 0x +== +0x + + + + + + + + 54 == 6*9 + + + 54 == 54 + + + + + + + + ( -1 > 2u ) + + + true + + + + + -1 > 2u + + + -1 > 2 + + + + + ( 2u < -1 ) + + + true + + + + + 2u < -1 + + + 2 < -1 + + + + + ( minInt > 2u ) + + + true + + + + + minInt > 2u + + + -2147483648 > 2 + + + + + + + + i == 1 + + + 1 == 1 + + + + + ui == 2 + + + 2 == 2 + + + + + l == 3 + + + 3 == 3 + + + + + ul == 4 + + + 4 == 4 + + + + + c == 5 + + + 5 == 5 + + + + + uc == 6 + + + 6 == 6 + + + + + 1 == i + + + 1 == 1 + + + + + 2 == ui + + + 2 == 2 + + + + + 3 == l + + + 3 == 3 + + + + + 4 == ul + + + 4 == 4 + + + + + 5 == c + + + 5 == 5 + + + + + 6 == uc + + + 6 == 6 + + + + + (std::numeric_limits<unsigned long>::max)() > ul + + + 18446744073709551615 (0x) +> +4 + + + + + + + + testStringForMatching(), Contains( "not there" ) + + + "this string contains 'abc' as a substring" contains: "not there" + + + + + + + + throwCustom() + + + throwCustom() + + + custom exception - not std + + + + + + + + throwCustom() + + + throwCustom() + + + custom exception - not std + + + + + + + custom std exception + + + + + + + t == 1u + + + {?} == 1 + + + + + + + + testStringForMatching(), EndsWith( "this" ) + + + "this string contains 'abc' as a substring" ends with: "this" + + + + + + + + data.int_seven == 6 + + + 7 == 6 + + + + + data.int_seven == 8 + + + 7 == 8 + + + + + data.int_seven == 0 + + + 7 == 0 + + + + + data.float_nine_point_one == Approx( 9.11f ) + + + 9.1f == Approx( 9.1099996567 ) + + + + + data.float_nine_point_one == Approx( 9.0f ) + + + 9.1f == Approx( 9.0 ) + + + + + data.float_nine_point_one == Approx( 1 ) + + + 9.1f == Approx( 1.0 ) + + + + + data.float_nine_point_one == Approx( 0 ) + + + 9.1f == Approx( 0.0 ) + + + + + data.double_pi == Approx( 3.1415 ) + + + 3.1415926535 == Approx( 3.1415 ) + + + + + data.str_hello == "goodbye" + + + "hello" == "goodbye" + + + + + data.str_hello == "hell" + + + "hello" == "hell" + + + + + data.str_hello == "hello1" + + + "hello" == "hello1" + + + + + data.str_hello.size() == 6 + + + 5 == 6 + + + + + x == Approx( 1.301 ) + + + 1.3 == Approx( 1.301 ) + + + + + + + + data.int_seven == 7 + + + 7 == 7 + + + + + data.float_nine_point_one == Approx( 9.1f ) + + + 9.1f == Approx( 9.1000003815 ) + + + + + data.double_pi == Approx( 3.1415926535 ) + + + 3.1415926535 == Approx( 3.1415926535 ) + + + + + data.str_hello == "hello" + + + "hello" == "hello" + + + + + "hello" == data.str_hello + + + "hello" == "hello" + + + + + data.str_hello.size() == 5 + + + 5 == 5 + + + + + x == Approx( 1.3 ) + + + 1.3 == Approx( 1.3 ) + + + + + + + + testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) + + + "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" + + + + + + + + testStringForMatching(), Equals( "something else" ) + + + "this string contains 'abc' as a substring" equals: "something else" + + + + + + + + "", Equals(0) + + + "" equals: "" + + + + + +
+ + + thisThrows(), "expected exception" + + + thisThrows(), "expected exception" + + + +
+
+ + + thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + + + thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + + + +
+
+ + + thisThrows(), StartsWith( "expected" ) + + + thisThrows(), StartsWith( "expected" ) + + + + + thisThrows(), EndsWith( "exception" ) + + + thisThrows(), EndsWith( "exception" ) + + + + + thisThrows(), Contains( "except" ) + + + thisThrows(), Contains( "except" ) + + + + + thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) + + + thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) + +
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.reporterNames[0] == "junit" - - - "junit" == "junit" - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.shouldDebugBreak == true - - - true == true - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.shouldDebugBreak - - - true - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.abortAfter == 1 - - - 1 == 1 - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.abortAfter == 2 - - - 2 == 2 - - - -
- -
-
-
- - - parseIntoConfigAndReturnError( argv, config ), Contains( "greater than zero" ) - - - "Value after -x or --abortAfter must be greater than zero -- while parsing: (-x, --abortx <no. failures>)" contains: "greater than zero" - - - -
- -
-
-
- - - parseIntoConfigAndReturnError( argv, config ), Contains( "-x" ) - - - "Unable to convert oops to destination type -- while parsing: (-x, --abortx <no. failures>)" contains: "-x" - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.noThrow == true - - - true == true - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.noThrow == true - - - true == true - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.outputFilename == "filename.ext" - - - "filename.ext" == "filename.ext" - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.outputFilename == "filename.ext" - - - "filename.ext" == "filename.ext" - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.abortAfter == 1 - - - 1 == 1 - - - - - config.shouldDebugBreak - - - true - - - - - config.noThrow == true - - - true == true - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.useColour == UseColour::Auto - - - 0 == 0 - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.useColour == UseColour::Auto - - - 0 == 0 - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.useColour == UseColour::Yes - - - 1 == 1 - - - -
- -
-
-
- - - parseIntoConfig( argv, config ) - - - parseIntoConfig( argv, config ) - - - - - config.useColour == UseColour::No - - - 2 == 2 - - - -
- -
-
-
- - - parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) - - - parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) - - - -
- -
+ +
+ + + + thisThrows() + + + thisThrows() + + + expected exception + + + + + thisDoesntThrow() + + + thisDoesntThrow() + + + + + thisThrows() + + + thisThrows() + + + expected exception + + + + + + + This is a failure + + + + + + + + + + + Factorial(0) == 1 + + + 1 == 1 + + + + + Factorial(1) == 1 + + + 1 == 1 + + + + + Factorial(2) == 2 + + + 2 == 2 + + + + + Factorial(3) == 6 + + + 6 == 6 + + + + + Factorial(10) == 3628800 + + + 3628800 (0x) == 3628800 (0x) + + + + + + + + i->first == i->second-1 + + + 0 == 0 + + + + + i->first == i->second-1 + + + 2 == 2 + + + + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 200 == 200 + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 202 == 202 + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 204 == 204 + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 206 == 206 + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 208 == 208 + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 210 == 210 + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 212 == 212 + + + + + multiply( i, 2 ) == i*2 + + + 2 == 2 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 4 == 4 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 6 == 6 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 8 == 8 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 10 == 10 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 30 == 30 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 40 == 40 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 42 == 42 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + multiply( i, 2 ) == i*2 + + + 72 == 72 + + + + + multiply( j, 2 ) == j*2 + + + 214 == 214 + + + + + + + + d >= Approx( 1.22 ) + + + 1.23 >= Approx( 1.22 ) + + + + + d >= Approx( 1.23 ) + + + 1.23 >= Approx( 1.23 ) + + + + + !d >= Approx( 1.24 ) + + + !(1.23 >= Approx( 1.24 )) + + + + + d >= Approx( 1.24 ).epsilon(0.1) + + + 1.23 >= Approx( 1.24 ) + + + + + + + this is a message + + + this is a warning + + + + + + this message should be logged + + + so should this + + + + a == 1 + + + 2 == 1 + + + + + + + + a == 2 + + + 2 == 2 + + + + this message should be logged + + + + a == 1 + + + 2 == 1 + + + + and this, but later + + + + a == 0 + + + 2 == 0 + + + + + a == 2 + + + 2 == 2 + + + + + + + + data.int_seven != 7 + + + 7 != 7 + + + + + data.float_nine_point_one != Approx( 9.1f ) + + + 9.1f != Approx( 9.1000003815 ) + + + + + data.double_pi != Approx( 3.1415926535 ) + + + 3.1415926535 != Approx( 3.1415926535 ) + + + + + data.str_hello != "hello" + + + "hello" != "hello" + + + + + data.str_hello.size() != 5 + + + 5 != 5 + + + + + + + + data.int_seven != 6 + + + 7 != 6 + + + + + data.int_seven != 8 + + + 7 != 8 + + + + + data.float_nine_point_one != Approx( 9.11f ) + + + 9.1f != Approx( 9.1099996567 ) + + + + + data.float_nine_point_one != Approx( 9.0f ) + + + 9.1f != Approx( 9.0 ) + + + + + data.float_nine_point_one != Approx( 1 ) + + + 9.1f != Approx( 1.0 ) + + + + + data.float_nine_point_one != Approx( 0 ) + + + 9.1f != Approx( 0.0 ) + + + + + data.double_pi != Approx( 3.1415 ) + + + 3.1415926535 != Approx( 3.1415 ) + + + + + data.str_hello != "goodbye" + + + "hello" != "goodbye" + + + + + data.str_hello != "hell" + + + "hello" != "hell" + + + + + data.str_hello != "hello1" + + + "hello" != "hello1" + + + + + data.str_hello.size() != 6 + + + 5 != 6 + + + + + + + + d <= Approx( 1.24 ) + + + 1.23 <= Approx( 1.24 ) + + + + + d <= Approx( 1.23 ) + + + 1.23 <= Approx( 1.23 ) + + + + + !d <= Approx( 1.22 ) + + + !(1.23 <= Approx( 1.22 )) + + + + + d <= Approx( 1.22 ).epsilon(0.1) + + + 1.23 <= Approx( 1.22 ) + +
- + Text( testString, TextAttributes().setWidth( 80 ) ).toString() == testString @@ -4691,7 +2627,7 @@ "one two three four" - + Text( testString, TextAttributes().setWidth( 18 ) ).toString() == testString @@ -4707,7 +2643,7 @@
- + Text( testString, TextAttributes().setWidth( 17 ) ).toString() == "one two three\nfour" @@ -4719,7 +2655,7 @@ four" four" - + Text( testString, TextAttributes().setWidth( 16 ) ).toString() == "one two three\nfour" @@ -4731,7 +2667,7 @@ four" four" - + Text( testString, TextAttributes().setWidth( 14 ) ).toString() == "one two three\nfour" @@ -4743,7 +2679,7 @@ four" four" - + Text( testString, TextAttributes().setWidth( 13 ) ).toString() == "one two three\nfour" @@ -4755,7 +2691,7 @@ four" four" - + Text( testString, TextAttributes().setWidth( 12 ) ).toString() == "one two\nthree four" @@ -4773,7 +2709,7 @@ three four"
- + Text( testString, TextAttributes().setWidth( 9 ) ).toString() == "one two\nthree\nfour" @@ -4787,7 +2723,7 @@ three four" - + Text( testString, TextAttributes().setWidth( 8 ) ).toString() == "one two\nthree\nfour" @@ -4801,7 +2737,7 @@ three four" - + Text( testString, TextAttributes().setWidth( 7 ) ).toString() == "one two\nthree\nfour" @@ -4821,7 +2757,7 @@ four"
- + Text( testString, TextAttributes().setWidth( 6 ) ).toString() == "one\ntwo\nthree\nfour" @@ -4837,7 +2773,7 @@ three four" - + Text( testString, TextAttributes().setWidth( 5 ) ).toString() == "one\ntwo\nthree\nfour" @@ -4859,7 +2795,7 @@ four"
- + Text( "abcdef", TextAttributes().setWidth( 4 ) ).toString() == "abc-\ndef" @@ -4871,7 +2807,7 @@ def" def" - + Text( "abcdefg", TextAttributes().setWidth( 4 ) ).toString() == "abc-\ndefg" @@ -4883,7 +2819,7 @@ defg" defg" - + Text( "abcdefgh", TextAttributes().setWidth( 4 ) ).toString() == "abc-\ndef-\ngh" @@ -4897,7 +2833,7 @@ def- gh" - + Text( testString, TextAttributes().setWidth( 4 ) ).toString() == "one\ntwo\nthr-\nee\nfour" @@ -4915,7 +2851,7 @@ ee four" - + Text( testString, TextAttributes().setWidth( 3 ) ).toString() == "one\ntwo\nth-\nree\nfo-\nur" @@ -4941,7 +2877,7 @@ ur"
- + text.size() == 4 @@ -4949,7 +2885,7 @@ ur" 4 == 4 - + text[0] == "one" @@ -4957,7 +2893,7 @@ ur" "one" == "one" - + text[1] == "two" @@ -4965,7 +2901,7 @@ ur" "two" == "two" - + text[2] == "three" @@ -4973,7 +2909,7 @@ ur" "three" == "three" - + text[3] == "four" @@ -4987,7 +2923,7 @@ ur"
- + text.toString() == " one two\n three\n four" @@ -5007,7 +2943,7 @@ ur"
- + Text( testString, TextAttributes().setWidth( 80 ) ).toString() == testString @@ -5019,7 +2955,7 @@ three four" three four" - + Text( testString, TextAttributes().setWidth( 18 ) ).toString() == testString @@ -5031,7 +2967,7 @@ three four" three four" - + Text( testString, TextAttributes().setWidth( 10 ) ).toString() == testString @@ -5049,19 +2985,15 @@ three four"
- + - Text( "abcdef\n", TextAttributes().setWidth( 10 ) ).toString() == "abcdef\n" + Text( "abcdef\n", TextAttributes().setWidth( 10 ) ).toString() == "abcdef" - "abcdef -" -== -"abcdef -" + "abcdef" == "abcdef" - + Text( "abcdef", TextAttributes().setWidth( 6 ) ).toString() == "abcdef" @@ -5069,25 +3001,33 @@ three four" "abcdef" == "abcdef" - + - Text( "abcdef\n", TextAttributes().setWidth( 6 ) ).toString() == "abcdef\n" + Text( "abcdef\n", TextAttributes().setWidth( 6 ) ).toString() == "abcdef" - "abcdef -" -== -"abcdef -" + "abcdef" == "abcdef" - + + + Text( "abcdef\n", TextAttributes().setWidth( 5 ) ).toString() == "abcd-\nef" + + + "abcd- +ef" +== +"abcd- +ef" + + +
- +
- + Text( testString, TextAttributes().setWidth( 9 ) ).toString() == "one two\nthree\nfour" @@ -5101,7 +3041,7 @@ three four" - + Text( testString, TextAttributes().setWidth( 8 ) ).toString() == "one two\nthree\nfour" @@ -5115,7 +3055,7 @@ three four" - + Text( testString, TextAttributes().setWidth( 7 ) ).toString() == "one two\nthree\nfour" @@ -5135,7 +3075,7 @@ four"
- + Text( testString, TextAttributes().setWidth( 6 ) ).toString() == "one\ntwo\nthree\nfour" @@ -5155,191 +3095,120 @@ four"
-
- - - Text( testString, TextAttributes().setWidth( 15 ) ).toString() == "one two three\n four\n five\n six" - - - "one two three - four - five - six" +
+
+ + + Text( testString, TextAttributes().setWidth( 80 ) ).toString() == testString + + + "one,two(three) <here>" == -"one two three - four - five - six" - - +"one,two(three) <here>" + + + + + Text( testString, TextAttributes().setWidth( 24 ) ).toString() == testString + + + "one,two(three) <here>" +== +"one,two(three) <here>" + + + +
+ +
+
+
+ + + Text( testString, TextAttributes().setWidth( 11 ) ).toString() == "one,two\n(three)\n<here>" + + + "one,two +(three) +<here>" +== +"one,two +(three) +<here>" + + + +
- - - -
- - - replaceInPlace( letters, "b", "z" ) - - - true - - - - - letters == "azcdefcg" - - - "azcdefcg" == "azcdefcg" - - - -
-
- - - replaceInPlace( letters, "c", "z" ) - - - true - - - - - letters == "abzdefzg" - - - "abzdefzg" == "abzdefzg" - - - -
-
- - - replaceInPlace( letters, "a", "z" ) - - - true - - - - - letters == "zbcdefcg" - - - "zbcdefcg" == "zbcdefcg" - - - -
-
- - - replaceInPlace( letters, "g", "z" ) - - - true - - - - - letters == "abcdefcz" - - - "abcdefcz" == "abcdefcz" - - - -
-
- - - replaceInPlace( letters, letters, "replaced" ) - - - true - - - - - letters == "replaced" - - - "replaced" == "replaced" - - - -
-
- - - !replaceInPlace( letters, "x", "z" ) - - - !false - - - - - letters == letters - - - "abcdefcg" == "abcdefcg" - - - -
-
- - - replaceInPlace( s, "'", "|'" ) - - - true - - - - - s == "didn|'t" - - - "didn|'t" == "didn|'t" - - - -
- -
- - - - - - - Text( "hi there" ).toString() == "hi there" - - - "hi there" == "hi there" - - - - - Text( "hi there", narrow ).toString() == "hi\nthere" - - - "hi -there" +
+
+ + + Text( testString, TextAttributes().setWidth( 6 ) ).toString() == "one,\ntwo\n(thre-\ne)\n<here>" + + + "one, +two +(thre- +e) +<here>" == -"hi -there" - - +"one, +two +(thre- +e) +<here>" + + + + + Text( testString, TextAttributes().setWidth( 5 ) ).toString() == "one,\ntwo\n(thr-\nee)\n<her-\ne>" + + + "one, +two +(thr- +ee) +<her- +e>" +== +"one, +two +(thr- +ee) +<her- +e>" + + + + + Text( testString, TextAttributes().setWidth( 4 ) ).toString() == "one,\ntwo\n(th-\nree)\n<he-\nre>" + + + "one, +two +(th- +ree) +<he- +re>" +== +"one, +two +(th- +ree) +<he- +re>" + + + +
+ +
- + t.toString(), EndsWith( "... message truncated due to excessive size" ) @@ -6352,206 +4221,124 @@ there" - - + + - (std::pair<int, int>( 1, 2 )) == aNicePair + testStringForMatching(), Contains( "string" ) && Contains( "abc" ) && Contains( "substring" ) && Contains( "contains" ) - std::pair( 1, 2 ) == std::pair( 1, 2 ) + "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" and contains: "substring" and contains: "contains" ) - - - Uncomment the code in this test to check that it gives a sensible compiler error - - - - - - Uncomment the code in this test to check that it gives a sensible compiler error - - - - - + + - &o1 == &o2 + testStringForMatching(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) - 0x == 0x + "this string contains 'abc' as a substring" ( contains: "string" or contains: "different" or contains: "random" ) - + - o1 == o2 + testStringForMatching2(), Contains( "string" ) || Contains( "different" ) || Contains( "random" ) - {?} == {?} + "some completely different text that contains one common word" ( contains: "string" or contains: "different" or contains: "random" ) + + + + + + + + testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "substring" ) + + + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "substring" ) + + + + + + + + testStringForMatching(), ( Contains( "string" ) || Contains( "different" ) ) && Contains( "random" ) + + + "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" ) - - + + - std::string( "first" ) == "second" + testStringForMatching(), !Contains( "different" ) - "first" == "second" + "this string contains 'abc' as a substring" not contains: "different" + + + + + + + + testStringForMatching(), !Contains( "substring" ) + + + "this string contains 'abc' as a substring" not contains: "substring" - - + + - i++ == 7 + thisThrows(), "expected exception" - 7 == 7 + thisThrows(), "expected exception" - + - i++ == 8 + thisThrows(), "should fail" - 8 == 8 + expected exception + + + + + This one ran + - - + + + custom exception + + + + + - 0x == o + thisFunctionNotImplemented( 7 ) - 3221225472 (0x) == {?} + thisFunctionNotImplemented( 7 ) - - - - t == 1u - - - {?} == 1 - - - - - - - - 0x == bit30and31 - - - 3221225472 (0x) == 3221225472 - - - - - - - - obj.prop != nullptr - - - 0x != nullptr - - - - - -
- - - is_true<true>::value == true - - - true == true - - - - - true == is_true<true>::value - - - true == true - - - -
-
- - - is_true<false>::value == false - - - false == false - - - - - false == is_true<false>::value - - - false == false - - - -
-
- - - !is_true<false>::value - - - true - - - -
-
- - - !!is_true<true>::value - - - true - - - -
-
- - - is_true<true>::value - - - true - - - - - !is_true<false>::value - - - !false - - - -
- -
- + True @@ -6559,7 +4346,7 @@ there" true
- + !False @@ -6567,7 +4354,7 @@ there" true - + !False @@ -6577,1483 +4364,329 @@ there" - - + + - Catch::alwaysTrue() + 0x == o - true + 3221225472 (0x) == {?} -
- - - Catch::alwaysTrue() - - - true - - -
- - - Catch::alwaysTrue() - - - true - - - -
- + + + + + + data.int_seven > 7 + + + 7 > 7 + + + + + data.int_seven < 7 + + + 7 < 7 + + + + + data.int_seven > 8 + + + 7 > 8 + + + + + data.int_seven < 6 + + + 7 < 6 + + + + + data.int_seven < 0 + + + 7 < 0 + + + + + data.int_seven < -1 + + + 7 < -1 + + + + + data.int_seven >= 8 + + + 7 >= 8 + + + + + data.int_seven <= 6 + + + 7 <= 6 + + + + + data.float_nine_point_one < 9 + + + 9.1f < 9 + + + + + data.float_nine_point_one > 10 + + + 9.1f > 10 + + + + + data.float_nine_point_one > 9.2 + + + 9.1f > 9.2 + + + + + data.str_hello > "hello" + + + "hello" > "hello" + + + + + data.str_hello < "hello" + + + "hello" < "hello" + + + + + data.str_hello > "hellp" + + + "hello" > "hellp" + + + + + data.str_hello > "z" + + + "hello" > "z" + + + + + data.str_hello < "hellm" + + + "hello" < "hellm" + + + + + data.str_hello < "a" + + + "hello" < "a" + + + + + data.str_hello >= "z" + + + "hello" >= "z" + + + + + data.str_hello <= "a" + + + "hello" <= "a" + + + + + + + + data.int_seven < 8 + + + 7 < 8 + + + + + data.int_seven > 6 + + + 7 > 6 + + + + + data.int_seven > 0 + + + 7 > 0 + + + + + data.int_seven > -1 + + + 7 > -1 + + + + + data.int_seven >= 7 + + + 7 >= 7 + + + + + data.int_seven >= 6 + + + 7 >= 6 + + + + + data.int_seven <= 7 + + + 7 <= 7 + + + + + data.int_seven <= 8 + + + 7 <= 8 + + + + + data.float_nine_point_one > 9 + + + 9.1f > 9 + + + + + data.float_nine_point_one < 10 + + + 9.1f < 10 + + + + + data.float_nine_point_one < 9.2 + + + 9.1f < 9.2 + + + + + data.str_hello <= "hello" + + + "hello" <= "hello" + + + + + data.str_hello >= "hello" + + + "hello" >= "hello" + + + + + data.str_hello < "hellp" + + + "hello" < "hellp" + + + + + data.str_hello < "zebra" + + + "hello" < "zebra" + + + + + data.str_hello > "hellm" + + + "hello" > "hellm" + + + + + data.str_hello > "a" + + + "hello" > "a" + + + + + +
+ + Message from section one + +
- - - Catch::alwaysTrue() - - - true - - -
- - - Catch::alwaysTrue() - - - true - - -
- - - Catch::alwaysTrue() - - - true - - - -
- +
+ + Message from section two + +
- - - - - - s == "7" - - - "7" == "7" - - - - - - - - a - - - true - - - - - a == &foo - - - 0x == 0x - - - - - - - - m == &S::f - - - 0x -== -0x - - - - - - - - p == 0 - - - NULL == 0 - - - - - - - - ptr.get() == nullptr - - - NULL == nullptr - - - - - - - - - - - - - - - - - - - - Catch::toString( item ) == "toString( has_toString )" - - - "toString( has_toString )" -== -"toString( has_toString )" - - - - - - - - Catch::toString( item ) == "StringMaker<has_maker>" - - - "StringMaker<has_maker>" -== -"StringMaker<has_maker>" - - - - - - - - Catch::toString( item ) == "toString( has_maker_and_toString )" - - - "toString( has_maker_and_toString )" -== -"toString( has_maker_and_toString )" - - - - - - - - Catch::toString( v ) == "{ {?} }" - - - "{ {?} }" == "{ {?} }" - - - - - - - - Catch::toString( v ) == "{ StringMaker<has_maker> }" - - - "{ StringMaker<has_maker> }" -== -"{ StringMaker<has_maker> }" - - - - - - - - Catch::toString( v ) == "{ StringMaker<has_maker_and_toString> }" - - - "{ StringMaker<has_maker_and_toString> }" -== -"{ StringMaker<has_maker_and_toString> }" - - - - - - - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - s1.isSuccessfullyCompleted() - - - true - - - - - testCase.isComplete() == false - - - false == false - - - - - ctx.completedCycle() - - - true - - - - - testCase.isSuccessfullyCompleted() - - - true - - - -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - s1.isComplete() - - - true - - - - - s1.isSuccessfullyCompleted() == false - - - false == false - - - - - testCase.isComplete() == false - - - false == false - - - - - ctx.completedCycle() - - - true - - - - - testCase.isSuccessfullyCompleted() == false - - - false == false - - -
- - - testCase2.isOpen() - - - true - - - - - s1b.isOpen() == false - - - false == false - - - - - ctx.completedCycle() - - - true - - - - - testCase.isComplete() - - - true - - - - - testCase.isSuccessfullyCompleted() - - - true - - - -
- -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - s1.isComplete() - - - true - - - - - s1.isSuccessfullyCompleted() == false - - - false == false - - - - - testCase.isComplete() == false - - - false == false - - - - - ctx.completedCycle() - - - true - - - - - testCase.isSuccessfullyCompleted() == false - - - false == false - - -
- - - testCase2.isOpen() - - - true - - - - - s1b.isOpen() == false - - - false == false - - - - - s2.isOpen() - - - true - - - - - ctx.completedCycle() - - - true - - - - - testCase.isComplete() - - - true - - - - - testCase.isSuccessfullyCompleted() - - - true - - - -
- -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - s2.isOpen() == false - - - false == false - - - - - testCase.isComplete() == false - - - false == false - - -
- - - testCase2.isOpen() - - - true - - - - - s1b.isOpen() == false - - - false == false - - - - - s2b.isOpen() - - - true - - - - - ctx.completedCycle() == false - - - false == false - - -
- - - ctx.completedCycle() - - - true - - - - - s2b.isSuccessfullyCompleted() - - - true - - - - - testCase2.isComplete() == false - - - false == false - - - - - testCase2.isSuccessfullyCompleted() - - - true - - - -
- -
- -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - s2.isOpen() == false - - - false == false - - - - - testCase.isComplete() == false - - - false == false - - -
- - - testCase2.isOpen() - - - true - - - - - s1b.isOpen() == false - - - false == false - - - - - s2b.isOpen() - - - true - - - - - ctx.completedCycle() == false - - - false == false - - -
- - - ctx.completedCycle() - - - true - - - - - s2b.isComplete() - - - true - - - - - s2b.isSuccessfullyCompleted() == false - - - false == false - - - - - testCase2.isSuccessfullyCompleted() == false - - - false == false - - - - - testCase3.isOpen() - - - true - - - - - s1c.isOpen() == false - - - false == false - - - - - s2c.isOpen() == false - - - false == false - - - - - testCase3.isSuccessfullyCompleted() - - - true - - - -
- -
- -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - s2.isOpen() - - - true - - - - - s2.isComplete() - - - true - - - - - s1.isComplete() == false - - - false == false - - - - - s1.isComplete() - - - true - - - - - testCase.isComplete() == false - - - false == false - - - - - testCase.isComplete() - - - true - - - -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - g1.isOpen() - - - true - - - - - g1.index() == 0 - - - 0 == 0 - - - - - g1.isComplete() == false - - - false == false - - - - - s1.isComplete() == false - - - false == false - - -
- - - s1.isComplete() == false - - - false == false - - - - - testCase.isSuccessfullyCompleted() == false - - - false == false - - -
- - - testCase2.isOpen() - - - true - - - - - s1b.isOpen() - - - true - - - - - g1b.isOpen() - - - true - - - - - g1b.index() == 1 - - - 1 == 1 - - - - - s1.isComplete() == false - - - false == false - - - - - s1b.isComplete() - - - true - - - - - g1b.isComplete() - - - true - - - - - testCase2.isComplete() - - - true - - - -
- -
- -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - g1.isOpen() - - - true - - - - - g1.index() == 0 - - - 0 == 0 - - - - - g1.isComplete() == false - - - false == false - - - - - s1.isComplete() == false - - - false == false - - -
- - - s2.isOpen() - - - true - - - - - s2.isComplete() - - - true - - - - - s1.isComplete() == false - - - false == false - - - - - testCase.isComplete() == false - - - false == false - - -
- - - testCase2.isOpen() - - - true - - - - - s1b.isOpen() - - - true - - - - - g1b.isOpen() - - - true - - - - - g1b.index() == 1 - - - 1 == 1 - - - - - s2b.isOpen() - - - true - - - - - s2b.isComplete() - - - true - - - - - g1b.isComplete() - - - true - - - - - s1b.isComplete() - - - true - - - - - testCase2.isComplete() - - - true - - - -
- -
- -
- - - testCase.isOpen() - - - true - - - - - s1.isOpen() - - - true - - -
- - - g1.isOpen() - - - true - - - - - g1.index() == 0 - - - 0 == 0 - - - - - g1.isComplete() == false - - - false == false - - - - - s1.isComplete() == false - - - false == false - - -
- - - s2.isOpen() - - - true - - - - - s2.isComplete() - - - true - - - - - s2.isSuccessfullyCompleted() == false - - - false == false - - - - - s1.isComplete() == false - - - false == false - - - - - testCase.isComplete() == false - - - false == false - - -
- - - testCase2.isOpen() - - - true - - - - - s1b.isOpen() - - - true - - - - - g1b.isOpen() - - - true - - - - - g1b.index() == 0 - - - 0 == 0 - - - - - s2b.isOpen() == false - - - false == false - - - - - g1b.isComplete() == false - - - false == false - - - - - s1b.isComplete() == false - - - false == false - - - - - testCase2.isComplete() == false - - - false == false - - - - - testCase3.isOpen() - - - true - - - - - s1c.isOpen() - - - true - - - - - g1c.isOpen() - - - true - - - - - g1c.index() == 1 - - - 1 == 1 - - - - - s2c.isOpen() - - - true - - - - - s2c.isComplete() - - - true - - - - - g1c.isComplete() - - - true - - - - - s1c.isComplete() - - - true - - - - - testCase3.isComplete() - - - true - - - -
- -
- -
- -
- - - - Catch::toString( value ) == "{ 34, \"xyzzy\" }" - - - "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" - - - - - - - - Catch::toString(value) == "{ 34, \"xyzzy\" }" - - - "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" - - - - - - - - Catch::toString( pr ) == "{ { \"green\", 55 } }" - - - "{ { "green", 55 } }" -== -"{ { "green", 55 } }" - - - - - - - - Catch::toString( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" - - - "{ { 42, "Arthur" }, { "Ford", 24 } }" -== -"{ { 42, "Arthur" }, { "Ford", 24 } }" - - - - - - - - Catch::toString(vv) == "{ }" - - - "{ }" == "{ }" - - - - - Catch::toString(vv) == "{ 42 }" - - - "{ 42 }" == "{ 42 }" - - - - - Catch::toString(vv) == "{ 42, 250 }" - - - "{ 42, 250 }" == "{ 42, 250 }" - - - - - - - - Catch::toString(vv) == "{ }" - - - "{ }" == "{ }" - - - - - Catch::toString(vv) == "{ \"hello\" }" - - - "{ "hello" }" == "{ "hello" }" - - - - - Catch::toString(vv) == "{ \"hello\", \"world\" }" - - - "{ "hello", "world" }" -== -"{ "hello", "world" }" - - - - - - - - Catch::toString(vv) == "{ }" - - - "{ }" == "{ }" - - - - - Catch::toString(vv) == "{ 42 }" - - - "{ 42 }" == "{ 42 }" - - - - - Catch::toString(vv) == "{ 42, 250 }" - - - "{ 42, 250 }" == "{ 42, 250 }" - - - - - - - - Catch::toString(v) == "{ }" - - - "{ }" == "{ }" - - - - - Catch::toString(v) == "{ { \"hello\" }, { \"world\" } }" - - - "{ { "hello" }, { "world" } }" -== -"{ { "hello" }, { "world" } }" - - - +
- + spec.hasFilters() == false @@ -8061,7 +4694,7 @@ there" false == false - + spec.matches( tcA ) == false @@ -8069,7 +4702,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8080,7 +4713,7 @@ there"
- + spec.hasFilters() == false @@ -8088,7 +4721,7 @@ there" false == false - + spec.matches(tcA ) == false @@ -8096,7 +4729,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8107,7 +4740,7 @@ there"
- + spec.hasFilters() == false @@ -8115,7 +4748,7 @@ there" false == false - + spec.matches( tcA ) == false @@ -8123,7 +4756,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8134,7 +4767,7 @@ there"
- + spec.hasFilters() == true @@ -8142,7 +4775,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8150,7 +4783,7 @@ there" false == false - + spec.matches( tcB ) == true @@ -8161,7 +4794,7 @@ there"
- + spec.hasFilters() == true @@ -8169,7 +4802,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8177,7 +4810,7 @@ there" false == false - + spec.matches( tcB ) == true @@ -8188,7 +4821,7 @@ there"
- + spec.hasFilters() == true @@ -8196,7 +4829,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8204,7 +4837,7 @@ there" false == false - + spec.matches( tcB ) == true @@ -8212,7 +4845,7 @@ there" true == true - + spec.matches( tcC ) == false @@ -8223,7 +4856,7 @@ there"
- + spec.hasFilters() == true @@ -8231,7 +4864,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8239,7 +4872,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8247,7 +4880,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8255,7 +4888,7 @@ there" true == true - + spec.matches( tcD ) == false @@ -8263,7 +4896,7 @@ there" false == false - + parseTestSpec( "*a" ).matches( tcA ) == true @@ -8274,7 +4907,7 @@ there"
- + spec.hasFilters() == true @@ -8282,7 +4915,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8290,7 +4923,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8298,7 +4931,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8306,7 +4939,7 @@ there" true == true - + spec.matches( tcD ) == false @@ -8314,7 +4947,7 @@ there" false == false - + parseTestSpec( "a*" ).matches( tcA ) == true @@ -8325,7 +4958,7 @@ there"
- + spec.hasFilters() == true @@ -8333,7 +4966,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8341,7 +4974,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8349,7 +4982,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8357,7 +4990,7 @@ there" true == true - + spec.matches( tcD ) == true @@ -8365,7 +4998,7 @@ there" true == true - + parseTestSpec( "*a*" ).matches( tcA ) == true @@ -8376,7 +5009,7 @@ there"
- + spec.hasFilters() == true @@ -8384,7 +5017,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8392,7 +5025,7 @@ there" true == true - + spec.matches( tcB ) == false @@ -8403,7 +5036,7 @@ there"
- + spec.hasFilters() == true @@ -8411,7 +5044,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8419,7 +5052,7 @@ there" true == true - + spec.matches( tcB ) == false @@ -8430,7 +5063,7 @@ there"
- + spec.hasFilters() == true @@ -8438,7 +5071,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8446,7 +5079,7 @@ there" true == true - + spec.matches( tcB ) == false @@ -8457,7 +5090,7 @@ there"
- + spec.hasFilters() == true @@ -8465,7 +5098,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8473,7 +5106,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8481,7 +5114,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8489,7 +5122,7 @@ there" true == true - + spec.matches( tcD ) == true @@ -8500,7 +5133,7 @@ there"
- + spec.hasFilters() == true @@ -8508,7 +5141,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8516,7 +5149,7 @@ there" true == true - + spec.matches( tcB ) == true @@ -8524,7 +5157,7 @@ there" true == true - + spec.matches( tcC ) == true @@ -8532,7 +5165,7 @@ there" true == true - + spec.matches( tcD ) == true @@ -8543,7 +5176,7 @@ there"
- + spec.hasFilters() == true @@ -8551,7 +5184,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8559,7 +5192,7 @@ there" false == false - + spec.matches( tcB ) == true @@ -8567,7 +5200,7 @@ there" true == true - + spec.matches( tcC ) == false @@ -8578,7 +5211,7 @@ there"
- + spec.hasFilters() == true @@ -8586,7 +5219,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8594,7 +5227,7 @@ there" false == false - + spec.matches( tcB ) == true @@ -8602,7 +5235,7 @@ there" true == true - + spec.matches( tcC ) == true @@ -8613,7 +5246,7 @@ there"
- + spec.hasFilters() == true @@ -8621,7 +5254,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8629,7 +5262,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8637,7 +5270,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8648,7 +5281,7 @@ there"
- + spec.hasFilters() == true @@ -8656,7 +5289,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8664,7 +5297,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8672,7 +5305,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8683,7 +5316,7 @@ there"
- + spec.hasFilters() == true @@ -8691,7 +5324,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8699,7 +5332,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8707,7 +5340,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8715,7 +5348,7 @@ there" true == true - + spec.matches( tcD ) == false @@ -8726,7 +5359,7 @@ there"
- + spec.hasFilters() == true @@ -8734,7 +5367,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8742,7 +5375,7 @@ there" true == true - + spec.matches( tcB ) == false @@ -8750,7 +5383,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8761,7 +5394,7 @@ there"
- + spec.hasFilters() == true @@ -8769,7 +5402,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8777,7 +5410,7 @@ there" false == false - + spec.matches( tcB ) == true @@ -8785,7 +5418,7 @@ there" true == true - + spec.matches( tcC ) == false @@ -8796,7 +5429,7 @@ there"
- + spec.hasFilters() == true @@ -8804,7 +5437,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8812,7 +5445,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8820,7 +5453,7 @@ there" false == false - + spec.matches( tcC ) == false @@ -8828,7 +5461,7 @@ there" false == false - + spec.matches( tcD ) == true @@ -8839,7 +5472,7 @@ there"
- + spec.hasFilters() == true @@ -8847,7 +5480,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -8855,7 +5488,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -8863,7 +5496,7 @@ there" false == false - + spec.matches( tcC ) == false @@ -8871,7 +5504,7 @@ there" false == false - + spec.matches( tcD ) == true @@ -8882,7 +5515,7 @@ there"
- + spec.hasFilters() == true @@ -8890,7 +5523,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8898,7 +5531,7 @@ there" true == true - + spec.matches( tcB ) == false @@ -8906,7 +5539,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -8914,7 +5547,7 @@ there" true == true - + spec.matches( tcD ) == true @@ -8925,7 +5558,7 @@ there"
- + spec.hasFilters() == true @@ -8933,7 +5566,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8941,7 +5574,7 @@ there" true == true - + spec.matches( tcB ) == true @@ -8949,7 +5582,7 @@ there" true == true - + spec.matches( tcC ) == false @@ -8957,7 +5590,7 @@ there" false == false - + spec.matches( tcD ) == false @@ -8968,7 +5601,7 @@ there"
- + spec.hasFilters() == true @@ -8976,7 +5609,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -8984,7 +5617,7 @@ there" true == true - + spec.matches( tcB ) == true @@ -8992,7 +5625,7 @@ there" true == true - + spec.matches( tcC ) == true @@ -9000,7 +5633,7 @@ there" true == true - + spec.matches( tcD ) == false @@ -9011,7 +5644,7 @@ there"
- + spec.hasFilters() == true @@ -9019,7 +5652,7 @@ there" true == true - + spec.matches( tcA ) == true @@ -9027,7 +5660,7 @@ there" true == true - + spec.matches( tcB ) == true @@ -9035,7 +5668,7 @@ there" true == true - + spec.matches( tcC ) == true @@ -9043,7 +5676,7 @@ there" true == true - + spec.matches( tcD ) == false @@ -9054,7 +5687,7 @@ there"
- + spec.hasFilters() == true @@ -9062,7 +5695,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -9070,7 +5703,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -9078,7 +5711,7 @@ there" false == false - + spec.matches( tcC ) == true @@ -9086,7 +5719,7 @@ there" true == true - + spec.matches( tcD ) == false @@ -9097,7 +5730,7 @@ there"
- + spec.hasFilters() == false @@ -9105,7 +5738,7 @@ there" false == false - + spec.matches( tcA ) == false @@ -9113,7 +5746,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -9121,7 +5754,7 @@ there" false == false - + spec.matches( tcC ) == false @@ -9129,7 +5762,7 @@ there" false == false - + spec.matches( tcD ) == false @@ -9140,7 +5773,7 @@ there"
- + spec.hasFilters() == false @@ -9148,7 +5781,7 @@ there" false == false - + spec.matches( tcA ) == false @@ -9156,7 +5789,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -9164,7 +5797,7 @@ there" false == false - + spec.matches( tcC ) == false @@ -9172,7 +5805,7 @@ there" false == false - + spec.matches( tcD ) == false @@ -9183,7 +5816,7 @@ there"
- + spec.hasFilters() == true @@ -9191,7 +5824,7 @@ there" true == true - + spec.matches( tcA ) == false @@ -9199,7 +5832,7 @@ there" false == false - + spec.matches( tcB ) == false @@ -9207,7 +5840,7 @@ there" false == false - + spec.matches( tcC ) == false @@ -9215,7 +5848,7 @@ there" false == false - + spec.matches( tcD ) == true @@ -9227,192 +5860,815 @@ there"
- - + + - "{ }" == Catch::toString(type{}) + (std::pair<int, int>( 1, 2 )) == aNicePair - "{ }" == "{ }" - - - - - "{ }" == Catch::toString(value) - - - "{ }" == "{ }" + std::pair( 1, 2 ) == std::pair( 1, 2 ) - - + + - "{ 0 }" == Catch::toString(type{0}) + p == 0 - "{ 0 }" == "{ 0 }" + NULL == 0 + + + + + p == pNULL + + + NULL == NULL + + + + + p != 0 + + + 0x != 0 + + + + + cp != 0 + + + 0x != 0 + + + + + cpc != 0 + + + 0x != 0 + + + + + returnsNull() == 0 + + + {null string} == 0 + + + + + returnsConstNull() == 0 + + + {null string} == 0 + + + + + 0 != p + + + 0 != 0x - - - - "1.2f" == Catch::toString(float(1.2)) - - - "1.2f" == "1.2f" - - - - - "{ 1.2f, 0 }" == Catch::toString(type{1.2,0}) - - - "{ 1.2f, 0 }" == "{ 1.2f, 0 }" - - + + + actual address of p: 0x + + + toString(p): 0x + - - - - "{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"}) - - - "{ "hello", "world" }" -== -"{ "hello", "world" }" - - - - - - - - "{ { 42 }, { }, 1.2f }" == Catch::toString(value) - - - "{ { 42 }, { }, 1.2f }" -== -"{ { 42 }, { }, 1.2f }" - - - - - - - - "{ nullptr, 42, \"Catch me\" }" == Catch::toString(value) - - - "{ nullptr, 42, "Catch me" }" -== -"{ nullptr, 42, "Catch me" }" - - - - - -
- + +
+ - what, Contains( "[@zzz]" ) + parseIntoConfig( argv, config ) - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: "[@zzz]" + parseIntoConfig( argv, config ) - + - what, Contains( "file" ) + config.shouldDebugBreak == false - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: "file" + false == false - + - what, Contains( "2" ) + config.abortAfter == -1 - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: "2" + -1 == -1 - + - what, Contains( "10" ) + config.noThrow == false - "error: tag alias, "[@zzz]" already registered. - First seen at file:2 - Redefined at file:10" contains: "10" + false == false + + + config.reporterNames.empty() + + + true + + + +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + cfg.testSpec().matches( fakeTestCase( "notIncluded" ) ) == false + + + false == false + + + + + cfg.testSpec().matches( fakeTestCase( "test1" ) ) + + + true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false + + + false == false + + + + + cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) + + + true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + cfg.testSpec().matches( fakeTestCase( "test1" ) ) == false + + + false == false + + + + + cfg.testSpec().matches( fakeTestCase( "alwaysIncluded" ) ) + + + true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.reporterNames[0] == "console" + + + "console" == "console" + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.reporterNames[0] == "xml" + + + "xml" == "xml" + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.reporterNames.size() == 2 + + + 2 == 2 + + + + + config.reporterNames[0] == "xml" + + + "xml" == "xml" + + + + + config.reporterNames[1] == "junit" + + + "junit" == "junit" + + + +
-
- - - registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) - - - registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) - - - - - registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) - - - registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) - - - - - registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) - - - registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) - - - - - registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) - - - registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) - - - +
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.reporterNames[0] == "junit" + + + "junit" == "junit" + + + +
+
- - - - - - - - - -
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.shouldDebugBreak == true + + + true == true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.shouldDebugBreak + + + true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.abortAfter == 1 + + + 1 == 1 + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.abortAfter == 2 + + + 2 == 2 + + + +
+ +
+
+
+ + + parseIntoConfigAndReturnError( argv, config ), Contains( "greater than zero" ) + + + "Value after -x or --abortAfter must be greater than zero +- while parsing: (-x, --abortx <no. failures>)" contains: "greater than zero" + + + +
+
+
+ + + parseIntoConfigAndReturnError( argv, config ), Contains( "-x" ) + + + "Unable to convert oops to destination type +- while parsing: (-x, --abortx <no. failures>)" contains: "-x" + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.noThrow == true + + + true == true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.noThrow == true + + + true == true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.outputFilename == "filename.ext" + + + "filename.ext" == "filename.ext" + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.outputFilename == "filename.ext" + + + "filename.ext" == "filename.ext" + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.abortAfter == 1 + + + 1 == 1 + + + + + config.shouldDebugBreak + + + true + + + + + config.noThrow == true + + + true == true + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.useColour == UseColour::Auto + + + 0 == 0 + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.useColour == UseColour::Auto + + + 0 == 0 + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.useColour == UseColour::Yes + + + 1 == 1 + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ) + + + parseIntoConfig( argv, config ) + + + + + config.useColour == UseColour::No + + + 2 == 2 + + + +
+ +
+
+
+ + + parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) + + + parseIntoConfig( argv, config ), Contains( "colour mode must be one of" ) + + + +
+ +
+ + + + + + i < 10 + + + 0 < 10 + + + + + i < 10 + + + 1 < 10 + + + + + i < 10 + + + 2 < 10 + + + + + i < 10 + + + 3 < 10 + + + + + i < 10 + + + 4 < 10 + + + + + i < 10 + + + 5 < 10 + + + + + i < 10 + + + 6 < 10 + + + + + i < 10 + + + 7 < 10 + + + + + i < 10 + + + 8 < 10 + + + + + i < 10 + + + 9 < 10 + + + + current counter 10 + + + i := 10 + + + + i < 10 + + + 10 < 10 + + + + + + + + + + + +
+ + + before == 0 + + + 0 == 0 + + +
+
+ + + after > before + + + 1 > 0 + + + +
+ +
+ +
- + itDoesThis() @@ -9421,7 +6677,7 @@ there"
- + itDoesThat() @@ -9439,9 +6695,21 @@ there"
+ +
+
+
+ +
+ +
+ +
+ +
- + v.size() == 0 @@ -9451,7 +6719,7 @@ there"
- + v.size() == 10 @@ -9459,7 +6727,7 @@ there" 10 == 10 - + v.capacity() >= 10 @@ -9469,7 +6737,7 @@ there"
- + v.size() == 5 @@ -9477,7 +6745,7 @@ there" 5 == 5 - + v.capacity() >= 10 @@ -9496,7 +6764,7 @@ there"
- + v.size() == 0 @@ -9506,7 +6774,7 @@ there"
- + v.capacity() >= 10 @@ -9514,7 +6782,7 @@ there" 10 >= 10 - + v.size() == 0 @@ -9530,47 +6798,2712 @@ there"
- -
-
-
- -
- -
- + + + + + + + d == Approx( 1.23 ) + + + 1.23 == Approx( 1.23 ) + + + + + d != Approx( 1.22 ) + + + 1.23 != Approx( 1.22 ) + + + + + d != Approx( 1.24 ) + + + 1.23 != Approx( 1.24 ) + + + + + Approx( d ) == 1.23 + + + Approx( 1.23 ) == 1.23 + + + + + Approx( d ) != 1.22 + + + Approx( 1.23 ) != 1.22 + + + + + Approx( d ) != 1.24 + + + Approx( 1.23 ) != 1.24 + + + + + +
+ +
+
+ +
+ +
+ + + + testStringForMatching(), StartsWith( "string" ) + + + "this string contains 'abc' as a substring" starts with: "string" + + + + + + + + testStringForMatching(), Contains( "string" ) + + + "this string contains 'abc' as a substring" contains: "string" + + + + + testStringForMatching(), Contains( "abc" ) + + + "this string contains 'abc' as a substring" contains: "abc" + + + + + testStringForMatching(), StartsWith( "this" ) + + + "this string contains 'abc' as a substring" starts with: "this" + + + + + testStringForMatching(), EndsWith( "substring" ) + + + "this string contains 'abc' as a substring" ends with: "substring" + + + + + + + + + + + s1 == s2 + + + "if ($b == 10) { + $a = 20; +}" +== +"if ($b == 10) { + $a = 20; +} +" + + + + + +
+ + + what, Contains( "[@zzz]" ) + + + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "[@zzz]" + + + + + what, Contains( "file" ) + + + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "file" + + + + + what, Contains( "2" ) + + + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "2" + + + + + what, Contains( "10" ) + + + "error: tag alias, "[@zzz]" already registered. + First seen at file:2 + Redefined at file:10" contains: "10" + + + +
+
+ + + registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[no ampersat]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[the @ is not at the start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "@no square bracket at start]", "", Catch::SourceLineInfo( "file", 3 ) ) + + + + + registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) + + + registry.add( "[@no square bracket at end", "", Catch::SourceLineInfo( "file", 3 ) ) + + +
- -
- + + + + + + + 0x == bit30and31 + + + 3221225472 (0x) == 3221225472 + + + + + + + + Text( "hi there" ).toString() == "hi there" + + + "hi there" == "hi there" + + + + + Text( "hi there", narrow ).toString() == "hi\nthere" + + + "hi +there" +== +"hi +there" + + + + + + + + 1 == 2 + + + 1 == 2 + + + + + + + + + + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ - before == 0 + s1.isSuccessfullyCompleted() + + + true + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isComplete() + + + true + + + + + s1.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isComplete() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s1.isComplete() + + + true + + + + + s1.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + + + + ctx.completedCycle() + + + true + + + + + testCase.isSuccessfullyCompleted() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2.isOpen() + + + true + + + + + ctx.completedCycle() + + + true + + + + + testCase.isComplete() + + + true + + + + + testCase.isSuccessfullyCompleted() + + + true + + + +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2b.isOpen() + + + true + + + + + ctx.completedCycle() == false + + + false == false + + +
+ + + ctx.completedCycle() + + + true + + + + + s2b.isSuccessfullyCompleted() + + + true + + + + + testCase2.isComplete() == false + + + false == false + + + + + testCase2.isSuccessfullyCompleted() + + + true + + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() == false + + + false == false + + + + + s2b.isOpen() + + + true + + + + + ctx.completedCycle() == false + + + false == false + + +
+ + + ctx.completedCycle() + + + true + + + + + s2b.isComplete() + + + true + + + + + s2b.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase2.isSuccessfullyCompleted() == false + + + false == false + + + + + testCase3.isOpen() + + + true + + + + + s1c.isOpen() == false + + + false == false + + + + + s2c.isOpen() == false + + + false == false + + + + + testCase3.isSuccessfullyCompleted() + + + true + + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + s2.isOpen() + + + true + + + + + s2.isComplete() + + + true + + + + + s1.isComplete() == false + + + false == false + + + + + s1.isComplete() + + + true + + + + + testCase.isComplete() == false + + + false == false + + + + + testCase.isComplete() + + + true + + + +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + g1.isOpen() + + + true + + + + + g1.index() == 0 0 == 0 -
-
- + + + g1.isComplete() == false + + + false == false + + + + + s1.isComplete() == false + + + false == false + + +
+ + + s1.isComplete() == false + + + false == false + + + + + testCase.isSuccessfullyCompleted() == false + + + false == false + + +
+ - after > before + testCase2.isOpen() - 1 > 0 + true - + + + s1b.isOpen() + + + true + + + + + g1b.isOpen() + + + true + + + + + g1b.index() == 1 + + + 1 == 1 + + + + + s1.isComplete() == false + + + false == false + + + + + s1b.isComplete() + + + true + + + + + g1b.isComplete() + + + true + + + + + testCase2.isComplete() + + + true + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + g1.isOpen() + + + true + + + + + g1.index() == 0 + + + 0 == 0 + + + + + g1.isComplete() == false + + + false == false + + + + + s1.isComplete() == false + + + false == false + + +
+ + + s2.isOpen() + + + true + + + + + s2.isComplete() + + + true + + + + + s1.isComplete() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() + + + true + + + + + g1b.isOpen() + + + true + + + + + g1b.index() == 1 + + + 1 == 1 + + + + + s2b.isOpen() + + + true + + + + + s2b.isComplete() + + + true + + + + + g1b.isComplete() + + + true + + + + + s1b.isComplete() + + + true + + + + + testCase2.isComplete() + + + true + + + +
+ +
+ +
+ + + testCase.isOpen() + + + true + + + + + s1.isOpen() + + + true + + +
+ + + g1.isOpen() + + + true + + + + + g1.index() == 0 + + + 0 == 0 + + + + + g1.isComplete() == false + + + false == false + + + + + s1.isComplete() == false + + + false == false + + +
+ + + s2.isOpen() + + + true + + + + + s2.isComplete() + + + true + + + + + s2.isSuccessfullyCompleted() == false + + + false == false + + + + + s1.isComplete() == false + + + false == false + + + + + testCase.isComplete() == false + + + false == false + + +
+ + + testCase2.isOpen() + + + true + + + + + s1b.isOpen() + + + true + + + + + g1b.isOpen() + + + true + + + + + g1b.index() == 0 + + + 0 == 0 + + + + + s2b.isOpen() == false + + + false == false + + + + + g1b.isComplete() == false + + + false == false + + + + + s1b.isComplete() == false + + + false == false + + + + + testCase2.isComplete() == false + + + false == false + + + + + testCase3.isOpen() + + + true + + + + + s1c.isOpen() + + + true + + + + + g1c.isOpen() + + + true + + + + + g1c.index() == 1 + + + 1 == 1 + + + + + s2c.isOpen() + + + true + + + + + s2c.isComplete() + + + true + + + + + g1c.isComplete() + + + true + + + + + s1c.isComplete() + + + true + + + + + testCase3.isComplete() + + + true + + + +
+ +
+ +
+ + + + + 3.14 + + + + + + + d == approx( 1.23 ) + + + 1.23 == Approx( 1.23 ) + + + + + d == approx( 1.22 ) + + + 1.23 == Approx( 1.22 ) + + + + + d == approx( 1.24 ) + + + 1.23 == Approx( 1.24 ) + + + + + d != approx( 1.25 ) + + + 1.23 != Approx( 1.25 ) + + + + + approx( d ) == 1.23 + + + Approx( 1.23 ) == 1.23 + + + + + approx( d ) == 1.22 + + + Approx( 1.23 ) == 1.22 + + + + + approx( d ) == 1.24 + + + Approx( 1.23 ) == 1.24 + + + + + approx( d ) != 1.25 + + + Approx( 1.23 ) != 1.25 + + + + + +
+ +
+ +
+ + + + thisThrows() + + + thisThrows() + + + + + thisDoesntThrow() + + + thisDoesntThrow() + + + + + thisThrows() + + + thisThrows() + + + + + + + unexpected exception + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + + + + thisThrows() == 0 + + + thisThrows() == 0 + + + expected exception + + + + + +
+ + unexpected exception + + +
+ +
+ + + + + + Uncomment the code in this test to check that it gives a sensible compiler error + + + + + + Uncomment the code in this test to check that it gives a sensible compiler error + + + + + + + + + + + + + + + + +
+ + + encode( "normal string" ) == "normal string" + + + "normal string" == "normal string" + + + +
+
+ + + encode( "" ) == "" + + + "" == "" + + + +
+
+ + + encode( "smith & jones" ) == "smith &amp; jones" + + + "smith &amp; jones" == "smith &amp; jones" + + + +
+
+ + + encode( "smith < jones" ) == "smith &lt; jones" + + + "smith &lt; jones" == "smith &lt; jones" + + + +
+
+ + + encode( "smith > jones" ) == "smith > jones" + + + "smith > jones" == "smith > jones" + + + + + encode( "smith ]]> jones" ) == "smith ]]&gt; jones" + + + "smith ]]&gt; jones" +== +"smith ]]&gt; jones" + + + +
+
+ + + encode( stringWithQuotes ) == stringWithQuotes + + + "don't "quote" me on that" +== +"don't "quote" me on that" + + + + + encode( stringWithQuotes, Catch::XmlEncode::ForAttributes ) == "don't &quot;quote&quot; me on that" + + + "don't &quot;quote&quot; me on that" +== +"don't &quot;quote&quot; me on that" + + + +
+
+ + + encode( "[\x01]" ) == "[&#x01;]" + + + "[&#x01;]" == "[&#x01;]" + + + +
+
+ + + encode( "[\x7F]" ) == "[&#x7F;]" + + + "[&#x7F;]" == "[&#x7F;]" + + + +
+ +
+ + + + x == 0 + + + 0 == 0 + + + + + + + + obj.prop != 0 + + + 0x != 0 + + + + + + + + flag + + + true + + + + + testCheckedElse( true ) + + + true + + + + + + + + flag + + + false + + + + + testCheckedElse( false ) + + + false + + + + + + + + flag + + + true + + + + + testCheckedIf( true ) + + + true + + + + + + + + flag + + + false + + + + + testCheckedIf( false ) + + + false + + + + + + + + unsigned_char_var == 1 + + + 1 == 1 + + + + + unsigned_short_var == 1 + + + 1 == 1 + + + + + unsigned_int_var == 1 + + + 1 == 1 + + + + + unsigned_long_var == 1 + + + 1 == 1 + + + + + + + + long_var == unsigned_char_var + + + 1 == 1 + + + + + long_var == unsigned_short_var + + + 1 == 1 + + + + + long_var == unsigned_int_var + + + 1 == 1 + + + + + long_var == unsigned_long_var + + + 1 == 1 + + + + + +
+
+ +
+
+
+ +
+ +
+
+ +
+ +
+ + + + + + Previous info should not be seen + + + + + + + +
+ + + b > a + + + 0 > 1 + + + +
+ +
+ + + Testing if fib[0] (1) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[1] (1) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + + ( fib[i] % 2 ) == 0 + + + 0 == 0 + + + + Testing if fib[3] (3) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[4] (5) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + + ( fib[i] % 2 ) == 0 + + + 0 == 0 + + + + Testing if fib[6] (13) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + Testing if fib[7] (21) is even + + + + ( fib[i] % 2 ) == 0 + + + 1 == 0 + + + + + +
+
+ + + a == b + + + 1 == 2 + + + +
+ +
+
+
+ + + a != b + + + 1 != 2 + + + +
+ +
+
+
+ + + a < b + + + 1 < 2 + + + +
+ +
+ +
+ +
+ + + a != b + + + 1 != 2 + + + + + b != a + + + 2 != 1 + + +
+ + + a != b + + + 1 != 2 + + + +
+ +
+ +
+ + + + s == "7" + + + "7" == "7" + + + + + + + + + + + makeString( false ) != static_cast<char*>(0) + + + "valid string" != {null string} + + + + + makeString( true ) == static_cast<char*>(0) + + + {null string} == {null string} + + + + + + + + Catch::toString( pair ) == "{ { 42, \"Arthur\" }, { \"Ford\", 24 } }" + + + "{ { 42, "Arthur" }, { "Ford", 24 } }" +== +"{ { 42, "Arthur" }, { "Ford", 24 } }" + + + + + + + + p == 0 + + + NULL == 0 + + + + + +
+ + + a != b + + + 1 != 2 + + + + + b != a + + + 2 != 1 + + + +
+
+ + + a != b + + + 1 != 2 + + + +
+ +
+ +
+ + + replaceInPlace( letters, "b", "z" ) + + + true + + + + + letters == "azcdefcg" + + + "azcdefcg" == "azcdefcg" + + + +
+
+ + + replaceInPlace( letters, "c", "z" ) + + + true + + + + + letters == "abzdefzg" + + + "abzdefzg" == "abzdefzg" + + + +
+
+ + + replaceInPlace( letters, "a", "z" ) + + + true + + + + + letters == "zbcdefcg" + + + "zbcdefcg" == "zbcdefcg" + + + +
+
+ + + replaceInPlace( letters, "g", "z" ) + + + true + + + + + letters == "abcdefcz" + + + "abcdefcz" == "abcdefcz" + + + +
+
+ + + replaceInPlace( letters, letters, "replaced" ) + + + true + + + + + letters == "replaced" + + + "replaced" == "replaced" + + + +
+
+ + + !replaceInPlace( letters, "x", "z" ) + + + !false + + + + + letters == letters + + + "abcdefcg" == "abcdefcg" + + + +
+
+ + + replaceInPlace( s, "'", "|'" ) + + + true + + + + + s == "didn|'t" + + + "didn|'t" == "didn|'t" + +
- + + + + + + 3 + + + + false + + + false + + + + + + + hi + + + i := 7 + + + + false + + + false + + + + + + + + Catch::toString(value) == "{ 34, \"xyzzy\" }" + + + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + + + + + + + + Catch::toString( value ) == "{ 34, \"xyzzy\" }" + + + "{ 34, "xyzzy" }" == "{ 34, "xyzzy" }" + + + + + + + + Catch::toString( pr ) == "{ { \"green\", 55 } }" + + + "{ { "green", 55 } }" +== +"{ { "green", 55 } }" + + + + + + + + std::string( "first" ) == "second" + + + "first" == "second" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + result == "\"wide load\"" + + + ""wide load"" == ""wide load"" + + + + + + + + Catch::toString( item ) == "StringMaker<has_maker>" + + + "StringMaker<has_maker>" +== +"StringMaker<has_maker>" + + + + + + + + Catch::toString( item ) == "toString( has_maker_and_toString )" + + + "toString( has_maker_and_toString )" +== +"toString( has_maker_and_toString )" + + + + + + + + Catch::toString( item ) == "toString( has_toString )" + + + "toString( has_toString )" +== +"toString( has_toString )" + + + + + + + + Catch::toString( v ) == "{ StringMaker<has_maker> }" + + + "{ StringMaker<has_maker> }" +== +"{ StringMaker<has_maker> }" + + + + + + + + Catch::toString(e0) == "E2{0}" + + + "E2{0}" == "E2{0}" + + + + + Catch::toString(e1) == "E2{1}" + + + "E2{1}" == "E2{1}" + + + + + + + + Catch::toString(e0) == "0" + + + "0" == "0" + + + + + Catch::toString(e1) == "1" + + + "1" == "1" + + + + + + + + Catch::toString(vv) == "{ }" + + + "{ }" == "{ }" + + + + + Catch::toString(vv) == "{ 42 }" + + + "{ 42 }" == "{ 42 }" + + + + + Catch::toString(vv) == "{ 42, 250 }" + + + "{ 42, 250 }" == "{ 42, 250 }" + + + + + + + + Catch::toString(vv) == "{ }" + + + "{ }" == "{ }" + + + + + Catch::toString(vv) == "{ \"hello\" }" + + + "{ "hello" }" == "{ "hello" }" + + + + + Catch::toString(vv) == "{ \"hello\", \"world\" }" + + + "{ "hello", "world" }" +== +"{ "hello", "world" }" + + + + + + + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 10 + + + 10 == 10 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 0 + + + 0 == 0 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.capacity() == 0 + + + 0 == 0 + + + +
+ +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 10 + + + 10 >= 10 + + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + +
+ + + v.size() == 5 + + + 5 == 5 + + + + + v.capacity() >= 5 + + + 5 >= 5 + + + +
+ +
+ +
+ +
+
+ +
+ +
+ - + diff --git a/3rdparty/catch/projects/SelfTest/ConditionTests.cpp b/3rdparty/catch/projects/SelfTest/ConditionTests.cpp index b1d29106eea..f135198dcc2 100644 --- a/3rdparty/catch/projects/SelfTest/ConditionTests.cpp +++ b/3rdparty/catch/projects/SelfTest/ConditionTests.cpp @@ -210,29 +210,29 @@ TEST_CASE( "Comparisons with int literals don't warn when mixing signed/ unsigne TEST_CASE( "comparisons between int variables", "" ) { - long long_var = 1L; - unsigned char unsigned_char_var = 1; - unsigned short unsigned_short_var = 1; - unsigned int unsigned_int_var = 1; - unsigned long unsigned_long_var = 1L; + long long_var = 1L; + unsigned char unsigned_char_var = 1; + unsigned short unsigned_short_var = 1; + unsigned int unsigned_int_var = 1; + unsigned long unsigned_long_var = 1L; - REQUIRE( long_var == unsigned_char_var ); - REQUIRE( long_var == unsigned_short_var ); - REQUIRE( long_var == unsigned_int_var ); - REQUIRE( long_var == unsigned_long_var ); + REQUIRE( long_var == unsigned_char_var ); + REQUIRE( long_var == unsigned_short_var ); + REQUIRE( long_var == unsigned_int_var ); + REQUIRE( long_var == unsigned_long_var ); } TEST_CASE( "comparisons between const int variables", "" ) { - const unsigned char unsigned_char_var = 1; - const unsigned short unsigned_short_var = 1; - const unsigned int unsigned_int_var = 1; - const unsigned long unsigned_long_var = 1L; + const unsigned char unsigned_char_var = 1; + const unsigned short unsigned_short_var = 1; + const unsigned int unsigned_int_var = 1; + const unsigned long unsigned_long_var = 1L; - REQUIRE( unsigned_char_var == 1 ); - REQUIRE( unsigned_short_var == 1 ); - REQUIRE( unsigned_int_var == 1 ); - REQUIRE( unsigned_long_var == 1 ); + REQUIRE( unsigned_char_var == 1 ); + REQUIRE( unsigned_short_var == 1 ); + REQUIRE( unsigned_int_var == 1 ); + REQUIRE( unsigned_long_var == 1 ); } TEST_CASE( "Comparisons between unsigned ints and negative signed ints match c++ standard behaviour", "" ) diff --git a/3rdparty/catch/projects/SelfTest/EnumToString.cpp b/3rdparty/catch/projects/SelfTest/EnumToString.cpp index 6917d8ae8a0..f591520fb9c 100644 --- a/3rdparty/catch/projects/SelfTest/EnumToString.cpp +++ b/3rdparty/catch/projects/SelfTest/EnumToString.cpp @@ -38,7 +38,7 @@ TEST_CASE( "toString(enum w/operator<<)", "[toString][enum]" ) { // Enum class without user-provided stream operator enum class EnumClass1 { EnumClass1Value0, EnumClass1Value1 }; -TEST_CASE( "toString(enum class)", "[toString][enum][enumClass]" ) { +TEST_CASE( "toString(enum class)", "[toString][enum][enumClass][c++11][.]" ) { EnumClass1 e0 = EnumClass1::EnumClass1Value0; CHECK( Catch::toString(e0) == "0" ); EnumClass1 e1 = EnumClass1::EnumClass1Value1; @@ -59,7 +59,7 @@ inline std::ostream& operator<<( std::ostream& os, EnumClass2 e2 ) { } } -TEST_CASE( "toString(enum class w/operator<<)", "[toString][enum][enumClass]" ) { +TEST_CASE( "toString(enum class w/operator<<)", "[toString][enum][enumClass][c++11][.]" ) { EnumClass2 e0 = EnumClass2::EnumClass2Value0; CHECK( Catch::toString(e0) == "E2/V0" ); EnumClass2 e1 = EnumClass2::EnumClass2Value1; diff --git a/3rdparty/catch/projects/SelfTest/ExceptionTests.cpp b/3rdparty/catch/projects/SelfTest/ExceptionTests.cpp index 5ef91a1239a..de8f6fa3d7e 100644 --- a/3rdparty/catch/projects/SelfTest/ExceptionTests.cpp +++ b/3rdparty/catch/projects/SelfTest/ExceptionTests.cpp @@ -15,9 +15,9 @@ namespace { inline int thisThrows() { - if( Catch::alwaysTrue() ) - throw std::domain_error( "expected exception" ); - return 1; + if( Catch::alwaysTrue() ) + throw std::domain_error( "expected exception" ); + return 1; } int thisDoesntThrow() @@ -26,60 +26,64 @@ namespace } } -TEST_CASE( "When checked exceptions are thrown they can be expected or unexpected", "" ) +TEST_CASE( "When checked exceptions are thrown they can be expected or unexpected", "[!throws]" ) { REQUIRE_THROWS_AS( thisThrows(), std::domain_error ); REQUIRE_NOTHROW( thisDoesntThrow() ); REQUIRE_THROWS( thisThrows() ); } -TEST_CASE( "Expected exceptions that don't throw or unexpected exceptions fail the test", "[.][failing]" ) +TEST_CASE( "Expected exceptions that don't throw or unexpected exceptions fail the test", "[.][failing][!throws]" ) { CHECK_THROWS_AS( thisThrows(), std::string ); CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ); CHECK_NOTHROW( thisThrows() ); } -TEST_CASE( "When unchecked exceptions are thrown directly they are always failures", "[.][failing]" ) +TEST_CASE( "When unchecked exceptions are thrown directly they are always failures", "[.][failing][!throws]" ) { - if( Catch::alwaysTrue() ) - throw std::domain_error( "unexpected exception" ); + if( Catch::alwaysTrue() ) + throw std::domain_error( "unexpected exception" ); } -TEST_CASE( "An unchecked exception reports the line of the last assertion", "[.][failing]" ) +TEST_CASE( "An unchecked exception reports the line of the last assertion", "[.][failing][!throws]" ) { CHECK( 1 == 1 ); - if( Catch::alwaysTrue() ) - throw std::domain_error( "unexpected exception" ); + if( Catch::alwaysTrue() ) + throw std::domain_error( "unexpected exception" ); } -TEST_CASE( "When unchecked exceptions are thrown from sections they are always failures", "[.][failing]" ) +TEST_CASE( "When unchecked exceptions are thrown from sections they are always failures", "[.][failing][!throws]" ) { SECTION( "section name", "" ) { - if( Catch::alwaysTrue() ) - throw std::domain_error( "unexpected exception" ); + if( Catch::alwaysTrue() ) + throw std::domain_error( "unexpected exception" ); } } -TEST_CASE( "When unchecked exceptions are thrown from functions they are always failures", "[.][failing]" ) +TEST_CASE( "When unchecked exceptions are thrown from functions they are always failures", "[.][failing][!throws]" ) { CHECK( thisThrows() == 0 ); } -TEST_CASE( "When unchecked exceptions are thrown during a REQUIRE the test should abort fail", "[.][failing]" ) +TEST_CASE( "When unchecked exceptions are thrown during a REQUIRE the test should abort fail", "[.][failing][!throws]" ) { REQUIRE( thisThrows() == 0 ); FAIL( "This should never happen" ); } -TEST_CASE( "When unchecked exceptions are thrown during a CHECK the test should abort and fail", "[.][failing]" ) +TEST_CASE( "When unchecked exceptions are thrown during a CHECK the test should continue", "[.][failing][!throws]" ) { - CHECK( thisThrows() == 0 ); - FAIL( "This should never happen" ); + try { + CHECK(thisThrows() == 0); + } + catch(...) { + FAIL( "This should never happen" ); + } } -TEST_CASE( "When unchecked exceptions are thrown, but caught, they do not affect the test", "" ) +TEST_CASE( "When unchecked exceptions are thrown, but caught, they do not affect the test", "[!throws]" ) { try { @@ -139,50 +143,50 @@ CATCH_TRANSLATE_EXCEPTION( double& ex ) return Catch::toString( ex ); } -TEST_CASE("Non-std exceptions can be translated", "[.][failing]" ) +TEST_CASE("Non-std exceptions can be translated", "[.][failing][!throws]" ) { - if( Catch::alwaysTrue() ) - throw CustomException( "custom exception" ); + if( Catch::alwaysTrue() ) + throw CustomException( "custom exception" ); } -TEST_CASE("Custom std-exceptions can be custom translated", "[.][failing]" ) +TEST_CASE("Custom std-exceptions can be custom translated", "[.][failing][!throws]" ) { if( Catch::alwaysTrue() ) throw CustomException( "custom std exception" ); } inline void throwCustom() { - if( Catch::alwaysTrue() ) - throw CustomException( "custom exception - not std" ); + if( Catch::alwaysTrue() ) + throw CustomException( "custom exception - not std" ); } -TEST_CASE( "Custom exceptions can be translated when testing for nothrow", "[.][failing]" ) +TEST_CASE( "Custom exceptions can be translated when testing for nothrow", "[.][failing][!throws]" ) { REQUIRE_NOTHROW( throwCustom() ); } -TEST_CASE( "Custom exceptions can be translated when testing for throwing as something else", "[.][failing]" ) +TEST_CASE( "Custom exceptions can be translated when testing for throwing as something else", "[.][failing][!throws]" ) { REQUIRE_THROWS_AS( throwCustom(), std::exception ); } -TEST_CASE( "Unexpected exceptions can be translated", "[.][failing]" ) +TEST_CASE( "Unexpected exceptions can be translated", "[.][failing][!throws]" ) { - if( Catch::alwaysTrue() ) - throw double( 3.14 ); + if( Catch::alwaysTrue() ) + throw double( 3.14 ); } inline int thisFunctionNotImplemented( int ) { CATCH_NOT_IMPLEMENTED; } -TEST_CASE( "NotImplemented exception", "" ) +TEST_CASE( "NotImplemented exception", "[!throws]" ) { REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) ); } -TEST_CASE( "Exception messages can be tested for", "" ) { +TEST_CASE( "Exception messages can be tested for", "[!throws]" ) { using namespace Catch::Matchers; SECTION( "exact match" ) REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ); @@ -196,7 +200,7 @@ TEST_CASE( "Exception messages can be tested for", "" ) { } } -TEST_CASE( "Mismatching exception messages failing the test", "[.][failing]" ) { +TEST_CASE( "Mismatching exception messages failing the test", "[.][failing][!throws]" ) { REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ); REQUIRE_THROWS_WITH( thisThrows(), "should fail" ); REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ); diff --git a/3rdparty/catch/projects/SelfTest/MiscTests.cpp b/3rdparty/catch/projects/SelfTest/MiscTests.cpp index b440b412c9b..5de2ca4878f 100644 --- a/3rdparty/catch/projects/SelfTest/MiscTests.cpp +++ b/3rdparty/catch/projects/SelfTest/MiscTests.cpp @@ -466,7 +466,7 @@ TEST_CASE( "XmlEncode" ) { } #ifdef CATCH_CONFIG_CPP11_LONG_LONG -TEST_CASE( "long long" ) { +TEST_CASE( "long long", "[c++11][.]" ) { long long l = std::numeric_limits::max(); REQUIRE( l == std::numeric_limits::max() ); diff --git a/3rdparty/catch/projects/SelfTest/PartTrackerTests.cpp b/3rdparty/catch/projects/SelfTest/PartTrackerTests.cpp index 29256351197..45f4cf1cc46 100644 --- a/3rdparty/catch/projects/SelfTest/PartTrackerTests.cpp +++ b/3rdparty/catch/projects/SelfTest/PartTrackerTests.cpp @@ -36,16 +36,21 @@ using namespace Catch; // REQUIRE( C_A_T_C_H_Context().i() == 42 ); //} +Catch::TestCaseTracking::NameAndLocation makeNAL( std::string const& name ) { + return Catch::TestCaseTracking::NameAndLocation( name, Catch::SourceLineInfo() ); +} + TEST_CASE( "Tracker", "" ) { TrackerContext ctx; ctx.startRun(); ctx.startCycle(); - ITracker& testCase = SectionTracker::acquire( ctx, "Testcase" ); + + ITracker& testCase = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase.isOpen() ); - ITracker& s1 = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1 = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1.isOpen() ); SECTION( "successfully close one section", "" ) { @@ -70,10 +75,10 @@ TEST_CASE( "Tracker", "" ) { SECTION( "re-enter after failed section", "" ) { ctx.startCycle(); - ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase2.isOpen() ); - ITracker& s1b = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1b.isOpen() == false ); testCase2.close(); @@ -83,13 +88,13 @@ TEST_CASE( "Tracker", "" ) { } SECTION( "re-enter after failed section and find next section", "" ) { ctx.startCycle(); - ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase2.isOpen() ); - ITracker& s1b = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1b.isOpen() == false ); - ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2.isOpen() ); s2.close(); @@ -104,7 +109,7 @@ TEST_CASE( "Tracker", "" ) { SECTION( "successfully close one section, then find another", "" ) { s1.close(); - ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2.isOpen() == false ); testCase.close(); @@ -112,13 +117,13 @@ TEST_CASE( "Tracker", "" ) { SECTION( "Re-enter - skips S1 and enters S2", "" ) { ctx.startCycle(); - ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase2.isOpen() ); - ITracker& s1b = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1b.isOpen() == false ); - ITracker& s2b = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2b = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2b.isOpen() ); REQUIRE( ctx.completedCycle() == false ); @@ -145,13 +150,13 @@ TEST_CASE( "Tracker", "" ) { // Need a final cycle ctx.startCycle(); - ITracker& testCase3 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase3 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase3.isOpen() ); - ITracker& s1c = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1c = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1c.isOpen() == false ); - ITracker& s2c = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2c = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2c.isOpen() == false ); testCase3.close(); @@ -161,7 +166,7 @@ TEST_CASE( "Tracker", "" ) { } SECTION( "open a nested section", "" ) { - ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2.isOpen() ); s2.close(); @@ -177,7 +182,7 @@ TEST_CASE( "Tracker", "" ) { } SECTION( "start a generator", "" ) { - IndexTracker& g1 = IndexTracker::acquire( ctx, "G1", 2 ); + IndexTracker& g1 = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 ); REQUIRE( g1.isOpen() ); REQUIRE( g1.index() == 0 ); @@ -193,14 +198,14 @@ TEST_CASE( "Tracker", "" ) { SECTION( "Re-enter for second generation", "" ) { ctx.startCycle(); - ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase2.isOpen() ); - ITracker& s1b = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1b.isOpen() ); - IndexTracker& g1b = IndexTracker::acquire( ctx, "G1", 2 ); + IndexTracker& g1b = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 ); REQUIRE( g1b.isOpen() ); REQUIRE( g1b.index() == 1 ); @@ -214,7 +219,7 @@ TEST_CASE( "Tracker", "" ) { } } SECTION( "Start a new inner section", "" ) { - ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2.isOpen() ); s2.close(); @@ -228,19 +233,19 @@ TEST_CASE( "Tracker", "" ) { SECTION( "Re-enter for second generation", "" ) { ctx.startCycle(); - ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase2.isOpen() ); - ITracker& s1b = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1b.isOpen() ); // generator - next value - IndexTracker& g1b = IndexTracker::acquire( ctx, "G1", 2 ); + IndexTracker& g1b = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 ); REQUIRE( g1b.isOpen() ); REQUIRE( g1b.index() == 1 ); // inner section again - ITracker& s2b = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2b = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2b.isOpen() ); s2b.close(); @@ -256,7 +261,7 @@ TEST_CASE( "Tracker", "" ) { } SECTION( "Fail an inner section", "" ) { - ITracker& s2 = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2 = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2.isOpen() ); s2.fail(); @@ -271,19 +276,19 @@ TEST_CASE( "Tracker", "" ) { SECTION( "Re-enter for second generation", "" ) { ctx.startCycle(); - ITracker& testCase2 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase2 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase2.isOpen() ); - ITracker& s1b = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1b = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1b.isOpen() ); // generator - still same value - IndexTracker& g1b = IndexTracker::acquire( ctx, "G1", 2 ); + IndexTracker& g1b = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 ); REQUIRE( g1b.isOpen() ); REQUIRE( g1b.index() == 0 ); // inner section again - this time won't open - ITracker& s2b = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2b = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2b.isOpen() == false ); s1b.close(); @@ -295,19 +300,19 @@ TEST_CASE( "Tracker", "" ) { // Another cycle - now should complete ctx.startCycle(); - ITracker& testCase3 = SectionTracker::acquire( ctx, "Testcase" ); + ITracker& testCase3 = SectionTracker::acquire( ctx, makeNAL( "Testcase" ) ); REQUIRE( testCase3.isOpen() ); - ITracker& s1c = SectionTracker::acquire( ctx, "S1" ); + ITracker& s1c = SectionTracker::acquire( ctx, makeNAL( "S1" ) ); REQUIRE( s1c.isOpen() ); // generator - now next value - IndexTracker& g1c = IndexTracker::acquire( ctx, "G1", 2 ); + IndexTracker& g1c = IndexTracker::acquire( ctx, makeNAL( "G1" ), 2 ); REQUIRE( g1c.isOpen() ); REQUIRE( g1c.index() == 1 ); // inner section - now should open again - ITracker& s2c = SectionTracker::acquire( ctx, "S2" ); + ITracker& s2c = SectionTracker::acquire( ctx, makeNAL( "S2" ) ); REQUIRE( s2c.isOpen() ); s2c.close(); diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest/catch_text.cpp b/3rdparty/catch/projects/SelfTest/SurrogateCpps/catch_test_case_tracker.cpp similarity index 61% rename from 3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest/catch_text.cpp rename to 3rdparty/catch/projects/SelfTest/SurrogateCpps/catch_test_case_tracker.cpp index a08e67b3670..bd67a8a7736 100644 --- a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest/catch_text.cpp +++ b/3rdparty/catch/projects/SelfTest/SurrogateCpps/catch_test_case_tracker.cpp @@ -1,3 +1,2 @@ // This file is only here to verify (to the extent possible) the self sufficiency of the header -#include "catch_suppress_warnings.h" -#include "catch_text.h" +#include "internal/catch_test_case_tracker.hpp" diff --git a/3rdparty/catch/projects/SelfTest/TestMain.cpp b/3rdparty/catch/projects/SelfTest/TestMain.cpp index 16af2f67683..2a1769c3dc9 100644 --- a/3rdparty/catch/projects/SelfTest/TestMain.cpp +++ b/3rdparty/catch/projects/SelfTest/TestMain.cpp @@ -196,13 +196,13 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" } SECTION( "use-colour", "") { - + using Catch::UseColour; - + SECTION( "without option", "" ) { const char* argv[] = { "test" }; CHECK_NOTHROW( parseIntoConfig( argv, config ) ); - + REQUIRE( config.useColour == UseColour::Auto ); } @@ -216,14 +216,14 @@ TEST_CASE( "Process can be configured on command line", "[config][command-line]" SECTION( "yes", "" ) { const char* argv[] = { "test", "--use-colour", "yes" }; CHECK_NOTHROW( parseIntoConfig( argv, config ) ); - + REQUIRE( config.useColour == UseColour::Yes ); } SECTION( "no", "" ) { const char* argv[] = { "test", "--use-colour", "no" }; CHECK_NOTHROW( parseIntoConfig( argv, config ) ); - + REQUIRE( config.useColour == UseColour::No ); } @@ -299,9 +299,10 @@ TEST_CASE( "Long strings can be wrapped", "[wrap]" ) { CHECK( Text( testString, TextAttributes().setWidth( 10 ) ).toString() == testString ); } SECTION( "Trailing newline" , "" ) { - CHECK( Text( "abcdef\n", TextAttributes().setWidth( 10 ) ).toString() == "abcdef\n" ); + CHECK( Text( "abcdef\n", TextAttributes().setWidth( 10 ) ).toString() == "abcdef" ); CHECK( Text( "abcdef", TextAttributes().setWidth( 6 ) ).toString() == "abcdef" ); - CHECK( Text( "abcdef\n", TextAttributes().setWidth( 6 ) ).toString() == "abcdef\n" ); + CHECK( Text( "abcdef\n", TextAttributes().setWidth( 6 ) ).toString() == "abcdef" ); + CHECK( Text( "abcdef\n", TextAttributes().setWidth( 5 ) ).toString() == "abcd-\nef" ); } SECTION( "Wrapped once", "" ) { CHECK( Text( testString, TextAttributes().setWidth( 9 ) ).toString() == "one two\nthree\nfour" ); @@ -313,16 +314,23 @@ TEST_CASE( "Long strings can be wrapped", "[wrap]" ) { } } - SECTION( "With tabs", "" ) { + SECTION( "With wrap-before/ after characters", "" ) { + std::string testString = "one,two(three) "; - // guide: 1234567890123456789 - std::string testString = "one two \tthree four five six"; - - CHECK( Text( testString, TextAttributes().setWidth( 15 ) ).toString() - == "one two three\n four\n five\n six" ); + SECTION( "No wrapping", "" ) { + CHECK( Text( testString, TextAttributes().setWidth( 80 ) ).toString() == testString ); + CHECK( Text( testString, TextAttributes().setWidth( 24 ) ).toString() == testString ); + } + SECTION( "Wrap before", "" ) { + CHECK( Text( testString, TextAttributes().setWidth( 11 ) ).toString() == "one,two\n(three)\n" ); + } + SECTION( "Wrap after", "" ) { + CHECK( Text( testString, TextAttributes().setWidth( 6 ) ).toString() == "one,\ntwo\n(thre-\ne)\n" ); + CHECK( Text( testString, TextAttributes().setWidth( 5 ) ).toString() == "one,\ntwo\n(thr-\nee)\n" ); + CHECK( Text( testString, TextAttributes().setWidth( 4 ) ).toString() == "one,\ntwo\n(th-\nree)\n" ); + } } - } using namespace Catch; diff --git a/3rdparty/catch/projects/SelfTest/ToStringTuple.cpp b/3rdparty/catch/projects/SelfTest/ToStringTuple.cpp index 80e5453097a..fa61f631440 100644 --- a/3rdparty/catch/projects/SelfTest/ToStringTuple.cpp +++ b/3rdparty/catch/projects/SelfTest/ToStringTuple.cpp @@ -7,7 +7,7 @@ #pragma clang diagnostic ignored "-Wc++98-compat" #endif -TEST_CASE( "tuple<>", "[toString][tuple]" ) +TEST_CASE( "tuple<>", "[toString][tuple][c++11][.]" ) { typedef std::tuple<> type; CHECK( "{ }" == Catch::toString(type{}) ); @@ -15,27 +15,27 @@ TEST_CASE( "tuple<>", "[toString][tuple]" ) CHECK( "{ }" == Catch::toString(value) ); } -TEST_CASE( "tuple", "[toString][tuple]" ) +TEST_CASE( "tuple", "[toString][tuple][c++11][.]" ) { typedef std::tuple type; CHECK( "{ 0 }" == Catch::toString(type{0}) ); } -TEST_CASE( "tuple", "[toString][tuple]" ) +TEST_CASE( "tuple", "[toString][tuple][c++11][.]" ) { typedef std::tuple type; CHECK( "1.2f" == Catch::toString(float(1.2)) ); CHECK( "{ 1.2f, 0 }" == Catch::toString(type{1.2,0}) ); } -TEST_CASE( "tuple", "[toString][tuple]" ) +TEST_CASE( "tuple", "[toString][tuple][c++11][.]" ) { typedef std::tuple type; CHECK( "{ \"hello\", \"world\" }" == Catch::toString(type{"hello","world"}) ); } -TEST_CASE( "tuple,tuple<>,float>", "[toString][tuple]" ) +TEST_CASE( "tuple,tuple<>,float>", "[toString][tuple][c++11][.]" ) { typedef std::tuple,std::tuple<>,float> type; type value { std::tuple{42}, {}, 1.2f }; @@ -43,7 +43,7 @@ TEST_CASE( "tuple,tuple<>,float>", "[toString][tuple]" ) } #ifdef CATCH_CONFIG_CPP11_NULLPTR -TEST_CASE( "tuple", "[toString][tuple]" ) +TEST_CASE( "tuple", "[toString][tuple][c++11][.]" ) { typedef std::tuple type; type value { nullptr, 42, "Catch me" }; diff --git a/3rdparty/catch/projects/SelfTest/ToStringVector.cpp b/3rdparty/catch/projects/SelfTest/ToStringVector.cpp index c3a8d4ed647..cd071a9d232 100644 --- a/3rdparty/catch/projects/SelfTest/ToStringVector.cpp +++ b/3rdparty/catch/projects/SelfTest/ToStringVector.cpp @@ -52,7 +52,7 @@ namespace { }; } -TEST_CASE( "vector -> toString", "[toString][vector,allocator]" ) { +TEST_CASE( "vector -> toString", "[toString][vector,allocator][c++11][.]" ) { std::vector > vv; REQUIRE( Catch::toString(vv) == "{ }" ); vv.push_back( 42 ); @@ -61,7 +61,7 @@ TEST_CASE( "vector -> toString", "[toString][vector,allocator]" ) REQUIRE( Catch::toString(vv) == "{ 42, 250 }" ); } -TEST_CASE( "vec> -> toString", "[toString][vector,allocator]" ) { +TEST_CASE( "vec> -> toString", "[toString][vector,allocator][c++11][.]" ) { typedef std::vector > inner; typedef std::vector vector; vector v; diff --git a/3rdparty/catch/projects/SelfTest/ToStringWhich.cpp b/3rdparty/catch/projects/SelfTest/ToStringWhich.cpp index 1d4aa892581..a1d2a60953f 100644 --- a/3rdparty/catch/projects/SelfTest/ToStringWhich.cpp +++ b/3rdparty/catch/projects/SelfTest/ToStringWhich.cpp @@ -37,19 +37,21 @@ TEST_CASE( "toString( has_toString )", "[toString]" ) { } // Call the overload -TEST_CASE( "toString( has_maker )", "[toString]" ) { +TEST_CASE( "toString( has_maker )", "toString]" ) { has_maker item; REQUIRE( Catch::toString( item ) == "StringMaker" ); } // Call the overload -TEST_CASE( "toString( has_maker_and_toString )", "[toString]" ) { +TEST_CASE( "toString( has_maker_and_toString )", "[.][toString]" ) { has_maker_and_toString item; REQUIRE( Catch::toString( item ) == "toString( has_maker_and_toString )" ); } // Vectors... -TEST_CASE( "toString( vectors v(1); // This invokes template toString which actually gives us '{ ? }' REQUIRE( Catch::toString( v ) == "{ {?} }" ); @@ -61,7 +63,8 @@ TEST_CASE( "toString( vectors v(1); // Note: This invokes the template toString -> StringMaker REQUIRE( Catch::toString( v ) == "{ StringMaker }" ); diff --git a/3rdparty/catch/projects/SelfTest/TrickyTests.cpp b/3rdparty/catch/projects/SelfTest/TrickyTests.cpp index eb53e420156..90a4f2fa588 100644 --- a/3rdparty/catch/projects/SelfTest/TrickyTests.cpp +++ b/3rdparty/catch/projects/SelfTest/TrickyTests.cpp @@ -387,7 +387,7 @@ TEST_CASE( "pointer to class", "[Tricky]" ) #include -TEST_CASE( "null_ptr", "[Tricky][c++11]" ) +TEST_CASE( "null_ptr", "[Tricky][c++11][.]" ) { std::unique_ptr ptr; REQUIRE(ptr.get() == nullptr); diff --git a/3rdparty/catch/projects/SelfTest/makefile b/3rdparty/catch/projects/SelfTest/makefile deleted file mode 100644 index 0a29372c875..00000000000 --- a/3rdparty/catch/projects/SelfTest/makefile +++ /dev/null @@ -1,30 +0,0 @@ -SOURCES = ApproxTests.cpp \ - ClassTests.cpp \ - ConditionTests.cpp \ - ExceptionTests.cpp \ - GeneratorTests.cpp \ - MessageTests.cpp \ - MiscTests.cpp \ - TestMain.cpp \ - TrickyTests.cpp \ - BDDTests.cpp \ - VariadicMacrosTests.cpp \ - EnumToString.cpp \ - ToStringPair.cpp \ - ToStringVector.cpp \ - ToStringWhich.cpp - - -OBJECTS = $(patsubst %.cpp, %.o, $(SOURCES)) -CXX = g++ -CXXFLAGS = -I../../include -std=c++11 - -CatchSelfTest: $(OBJECTS) - $(CXX) -o $@ $^ - -test: CatchSelfTest - ./CatchSelfTest - -clean: - rm -f $(OBJECTS) CatchSelfTest - diff --git a/3rdparty/catch/projects/VS2008/TestCatch/TestCatch.sln b/3rdparty/catch/projects/VS2008/TestCatch/TestCatch.sln deleted file mode 100644 index bd85bbe2ca0..00000000000 --- a/3rdparty/catch/projects/VS2008/TestCatch/TestCatch.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCatch", "TestCatch\TestCatch.vcproj", "{A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Debug|Win32.Build.0 = Debug|Win32 - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Release|Win32.ActiveCfg = Release|Win32 - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.cpp b/3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.cpp deleted file mode 100644 index 8dd2067d480..00000000000 --- a/3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.cpp +++ /dev/null @@ -1,8 +0,0 @@ -// TestCatch.cpp : Defines the entry point for the console application. -// - -int main(int argc, char* argv[]) -{ - return 0; -} - diff --git a/3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.vcproj b/3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.vcproj deleted file mode 100644 index d4cb0c97532..00000000000 --- a/3rdparty/catch/projects/VS2008/TestCatch/TestCatch/TestCatch.vcproj +++ /dev/null @@ -1,390 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/3rdparty/catch/projects/VS2010/TestCatch/TestCatch.sln b/3rdparty/catch/projects/VS2010/TestCatch/TestCatch.sln deleted file mode 100644 index efb4502bf98..00000000000 --- a/3rdparty/catch/projects/VS2010/TestCatch/TestCatch.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCatch", "TestCatch\TestCatch.vcxproj", "{A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Debug|Win32.Build.0 = Debug|Win32 - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Release|Win32.ActiveCfg = Release|Win32 - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/3rdparty/catch/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj b/3rdparty/catch/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj deleted file mode 100644 index 52bcea11821..00000000000 --- a/3rdparty/catch/projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj +++ /dev/null @@ -1,148 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E} - TestCatch - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - AllRules.ruleset - - - AllRules.ruleset - - - - - - Disabled - ..\..\..\..\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level4 - EditAndContinue - - - true - Console - MachineX86 - - - - - MaxSpeed - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - ..\..\..\..\include;%(AdditionalIncludeDirectories) - - - true - Console - true - true - MachineX86 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/3rdparty/catch/projects/Where did the projects go.txt b/3rdparty/catch/projects/Where did the projects go.txt new file mode 100644 index 00000000000..c7b011d55eb --- /dev/null +++ b/3rdparty/catch/projects/Where did the projects go.txt @@ -0,0 +1,13 @@ +The canonical project format is now CMake. +To generate an XCode or Visual Studio project you'll need CMake, which you can download from https://cmake.org if necessary. + +To generate the project files open a terminal/ console within the projects directory (where this file is located), create a directory called "Generated" (using mkdir or md), cd into it, then type: + +CMake -G ../.. + +Where is XCode for XCode projects, or "Visual Studio 14" for Visual Studio 2015 (replace 14 with the major version number for any other supported Visual Studio version - or execute CMake -help for the full list) + +Remember to re-run CMake any time you pull from GitHub. +Note that the projects/Generated folder is excluded in .gitignore. So it is recommended to use this. + +CMake can also generate make files or projects for other build systems. Run CMake -help for the full set of options. diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj b/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj deleted file mode 100644 index a26df5361bd..00000000000 --- a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,742 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 26059AF21BD4B94C003D575C /* PartTrackerTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26059AF11BD4B94C003D575C /* PartTrackerTests.cpp */; }; - 263F7A4719B6FCBF009474C2 /* EnumToString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4619B6FCBF009474C2 /* EnumToString.cpp */; }; - 263F7A4B19B6FE1E009474C2 /* ToStringPair.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4819B6FE1E009474C2 /* ToStringPair.cpp */; }; - 263F7A4C19B6FE1E009474C2 /* ToStringVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4919B6FE1E009474C2 /* ToStringVector.cpp */; }; - 263F7A4D19B6FE1E009474C2 /* ToStringWhich.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 263F7A4A19B6FE1E009474C2 /* ToStringWhich.cpp */; }; - 2656C2211925E7330040DB02 /* catch_test_spec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2656C2201925E7330040DB02 /* catch_test_spec.cpp */; }; - 266B06B816F3A60A004ED264 /* VariadicMacrosTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266B06B616F3A60A004ED264 /* VariadicMacrosTests.cpp */; }; - 266ECD74170F3C620030D735 /* BDDTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266ECD73170F3C620030D735 /* BDDTests.cpp */; }; - 26711C8F195D465C0033EDA2 /* TagAliasTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26711C8D195D465C0033EDA2 /* TagAliasTests.cpp */; }; - 26847E5F16BBADB40043B9C1 /* catch_message.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26847E5D16BBADB40043B9C1 /* catch_message.cpp */; }; - 2691574C1A532A280054F1ED /* ToStringTuple.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2691574B1A532A280054F1ED /* ToStringTuple.cpp */; }; - 2694A1FD16A0000E004816E3 /* catch_text.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2694A1FB16A0000E004816E3 /* catch_text.cpp */; }; - 26E1B7D319213BC900812682 /* CmdLineTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26E1B7D119213BC900812682 /* CmdLineTests.cpp */; }; - 4A45DA2416161EF9004F8D6B /* catch_console_colour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA2316161EF9004F8D6B /* catch_console_colour.cpp */; }; - 4A45DA2716161F1F004F8D6B /* catch_ptr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA2616161F1F004F8D6B /* catch_ptr.cpp */; }; - 4A45DA2916161F3D004F8D6B /* catch_streambuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA2816161F3D004F8D6B /* catch_streambuf.cpp */; }; - 4A45DA2B16161F79004F8D6B /* catch_interfaces_registry_hub.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA2A16161F79004F8D6B /* catch_interfaces_registry_hub.cpp */; }; - 4A45DA2D16161FA2004F8D6B /* catch_interfaces_capture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA2C16161FA2004F8D6B /* catch_interfaces_capture.cpp */; }; - 4A45DA3116161FFC004F8D6B /* catch_interfaces_reporter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA3016161FFB004F8D6B /* catch_interfaces_reporter.cpp */; }; - 4A45DA3316162047004F8D6B /* catch_interfaces_exception.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA3216162047004F8D6B /* catch_interfaces_exception.cpp */; }; - 4A45DA3516162071004F8D6B /* catch_interfaces_runner.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A45DA3416162071004F8D6B /* catch_interfaces_runner.cpp */; }; - 4A6D0C27149B3D3B00DB3EAA /* CatchSelfTest.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4A6D0C26149B3D3B00DB3EAA /* CatchSelfTest.1 */; }; - 4A6D0C37149B3D9E00DB3EAA /* ApproxTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C2D149B3D9E00DB3EAA /* ApproxTests.cpp */; }; - 4A6D0C38149B3D9E00DB3EAA /* ClassTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C2F149B3D9E00DB3EAA /* ClassTests.cpp */; }; - 4A6D0C39149B3D9E00DB3EAA /* ConditionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C30149B3D9E00DB3EAA /* ConditionTests.cpp */; }; - 4A6D0C3A149B3D9E00DB3EAA /* ExceptionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C31149B3D9E00DB3EAA /* ExceptionTests.cpp */; }; - 4A6D0C3B149B3D9E00DB3EAA /* GeneratorTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C32149B3D9E00DB3EAA /* GeneratorTests.cpp */; }; - 4A6D0C3C149B3D9E00DB3EAA /* MessageTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C33149B3D9E00DB3EAA /* MessageTests.cpp */; }; - 4A6D0C3D149B3D9E00DB3EAA /* MiscTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C34149B3D9E00DB3EAA /* MiscTests.cpp */; }; - 4A6D0C3E149B3D9E00DB3EAA /* TestMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C35149B3D9E00DB3EAA /* TestMain.cpp */; }; - 4A6D0C3F149B3D9E00DB3EAA /* TrickyTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A6D0C36149B3D9E00DB3EAA /* TrickyTests.cpp */; }; - 4AB3D99D1616216500C9A0F8 /* catch_interfaces_testcase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AB3D99C1616216500C9A0F8 /* catch_interfaces_testcase.cpp */; }; - 4AB3D9A01616219100C9A0F8 /* catch_interfaces_config.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AB3D99F1616219100C9A0F8 /* catch_interfaces_config.cpp */; }; - 4AB3D9A2161621B500C9A0F8 /* catch_interfaces_generators.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AB3D9A1161621B500C9A0F8 /* catch_interfaces_generators.cpp */; }; - 4ACE21CC166CA1B300FB5509 /* catch_option.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4ACE21CA166CA1B300FB5509 /* catch_option.cpp */; }; - 4AEE032016142F910071E950 /* catch_common.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AEE031F16142F910071E950 /* catch_common.cpp */; }; - 4AEE032316142FC70071E950 /* catch_debugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AEE032216142FC70071E950 /* catch_debugger.cpp */; }; - 4AEE032516142FF10071E950 /* catch_stream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AEE032416142FF10071E950 /* catch_stream.cpp */; }; - 4AEE0328161434FD0071E950 /* catch_xmlwriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AEE0327161434FD0071E950 /* catch_xmlwriter.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 4A6D0C1E149B3D3B00DB3EAA /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - 4A6D0C27149B3D3B00DB3EAA /* CatchSelfTest.1 in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 26059AF11BD4B94C003D575C /* PartTrackerTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartTrackerTests.cpp; path = ../../../SelfTest/PartTrackerTests.cpp; sourceTree = ""; }; - 261488FA184C81130041FBEB /* catch_test_spec.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_test_spec.hpp; sourceTree = ""; }; - 261488FC184D1DC10041FBEB /* catch_stream.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_stream.h; sourceTree = ""; }; - 261488FD184D21290041FBEB /* catch_section_info.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_section_info.h; sourceTree = ""; }; - 261488FE184DC32F0041FBEB /* catch_section.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_section.h; sourceTree = ""; }; - 261488FF184DC4A20041FBEB /* catch_debugger.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_debugger.h; sourceTree = ""; }; - 2627F7051935B16F009BCE2D /* catch_result_builder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_result_builder.h; sourceTree = ""; }; - 2627F7061935B55F009BCE2D /* catch_result_builder.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_result_builder.hpp; sourceTree = ""; }; - 262E7399184673A800CAC268 /* catch_reporter_bases.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_bases.hpp; sourceTree = ""; }; - 262E739A1846759000CAC268 /* catch_common.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_common.hpp; sourceTree = ""; }; - 263F7A4519A66608009474C2 /* catch_fatal_condition.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_fatal_condition.hpp; sourceTree = ""; }; - 263F7A4619B6FCBF009474C2 /* EnumToString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EnumToString.cpp; path = ../../../SelfTest/EnumToString.cpp; sourceTree = ""; }; - 263F7A4819B6FE1E009474C2 /* ToStringPair.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringPair.cpp; path = ../../../SelfTest/ToStringPair.cpp; sourceTree = ""; }; - 263F7A4919B6FE1E009474C2 /* ToStringVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringVector.cpp; path = ../../../SelfTest/ToStringVector.cpp; sourceTree = ""; }; - 263F7A4A19B6FE1E009474C2 /* ToStringWhich.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringWhich.cpp; path = ../../../SelfTest/ToStringWhich.cpp; sourceTree = ""; }; - 263FD06017AF8DF200988A20 /* catch_timer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_timer.hpp; sourceTree = ""; }; - 263FD06117AF8DF200988A20 /* catch_timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_timer.h; sourceTree = ""; }; - 2656C21F1925E5100040DB02 /* catch_test_spec_parser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_test_spec_parser.hpp; sourceTree = ""; }; - 2656C2201925E7330040DB02 /* catch_test_spec.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_test_spec.cpp; path = ../../../SelfTest/SurrogateCpps/catch_test_spec.cpp; sourceTree = ""; }; - 2656C226192A77EF0040DB02 /* catch_suppress_warnings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_suppress_warnings.h; sourceTree = ""; }; - 2656C227192A78410040DB02 /* catch_reenable_warnings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_reenable_warnings.h; sourceTree = ""; }; - 266B06B616F3A60A004ED264 /* VariadicMacrosTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VariadicMacrosTests.cpp; path = ../../../SelfTest/VariadicMacrosTests.cpp; sourceTree = ""; }; - 266ECD73170F3C620030D735 /* BDDTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BDDTests.cpp; path = ../../../SelfTest/BDDTests.cpp; sourceTree = ""; }; - 266ECD8C1713614B0030D735 /* catch_legacy_reporter_adapter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_legacy_reporter_adapter.hpp; sourceTree = ""; }; - 266ECD8D1713614B0030D735 /* catch_legacy_reporter_adapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_legacy_reporter_adapter.h; sourceTree = ""; }; - 26711C8D195D465C0033EDA2 /* TagAliasTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TagAliasTests.cpp; path = ../../../SelfTest/TagAliasTests.cpp; sourceTree = ""; }; - 26711C90195D46CD0033EDA2 /* catch_interfaces_tag_alias_registry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_tag_alias_registry.h; sourceTree = ""; }; - 26711C91195D47820033EDA2 /* catch_tag_alias.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_tag_alias.h; sourceTree = ""; }; - 26711C92195D48F60033EDA2 /* catch_tag_alias_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_tag_alias_registry.hpp; sourceTree = ""; }; - 26711C94195D4B120033EDA2 /* catch_tag_alias_registry.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_tag_alias_registry.h; sourceTree = ""; }; - 26759473171C74C200A84BD1 /* catch_compiler_capabilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = catch_compiler_capabilities.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 26847E5B16BBAB790043B9C1 /* catch_message.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_message.h; sourceTree = ""; }; - 26847E5C16BBACB60043B9C1 /* catch_message.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_message.hpp; sourceTree = ""; }; - 26847E5D16BBADB40043B9C1 /* catch_message.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_message.cpp; path = ../../../SelfTest/SurrogateCpps/catch_message.cpp; sourceTree = ""; }; - 268F47B018A93F7800D8C14F /* catch_clara.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_clara.h; sourceTree = ""; }; - 2691574A1A4480C50054F1ED /* catch_reporter_teamcity.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_teamcity.hpp; sourceTree = ""; }; - 2691574B1A532A280054F1ED /* ToStringTuple.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ToStringTuple.cpp; path = ../../../SelfTest/ToStringTuple.cpp; sourceTree = ""; }; - 26926E8318D7777D004E10F2 /* clara.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = clara.h; path = ../../../../include/external/clara.h; sourceTree = ""; }; - 26926E8418D77809004E10F2 /* tbc_text_format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = tbc_text_format.h; path = ../../../../include/external/tbc_text_format.h; sourceTree = ""; }; - 26948287179EF7F900ED166E /* catch_test_case_tracker.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_test_case_tracker.hpp; sourceTree = ""; }; - 2694A1FB16A0000E004816E3 /* catch_text.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = catch_text.cpp; sourceTree = ""; }; - 269831E519078C1600BB0CE0 /* catch_tostring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_tostring.h; sourceTree = ""; }; - 269831E619078CA200BB0CE0 /* catch_tostring.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_tostring.hpp; sourceTree = ""; }; - 269831E719121CA500BB0CE0 /* catch_reporter_compact.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_compact.hpp; sourceTree = ""; }; - 26AEAF1617BEA18E009E32C9 /* catch_platform.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_platform.h; sourceTree = ""; }; - 26DACF2F17206D3400A21326 /* catch_text.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_text.h; sourceTree = ""; }; - 26DFD3B11B53F84700FD6F16 /* catch_wildcard_pattern.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_wildcard_pattern.hpp; sourceTree = ""; }; - 26E1B7D119213BC900812682 /* CmdLineTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CmdLineTests.cpp; path = ../../../SelfTest/CmdLineTests.cpp; sourceTree = ""; }; - 26EDFBD91B72011F00B1873C /* catch_reporter_multi.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_multi.hpp; sourceTree = ""; }; - 4A084F1C15DACEEA0027E631 /* catch_test_case_info.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_test_case_info.hpp; sourceTree = ""; }; - 4A3D7DD01503869D005F9203 /* catch_matchers.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_matchers.hpp; sourceTree = ""; }; - 4A45DA2316161EF9004F8D6B /* catch_console_colour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_console_colour.cpp; path = ../../../SelfTest/SurrogateCpps/catch_console_colour.cpp; sourceTree = ""; }; - 4A45DA2616161F1F004F8D6B /* catch_ptr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_ptr.cpp; path = ../../../SelfTest/SurrogateCpps/catch_ptr.cpp; sourceTree = ""; }; - 4A45DA2816161F3D004F8D6B /* catch_streambuf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_streambuf.cpp; path = ../../../SelfTest/SurrogateCpps/catch_streambuf.cpp; sourceTree = ""; }; - 4A45DA2A16161F79004F8D6B /* catch_interfaces_registry_hub.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_registry_hub.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_registry_hub.cpp; sourceTree = ""; }; - 4A45DA2C16161FA2004F8D6B /* catch_interfaces_capture.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_capture.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_capture.cpp; sourceTree = ""; }; - 4A45DA3016161FFB004F8D6B /* catch_interfaces_reporter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_reporter.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_reporter.cpp; sourceTree = ""; }; - 4A45DA3216162047004F8D6B /* catch_interfaces_exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_exception.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_exception.cpp; sourceTree = ""; }; - 4A45DA3416162071004F8D6B /* catch_interfaces_runner.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_runner.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_runner.cpp; sourceTree = ""; }; - 4A4B0F9715CE6CFB00AE2392 /* catch_registry_hub.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_registry_hub.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A4B0F9915CE6EC100AE2392 /* catch_interfaces_registry_hub.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = catch_interfaces_registry_hub.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 4A4B0F9A15CEF84800AE2392 /* catch_notimplemented_exception.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_notimplemented_exception.h; sourceTree = ""; }; - 4A4B0F9B15CEF8C400AE2392 /* catch_notimplemented_exception.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_notimplemented_exception.hpp; sourceTree = ""; }; - 4A4B0F9C15CEFA8300AE2392 /* catch_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_impl.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C20149B3D3B00DB3EAA /* CatchSelfTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CatchSelfTest; sourceTree = BUILT_PRODUCTS_DIR; }; - 4A6D0C26149B3D3B00DB3EAA /* CatchSelfTest.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = CatchSelfTest.1; sourceTree = ""; }; - 4A6D0C2D149B3D9E00DB3EAA /* ApproxTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ApproxTests.cpp; path = ../../../SelfTest/ApproxTests.cpp; sourceTree = ""; }; - 4A6D0C2F149B3D9E00DB3EAA /* ClassTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ClassTests.cpp; path = ../../../SelfTest/ClassTests.cpp; sourceTree = ""; }; - 4A6D0C30149B3D9E00DB3EAA /* ConditionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConditionTests.cpp; path = ../../../SelfTest/ConditionTests.cpp; sourceTree = ""; }; - 4A6D0C31149B3D9E00DB3EAA /* ExceptionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExceptionTests.cpp; path = ../../../SelfTest/ExceptionTests.cpp; sourceTree = ""; }; - 4A6D0C32149B3D9E00DB3EAA /* GeneratorTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GeneratorTests.cpp; path = ../../../SelfTest/GeneratorTests.cpp; sourceTree = ""; }; - 4A6D0C33149B3D9E00DB3EAA /* MessageTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MessageTests.cpp; path = ../../../SelfTest/MessageTests.cpp; sourceTree = ""; }; - 4A6D0C34149B3D9E00DB3EAA /* MiscTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MiscTests.cpp; path = ../../../SelfTest/MiscTests.cpp; sourceTree = ""; }; - 4A6D0C35149B3D9E00DB3EAA /* TestMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestMain.cpp; path = ../../../SelfTest/TestMain.cpp; sourceTree = ""; }; - 4A6D0C36149B3D9E00DB3EAA /* TrickyTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TrickyTests.cpp; path = ../../../SelfTest/TrickyTests.cpp; sourceTree = ""; }; - 4A6D0C42149B3E1500DB3EAA /* catch_session.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; name = catch_session.hpp; path = ../../../../include/catch_session.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C43149B3E1500DB3EAA /* catch_with_main.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_with_main.hpp; path = ../../../../include/catch_with_main.hpp; sourceTree = ""; }; - 4A6D0C44149B3E1500DB3EAA /* catch.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch.hpp; path = ../../../../include/catch.hpp; sourceTree = ""; }; - 4A6D0C46149B3E3D00DB3EAA /* catch_approx.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_approx.hpp; sourceTree = ""; }; - 4A6D0C47149B3E3D00DB3EAA /* catch_capture.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_capture.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C48149B3E3D00DB3EAA /* catch_commandline.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_commandline.hpp; sourceTree = ""; }; - 4A6D0C49149B3E3D00DB3EAA /* catch_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_common.h; sourceTree = ""; }; - 4A6D0C4A149B3E3D00DB3EAA /* catch_config.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_config.hpp; sourceTree = ""; }; - 4A6D0C4B149B3E3D00DB3EAA /* catch_debugger.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_debugger.hpp; sourceTree = ""; }; - 4A6D0C4C149B3E3D00DB3EAA /* catch_default_main.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_default_main.hpp; sourceTree = ""; }; - 4A6D0C4D149B3E3D00DB3EAA /* catch_evaluate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_evaluate.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C4E149B3E3D00DB3EAA /* catch_exception_translator_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_exception_translator_registry.hpp; sourceTree = ""; }; - 4A6D0C4F149B3E3D00DB3EAA /* catch_generators.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_generators.hpp; sourceTree = ""; }; - 4A6D0C50149B3E3D00DB3EAA /* catch_generators_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_generators_impl.hpp; sourceTree = ""; }; - 4A6D0C51149B3E3D00DB3EAA /* catch_context.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_context.h; sourceTree = ""; }; - 4A6D0C52149B3E3D00DB3EAA /* catch_context_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_context_impl.hpp; sourceTree = ""; }; - 4A6D0C53149B3E3D00DB3EAA /* catch_interfaces_capture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_capture.h; sourceTree = ""; }; - 4A6D0C54149B3E3D00DB3EAA /* catch_interfaces_exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = catch_interfaces_exception.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 4A6D0C55149B3E3D00DB3EAA /* catch_interfaces_reporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_reporter.h; sourceTree = ""; }; - 4A6D0C56149B3E3D00DB3EAA /* catch_interfaces_runner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_runner.h; sourceTree = ""; }; - 4A6D0C57149B3E3D00DB3EAA /* catch_interfaces_testcase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_testcase.h; sourceTree = ""; }; - 4A6D0C58149B3E3D00DB3EAA /* catch_list.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_list.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C59149B3E3D00DB3EAA /* catch_objc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_objc.hpp; sourceTree = ""; }; - 4A6D0C5A149B3E3D00DB3EAA /* catch_reporter_registrars.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_reporter_registrars.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C5B149B3E3D00DB3EAA /* catch_reporter_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_registry.hpp; sourceTree = ""; }; - 4A6D0C5C149B3E3D00DB3EAA /* catch_result_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_result_type.h; sourceTree = ""; }; - 4A6D0C5D149B3E3D00DB3EAA /* catch_assertionresult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = catch_assertionresult.h; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; }; - 4A6D0C5E149B3E3D00DB3EAA /* catch_run_context.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_run_context.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C5F149B3E3D00DB3EAA /* catch_section.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_section.hpp; sourceTree = ""; }; - 4A6D0C60149B3E3D00DB3EAA /* catch_stream.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_stream.hpp; sourceTree = ""; }; - 4A6D0C61149B3E3D00DB3EAA /* catch_test_case_info.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_test_case_info.h; sourceTree = ""; }; - 4A6D0C62149B3E3D00DB3EAA /* catch_test_case_registry_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_test_case_registry_impl.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4A6D0C63149B3E3D00DB3EAA /* catch_test_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_test_registry.hpp; sourceTree = ""; }; - 4A6D0C64149B3E3D00DB3EAA /* catch_xmlwriter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_xmlwriter.hpp; sourceTree = ""; }; - 4A6D0C67149B3E3D00DB3EAA /* catch_reporter_junit.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_junit.hpp; sourceTree = ""; }; - 4A6D0C68149B3E3D00DB3EAA /* catch_reporter_xml.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_xml.hpp; sourceTree = ""; }; - 4A7ADB4314F631E10094FE10 /* catch_totals.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_totals.hpp; sourceTree = ""; }; - 4A7DB2CD1652FE4B00FA6523 /* catch_version.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = catch_version.h; path = ../../../../include/internal/catch_version.h; sourceTree = ""; }; - 4A90B59B15D0F61A00EF71BC /* catch_interfaces_generators.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_generators.h; sourceTree = ""; }; - 4A90B59D15D24FE900EF71BC /* catch_assertionresult.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_assertionresult.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4AA7B8B4165428BA003155F6 /* catch_version.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = catch_version.hpp; path = ../../../../include/internal/catch_version.hpp; sourceTree = ""; }; - 4AB1C73514F97BDA00F31DF7 /* catch_console_colour_impl.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_console_colour_impl.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4AB1C73714F97C1300F31DF7 /* catch_console_colour.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_console_colour.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4AB3D99C1616216500C9A0F8 /* catch_interfaces_testcase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_testcase.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_testcase.cpp; sourceTree = ""; }; - 4AB3D99F1616219100C9A0F8 /* catch_interfaces_config.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_config.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_config.cpp; sourceTree = ""; }; - 4AB3D9A1161621B500C9A0F8 /* catch_interfaces_generators.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_interfaces_generators.cpp; path = ../../../SelfTest/SurrogateCpps/catch_interfaces_generators.cpp; sourceTree = ""; }; - 4AB42F84166F3E1A0099F2C8 /* catch_reporter_console.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_reporter_console.hpp; sourceTree = ""; }; - 4AB77CB51551AEA200857BF0 /* catch_ptr.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_ptr.hpp; sourceTree = ""; }; - 4AB77CB71553B72B00857BF0 /* catch_section_info.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_section_info.hpp; sourceTree = ""; }; - 4ABEA80415C90D2B009F0424 /* catch_objc_arc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = catch_objc_arc.hpp; sourceTree = ""; }; - 4AC91CCE155CF02800DC5117 /* catch_expression_lhs.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; lineEnding = 0; path = catch_expression_lhs.hpp; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.cpp; }; - 4ACE21C8166CA19700FB5509 /* catch_option.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_option.hpp; sourceTree = ""; }; - 4ACE21CA166CA1B300FB5509 /* catch_option.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_option.cpp; path = ../../../SelfTest/SurrogateCpps/catch_option.cpp; sourceTree = ""; }; - 4AEE031F16142F910071E950 /* catch_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_common.cpp; path = ../../../SelfTest/SurrogateCpps/catch_common.cpp; sourceTree = ""; }; - 4AEE032216142FC70071E950 /* catch_debugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_debugger.cpp; path = ../../../SelfTest/SurrogateCpps/catch_debugger.cpp; sourceTree = ""; }; - 4AEE032416142FF10071E950 /* catch_stream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_stream.cpp; path = ../../../SelfTest/SurrogateCpps/catch_stream.cpp; sourceTree = ""; }; - 4AEE0326161431070071E950 /* catch_streambuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catch_streambuf.h; sourceTree = ""; }; - 4AEE0327161434FD0071E950 /* catch_xmlwriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_xmlwriter.cpp; path = ../../../SelfTest/SurrogateCpps/catch_xmlwriter.cpp; sourceTree = ""; }; - 4AFC661D157E96A7009D58CF /* catch_interfaces_config.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_interfaces_config.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4A6D0C1D149B3D3B00DB3EAA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 266E9AD317290E710061DAB2 /* Introspective Tests */ = { - isa = PBXGroup; - children = ( - 26059AF11BD4B94C003D575C /* PartTrackerTests.cpp */, - 26E1B7D119213BC900812682 /* CmdLineTests.cpp */, - 26711C8D195D465C0033EDA2 /* TagAliasTests.cpp */, - ); - name = "Introspective Tests"; - sourceTree = ""; - }; - 26C5F3EB17514B670056FB3C /* External */ = { - isa = PBXGroup; - children = ( - 26926E8418D77809004E10F2 /* tbc_text_format.h */, - 26926E8318D7777D004E10F2 /* clara.h */, - ); - name = External; - sourceTree = ""; - }; - 4A6D0C15149B3D3B00DB3EAA = { - isa = PBXGroup; - children = ( - 4A6D0C23149B3D3B00DB3EAA /* CatchSelfTest */, - 4A6D0C21149B3D3B00DB3EAA /* Products */, - ); - sourceTree = ""; - }; - 4A6D0C21149B3D3B00DB3EAA /* Products */ = { - isa = PBXGroup; - children = ( - 4A6D0C20149B3D3B00DB3EAA /* CatchSelfTest */, - ); - name = Products; - sourceTree = ""; - }; - 4A6D0C23149B3D3B00DB3EAA /* CatchSelfTest */ = { - isa = PBXGroup; - children = ( - 4A6D0C35149B3D9E00DB3EAA /* TestMain.cpp */, - 266E9AD317290E710061DAB2 /* Introspective Tests */, - 4A6D0C40149B3DAB00DB3EAA /* Tests */, - 4A6D0C41149B3DE900DB3EAA /* Catch */, - 4A6D0C26149B3D3B00DB3EAA /* CatchSelfTest.1 */, - ); - path = CatchSelfTest; - sourceTree = ""; - }; - 4A6D0C40149B3DAB00DB3EAA /* Tests */ = { - isa = PBXGroup; - children = ( - 2691574B1A532A280054F1ED /* ToStringTuple.cpp */, - 263F7A4819B6FE1E009474C2 /* ToStringPair.cpp */, - 263F7A4919B6FE1E009474C2 /* ToStringVector.cpp */, - 263F7A4A19B6FE1E009474C2 /* ToStringWhich.cpp */, - 263F7A4619B6FCBF009474C2 /* EnumToString.cpp */, - 266ECD73170F3C620030D735 /* BDDTests.cpp */, - 4A6D0C36149B3D9E00DB3EAA /* TrickyTests.cpp */, - 4A6D0C2D149B3D9E00DB3EAA /* ApproxTests.cpp */, - 4A6D0C2F149B3D9E00DB3EAA /* ClassTests.cpp */, - 4A6D0C30149B3D9E00DB3EAA /* ConditionTests.cpp */, - 4A6D0C31149B3D9E00DB3EAA /* ExceptionTests.cpp */, - 4A6D0C32149B3D9E00DB3EAA /* GeneratorTests.cpp */, - 4A6D0C33149B3D9E00DB3EAA /* MessageTests.cpp */, - 4A6D0C34149B3D9E00DB3EAA /* MiscTests.cpp */, - 266B06B616F3A60A004ED264 /* VariadicMacrosTests.cpp */, - ); - name = Tests; - sourceTree = ""; - }; - 4A6D0C41149B3DE900DB3EAA /* Catch */ = { - isa = PBXGroup; - children = ( - 26C5F3EB17514B670056FB3C /* External */, - 4A7DB2CD1652FE4B00FA6523 /* catch_version.h */, - 4AA7B8B4165428BA003155F6 /* catch_version.hpp */, - 4A8E4DCF160A34E200194CBD /* SurrogateCpps */, - 4A6D0C44149B3E1500DB3EAA /* catch.hpp */, - 4A6D0C42149B3E1500DB3EAA /* catch_session.hpp */, - 4A6D0C43149B3E1500DB3EAA /* catch_with_main.hpp */, - 4A6D0C45149B3E3D00DB3EAA /* internal */, - 4A6D0C65149B3E3D00DB3EAA /* reporters */, - ); - name = Catch; - sourceTree = ""; - }; - 4A6D0C45149B3E3D00DB3EAA /* internal */ = { - isa = PBXGroup; - children = ( - 4AC91CC3155C38D300DC5117 /* Objective-C */, - 4AC91CC2155C388300DC5117 /* Infrastructure */, - 4AC91CC1155C387400DC5117 /* Interfaces */, - 4AC91CC0155C384400DC5117 /* Process */, - 4AC91CBF155C381600DC5117 /* Test execution */, - 4AC91CBE155C37F800DC5117 /* Registries */, - 4AC91CBD155C37B500DC5117 /* Assertions */, - 4AC91CB4155B9EBF00DC5117 /* impl */, - ); - name = internal; - path = ../../../../include/internal; - sourceTree = ""; - }; - 4A6D0C65149B3E3D00DB3EAA /* reporters */ = { - isa = PBXGroup; - children = ( - 269831E719121CA500BB0CE0 /* catch_reporter_compact.hpp */, - 262E7399184673A800CAC268 /* catch_reporter_bases.hpp */, - 4A6D0C67149B3E3D00DB3EAA /* catch_reporter_junit.hpp */, - 4A6D0C68149B3E3D00DB3EAA /* catch_reporter_xml.hpp */, - 4AB42F84166F3E1A0099F2C8 /* catch_reporter_console.hpp */, - 2691574A1A4480C50054F1ED /* catch_reporter_teamcity.hpp */, - 26EDFBD91B72011F00B1873C /* catch_reporter_multi.hpp */, - ); - name = reporters; - path = ../../../../include/reporters; - sourceTree = ""; - }; - 4A8E4DCF160A34E200194CBD /* SurrogateCpps */ = { - isa = PBXGroup; - children = ( - 2656C2201925E7330040DB02 /* catch_test_spec.cpp */, - 4AEE031F16142F910071E950 /* catch_common.cpp */, - 4AEE032216142FC70071E950 /* catch_debugger.cpp */, - 4AEE032416142FF10071E950 /* catch_stream.cpp */, - 4AEE0327161434FD0071E950 /* catch_xmlwriter.cpp */, - 4A45DA2316161EF9004F8D6B /* catch_console_colour.cpp */, - 4A45DA2616161F1F004F8D6B /* catch_ptr.cpp */, - 4A45DA2816161F3D004F8D6B /* catch_streambuf.cpp */, - 4A45DA2A16161F79004F8D6B /* catch_interfaces_registry_hub.cpp */, - 4A45DA2C16161FA2004F8D6B /* catch_interfaces_capture.cpp */, - 4A45DA3216162047004F8D6B /* catch_interfaces_exception.cpp */, - 4A45DA3016161FFB004F8D6B /* catch_interfaces_reporter.cpp */, - 4A45DA3416162071004F8D6B /* catch_interfaces_runner.cpp */, - 4AB3D99C1616216500C9A0F8 /* catch_interfaces_testcase.cpp */, - 4AB3D99F1616219100C9A0F8 /* catch_interfaces_config.cpp */, - 4AB3D9A1161621B500C9A0F8 /* catch_interfaces_generators.cpp */, - 4ACE21CA166CA1B300FB5509 /* catch_option.cpp */, - 2694A1FB16A0000E004816E3 /* catch_text.cpp */, - 26847E5D16BBADB40043B9C1 /* catch_message.cpp */, - ); - name = SurrogateCpps; - sourceTree = ""; - }; - 4AC91CB4155B9EBF00DC5117 /* impl */ = { - isa = PBXGroup; - children = ( - 4A6D0C5F149B3E3D00DB3EAA /* catch_section.hpp */, - 263FD06017AF8DF200988A20 /* catch_timer.hpp */, - 4A4B0F9C15CEFA8300AE2392 /* catch_impl.hpp */, - 4A4B0F9715CE6CFB00AE2392 /* catch_registry_hub.hpp */, - 4A6D0C50149B3E3D00DB3EAA /* catch_generators_impl.hpp */, - 4A6D0C52149B3E3D00DB3EAA /* catch_context_impl.hpp */, - 4A6D0C5E149B3E3D00DB3EAA /* catch_run_context.hpp */, - 4A6D0C62149B3E3D00DB3EAA /* catch_test_case_registry_impl.hpp */, - 4AB1C73514F97BDA00F31DF7 /* catch_console_colour_impl.hpp */, - 4A4B0F9B15CEF8C400AE2392 /* catch_notimplemented_exception.hpp */, - 4A90B59D15D24FE900EF71BC /* catch_assertionresult.hpp */, - 4A084F1C15DACEEA0027E631 /* catch_test_case_info.hpp */, - 26847E5C16BBACB60043B9C1 /* catch_message.hpp */, - 2627F7061935B55F009BCE2D /* catch_result_builder.hpp */, - 26711C92195D48F60033EDA2 /* catch_tag_alias_registry.hpp */, - ); - name = impl; - sourceTree = ""; - }; - 4AC91CBD155C37B500DC5117 /* Assertions */ = { - isa = PBXGroup; - children = ( - 269831E519078C1600BB0CE0 /* catch_tostring.h */, - 269831E619078CA200BB0CE0 /* catch_tostring.hpp */, - 4A6D0C4D149B3E3D00DB3EAA /* catch_evaluate.hpp */, - 4A6D0C4F149B3E3D00DB3EAA /* catch_generators.hpp */, - 4A6D0C5C149B3E3D00DB3EAA /* catch_result_type.h */, - 4A6D0C5D149B3E3D00DB3EAA /* catch_assertionresult.h */, - 261488FE184DC32F0041FBEB /* catch_section.h */, - 4A3D7DD01503869D005F9203 /* catch_matchers.hpp */, - 4A6D0C46149B3E3D00DB3EAA /* catch_approx.hpp */, - 4A6D0C47149B3E3D00DB3EAA /* catch_capture.hpp */, - 4AC91CCE155CF02800DC5117 /* catch_expression_lhs.hpp */, - 4A4B0F9A15CEF84800AE2392 /* catch_notimplemented_exception.h */, - 26847E5B16BBAB790043B9C1 /* catch_message.h */, - 261488FD184D21290041FBEB /* catch_section_info.h */, - 2627F7051935B16F009BCE2D /* catch_result_builder.h */, - ); - name = Assertions; - sourceTree = ""; - }; - 4AC91CBE155C37F800DC5117 /* Registries */ = { - isa = PBXGroup; - children = ( - 4A6D0C4E149B3E3D00DB3EAA /* catch_exception_translator_registry.hpp */, - 4A6D0C5A149B3E3D00DB3EAA /* catch_reporter_registrars.hpp */, - 4A6D0C5B149B3E3D00DB3EAA /* catch_reporter_registry.hpp */, - 4A6D0C63149B3E3D00DB3EAA /* catch_test_registry.hpp */, - ); - name = Registries; - sourceTree = ""; - }; - 4AC91CBF155C381600DC5117 /* Test execution */ = { - isa = PBXGroup; - children = ( - 261488FA184C81130041FBEB /* catch_test_spec.hpp */, - 2656C21F1925E5100040DB02 /* catch_test_spec_parser.hpp */, - 4A6D0C4A149B3E3D00DB3EAA /* catch_config.hpp */, - 4A6D0C51149B3E3D00DB3EAA /* catch_context.h */, - 4A6D0C61149B3E3D00DB3EAA /* catch_test_case_info.h */, - 4A7ADB4314F631E10094FE10 /* catch_totals.hpp */, - 4AB77CB71553B72B00857BF0 /* catch_section_info.hpp */, - 26948287179EF7F900ED166E /* catch_test_case_tracker.hpp */, - 26711C91195D47820033EDA2 /* catch_tag_alias.h */, - 26711C94195D4B120033EDA2 /* catch_tag_alias_registry.h */, - ); - name = "Test execution"; - sourceTree = ""; - }; - 4AC91CC0155C384400DC5117 /* Process */ = { - isa = PBXGroup; - children = ( - 4A6D0C58149B3E3D00DB3EAA /* catch_list.hpp */, - 4A6D0C48149B3E3D00DB3EAA /* catch_commandline.hpp */, - 4A6D0C4C149B3E3D00DB3EAA /* catch_default_main.hpp */, - ); - name = Process; - sourceTree = ""; - }; - 4AC91CC1155C387400DC5117 /* Interfaces */ = { - isa = PBXGroup; - children = ( - 4A4B0F9915CE6EC100AE2392 /* catch_interfaces_registry_hub.h */, - 4A6D0C53149B3E3D00DB3EAA /* catch_interfaces_capture.h */, - 4A6D0C54149B3E3D00DB3EAA /* catch_interfaces_exception.h */, - 4A6D0C55149B3E3D00DB3EAA /* catch_interfaces_reporter.h */, - 4A6D0C56149B3E3D00DB3EAA /* catch_interfaces_runner.h */, - 4A6D0C57149B3E3D00DB3EAA /* catch_interfaces_testcase.h */, - 4AFC661D157E96A7009D58CF /* catch_interfaces_config.h */, - 4A90B59B15D0F61A00EF71BC /* catch_interfaces_generators.h */, - 26711C90195D46CD0033EDA2 /* catch_interfaces_tag_alias_registry.h */, - ); - name = Interfaces; - sourceTree = ""; - }; - 4AC91CC2155C388300DC5117 /* Infrastructure */ = { - isa = PBXGroup; - children = ( - 266ECD8C1713614B0030D735 /* catch_legacy_reporter_adapter.hpp */, - 266ECD8D1713614B0030D735 /* catch_legacy_reporter_adapter.h */, - 4A6D0C49149B3E3D00DB3EAA /* catch_common.h */, - 262E739A1846759000CAC268 /* catch_common.hpp */, - 4A6D0C4B149B3E3D00DB3EAA /* catch_debugger.hpp */, - 261488FF184DC4A20041FBEB /* catch_debugger.h */, - 4A6D0C60149B3E3D00DB3EAA /* catch_stream.hpp */, - 4A6D0C64149B3E3D00DB3EAA /* catch_xmlwriter.hpp */, - 4AB1C73714F97C1300F31DF7 /* catch_console_colour.hpp */, - 4AB77CB51551AEA200857BF0 /* catch_ptr.hpp */, - 4AEE0326161431070071E950 /* catch_streambuf.h */, - 4ACE21C8166CA19700FB5509 /* catch_option.hpp */, - 26759473171C74C200A84BD1 /* catch_compiler_capabilities.h */, - 26DACF2F17206D3400A21326 /* catch_text.h */, - 263FD06117AF8DF200988A20 /* catch_timer.h */, - 26AEAF1617BEA18E009E32C9 /* catch_platform.h */, - 261488FC184D1DC10041FBEB /* catch_stream.h */, - 268F47B018A93F7800D8C14F /* catch_clara.h */, - 2656C226192A77EF0040DB02 /* catch_suppress_warnings.h */, - 2656C227192A78410040DB02 /* catch_reenable_warnings.h */, - 263F7A4519A66608009474C2 /* catch_fatal_condition.hpp */, - 26DFD3B11B53F84700FD6F16 /* catch_wildcard_pattern.hpp */, - ); - name = Infrastructure; - sourceTree = ""; - }; - 4AC91CC3155C38D300DC5117 /* Objective-C */ = { - isa = PBXGroup; - children = ( - 4A6D0C59149B3E3D00DB3EAA /* catch_objc.hpp */, - 4ABEA80415C90D2B009F0424 /* catch_objc_arc.hpp */, - ); - name = "Objective-C"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4A6D0C1F149B3D3B00DB3EAA /* CatchSelfTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4A6D0C2A149B3D3B00DB3EAA /* Build configuration list for PBXNativeTarget "CatchSelfTest" */; - buildPhases = ( - 4A6D0C1C149B3D3B00DB3EAA /* Sources */, - 4A6D0C1D149B3D3B00DB3EAA /* Frameworks */, - 4A6D0C1E149B3D3B00DB3EAA /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = CatchSelfTest; - productName = CatchSelfTest; - productReference = 4A6D0C20149B3D3B00DB3EAA /* CatchSelfTest */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4A6D0C17149B3D3B00DB3EAA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0710; - }; - buildConfigurationList = 4A6D0C1A149B3D3B00DB3EAA /* Build configuration list for PBXProject "CatchSelfTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 4A6D0C15149B3D3B00DB3EAA; - productRefGroup = 4A6D0C21149B3D3B00DB3EAA /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 4A6D0C1F149B3D3B00DB3EAA /* CatchSelfTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 4A6D0C1C149B3D3B00DB3EAA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 263F7A4719B6FCBF009474C2 /* EnumToString.cpp in Sources */, - 4A6D0C37149B3D9E00DB3EAA /* ApproxTests.cpp in Sources */, - 4A6D0C38149B3D9E00DB3EAA /* ClassTests.cpp in Sources */, - 4A6D0C39149B3D9E00DB3EAA /* ConditionTests.cpp in Sources */, - 4A6D0C3A149B3D9E00DB3EAA /* ExceptionTests.cpp in Sources */, - 4A6D0C3B149B3D9E00DB3EAA /* GeneratorTests.cpp in Sources */, - 4A6D0C3C149B3D9E00DB3EAA /* MessageTests.cpp in Sources */, - 4A6D0C3D149B3D9E00DB3EAA /* MiscTests.cpp in Sources */, - 4A6D0C3E149B3D9E00DB3EAA /* TestMain.cpp in Sources */, - 4A6D0C3F149B3D9E00DB3EAA /* TrickyTests.cpp in Sources */, - 263F7A4D19B6FE1E009474C2 /* ToStringWhich.cpp in Sources */, - 26059AF21BD4B94C003D575C /* PartTrackerTests.cpp in Sources */, - 263F7A4B19B6FE1E009474C2 /* ToStringPair.cpp in Sources */, - 4AEE032016142F910071E950 /* catch_common.cpp in Sources */, - 263F7A4C19B6FE1E009474C2 /* ToStringVector.cpp in Sources */, - 4AEE032316142FC70071E950 /* catch_debugger.cpp in Sources */, - 4AEE032516142FF10071E950 /* catch_stream.cpp in Sources */, - 4AEE0328161434FD0071E950 /* catch_xmlwriter.cpp in Sources */, - 4A45DA2416161EF9004F8D6B /* catch_console_colour.cpp in Sources */, - 4A45DA2716161F1F004F8D6B /* catch_ptr.cpp in Sources */, - 26E1B7D319213BC900812682 /* CmdLineTests.cpp in Sources */, - 2656C2211925E7330040DB02 /* catch_test_spec.cpp in Sources */, - 4A45DA2916161F3D004F8D6B /* catch_streambuf.cpp in Sources */, - 4A45DA2B16161F79004F8D6B /* catch_interfaces_registry_hub.cpp in Sources */, - 4A45DA2D16161FA2004F8D6B /* catch_interfaces_capture.cpp in Sources */, - 4A45DA3116161FFC004F8D6B /* catch_interfaces_reporter.cpp in Sources */, - 4A45DA3316162047004F8D6B /* catch_interfaces_exception.cpp in Sources */, - 2691574C1A532A280054F1ED /* ToStringTuple.cpp in Sources */, - 26711C8F195D465C0033EDA2 /* TagAliasTests.cpp in Sources */, - 4A45DA3516162071004F8D6B /* catch_interfaces_runner.cpp in Sources */, - 4AB3D99D1616216500C9A0F8 /* catch_interfaces_testcase.cpp in Sources */, - 4AB3D9A01616219100C9A0F8 /* catch_interfaces_config.cpp in Sources */, - 4AB3D9A2161621B500C9A0F8 /* catch_interfaces_generators.cpp in Sources */, - 4ACE21CC166CA1B300FB5509 /* catch_option.cpp in Sources */, - 2694A1FD16A0000E004816E3 /* catch_text.cpp in Sources */, - 26847E5F16BBADB40043B9C1 /* catch_message.cpp in Sources */, - 266B06B816F3A60A004ED264 /* VariadicMacrosTests.cpp in Sources */, - 266ECD74170F3C620030D735 /* BDDTests.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 4A6D0C28149B3D3B00DB3EAA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_CXX0X_EXTENSIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_PEDANTIC = YES; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = ""; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(PROJECT_DIR)/../../../include\""; - }; - name = Debug; - }; - 4A6D0C29149B3D3B00DB3EAA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_CXX0X_EXTENSIONS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; - CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES; - GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES; - GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES; - GCC_WARN_PEDANTIC = YES; - GCC_WARN_SHADOW = YES; - GCC_WARN_SIGN_COMPARE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_LABEL = YES; - GCC_WARN_UNUSED_PARAMETER = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = ""; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "\"$(PROJECT_DIR)/../../../include\""; - }; - name = Release; - }; - 4A6D0C2B149B3D3B00DB3EAA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "compiler-default"; - CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WARNING_CFLAGS = ( - "-Weverything", - "-Wparentheses", - "-Wno-disabled-macro-expansion", - ); - }; - name = Debug; - }; - 4A6D0C2C149B3D3B00DB3EAA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "compiler-default"; - CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WARNING_CFLAGS = ( - "-Weverything", - "-Wparentheses", - "-Wno-disabled-macro-expansion", - ); - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4A6D0C1A149B3D3B00DB3EAA /* Build configuration list for PBXProject "CatchSelfTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A6D0C28149B3D3B00DB3EAA /* Debug */, - 4A6D0C29149B3D3B00DB3EAA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4A6D0C2A149B3D3B00DB3EAA /* Build configuration list for PBXNativeTarget "CatchSelfTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A6D0C2B149B3D3B00DB3EAA /* Debug */, - 4A6D0C2C149B3D3B00DB3EAA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 4A6D0C17149B3D3B00DB3EAA /* Project object */; -} diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 804437d0651..00000000000 --- a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest/CatchSelfTest.1 b/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest/CatchSelfTest.1 deleted file mode 100644 index 28b36e20289..00000000000 --- a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTest/CatchSelfTest.1 +++ /dev/null @@ -1,79 +0,0 @@ -.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. -.\"See Also: -.\"man mdoc.samples for a complete listing of options -.\"man mdoc for the short list of editing options -.\"/usr/share/misc/mdoc.template -.Dd 16/12/2011 \" DATE -.Dt CatchSelfTest 1 \" Program name and manual section number -.Os Darwin -.Sh NAME \" Section Header - required - don't modify -.Nm CatchSelfTest, -.\" The following lines are read in generating the apropos(man -k) database. Use only key -.\" words here as the database is built based on the words here and in the .ND line. -.Nm Other_name_for_same_program(), -.Nm Yet another name for the same program. -.\" Use .Nm macro to designate other names for the documented program. -.Nd This line parsed for whatis database. -.Sh SYNOPSIS \" Section Header - required - don't modify -.Nm -.Op Fl abcd \" [-abcd] -.Op Fl a Ar path \" [-a path] -.Op Ar file \" [file] -.Op Ar \" [file ...] -.Ar arg0 \" Underlined argument - use .Ar anywhere to underline -arg2 ... \" Arguments -.Sh DESCRIPTION \" Section Header - required - don't modify -Use the .Nm macro to refer to your program throughout the man page like such: -.Nm -Underlining is accomplished with the .Ar macro like this: -.Ar underlined text . -.Pp \" Inserts a space -A list of items with descriptions: -.Bl -tag -width -indent \" Begins a tagged list -.It item a \" Each item preceded by .It macro -Description of item a -.It item b -Description of item b -.El \" Ends the list -.Pp -A list of flags and their descriptions: -.Bl -tag -width -indent \" Differs from above in tag removed -.It Fl a \"-a flag as a list item -Description of -a flag -.It Fl b -Description of -b flag -.El \" Ends the list -.Pp -.\" .Sh ENVIRONMENT \" May not be needed -.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 -.\" .It Ev ENV_VAR_1 -.\" Description of ENV_VAR_1 -.\" .It Ev ENV_VAR_2 -.\" Description of ENV_VAR_2 -.\" .El -.Sh FILES \" File used or created by the topic of the man page -.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact -.It Pa /usr/share/file_name -FILE_1 description -.It Pa /Users/joeuser/Library/really_long_file_name -FILE_2 description -.El \" Ends the list -.\" .Sh DIAGNOSTICS \" May not be needed -.\" .Bl -diag -.\" .It Diagnostic Tag -.\" Diagnostic informtion here. -.\" .It Diagnostic Tag -.\" Diagnostic informtion here. -.\" .El -.Sh SEE ALSO -.\" List links in ascending order by section, alphabetically within a section. -.\" Please do not reference files that do not exist without filing a bug report -.Xr a 1 , -.Xr b 1 , -.Xr c 1 , -.Xr a 2 , -.Xr b 2 , -.Xr a 3 , -.Xr b 3 -.\" .Sh BUGS \" Document known, unremedied bugs -.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.pbxproj b/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.pbxproj deleted file mode 100644 index 1eee6eb6b64..00000000000 --- a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.pbxproj +++ /dev/null @@ -1,258 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 4A2894D615D3956000E20735 /* ApproxTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894D515D3956000E20735 /* ApproxTests.cpp */; }; - 4AB735FA15D396F400F9F7C3 /* TestMain.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894E015D3957500E20735 /* TestMain.cpp */; }; - 4AB735FB15D3970C00F9F7C3 /* ClassTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894DA15D3957500E20735 /* ClassTests.cpp */; }; - 4AB735FC15D3971100F9F7C3 /* ConditionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894DB15D3957500E20735 /* ConditionTests.cpp */; }; - 4AB735FD15D3971600F9F7C3 /* ExceptionTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894DC15D3957500E20735 /* ExceptionTests.cpp */; }; - 4AB735FE15D3971600F9F7C3 /* GeneratorTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894DD15D3957500E20735 /* GeneratorTests.cpp */; }; - 4AB735FF15D3971600F9F7C3 /* MessageTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894DE15D3957500E20735 /* MessageTests.cpp */; }; - 4AB7360015D3971600F9F7C3 /* MiscTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894DF15D3957500E20735 /* MiscTests.cpp */; }; - 4AB7360115D3971600F9F7C3 /* TrickyTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4A2894E115D3957500E20735 /* TrickyTests.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 4A90B5D415D2E3E900EF71BC /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 4A2894D515D3956000E20735 /* ApproxTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ApproxTests.cpp; path = ../../../SelfTest/ApproxTests.cpp; sourceTree = ""; }; - 4A2894DA15D3957500E20735 /* ClassTests.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ClassTests.cpp; path = ../../../SelfTest/ClassTests.cpp; sourceTree = ""; }; - 4A2894DB15D3957500E20735 /* ConditionTests.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ConditionTests.cpp; path = ../../../SelfTest/ConditionTests.cpp; sourceTree = ""; }; - 4A2894DC15D3957500E20735 /* ExceptionTests.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = ExceptionTests.cpp; path = ../../../SelfTest/ExceptionTests.cpp; sourceTree = ""; }; - 4A2894DD15D3957500E20735 /* GeneratorTests.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = GeneratorTests.cpp; path = ../../../SelfTest/GeneratorTests.cpp; sourceTree = ""; }; - 4A2894DE15D3957500E20735 /* MessageTests.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MessageTests.cpp; path = ../../../SelfTest/MessageTests.cpp; sourceTree = ""; }; - 4A2894DF15D3957500E20735 /* MiscTests.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = MiscTests.cpp; path = ../../../SelfTest/MiscTests.cpp; sourceTree = ""; }; - 4A2894E015D3957500E20735 /* TestMain.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = TestMain.cpp; path = ../../../SelfTest/TestMain.cpp; sourceTree = ""; }; - 4A2894E115D3957500E20735 /* TrickyTests.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = TrickyTests.cpp; path = ../../../SelfTest/TrickyTests.cpp; sourceTree = ""; }; - 4A90B5D615D2E3E900EF71BC /* CatchSelfTestSingle */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CatchSelfTestSingle; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4A90B5D315D2E3E900EF71BC /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4A2894E215D3957D00E20735 /* Self Test */ = { - isa = PBXGroup; - children = ( - 4A2894E015D3957500E20735 /* TestMain.cpp */, - ); - name = "Self Test"; - sourceTree = ""; - }; - 4A2894E315D3959800E20735 /* Test Cases */ = { - isa = PBXGroup; - children = ( - 4A2894DA15D3957500E20735 /* ClassTests.cpp */, - 4A2894DB15D3957500E20735 /* ConditionTests.cpp */, - 4A2894DC15D3957500E20735 /* ExceptionTests.cpp */, - 4A2894DD15D3957500E20735 /* GeneratorTests.cpp */, - 4A2894DE15D3957500E20735 /* MessageTests.cpp */, - 4A2894DF15D3957500E20735 /* MiscTests.cpp */, - 4A2894E115D3957500E20735 /* TrickyTests.cpp */, - 4A2894D515D3956000E20735 /* ApproxTests.cpp */, - ); - name = "Test Cases"; - sourceTree = ""; - }; - 4A90B5CB15D2E3E900EF71BC = { - isa = PBXGroup; - children = ( - 4A90B5D915D2E3E900EF71BC /* CatchSelfTestSingle */, - 4A90B5D715D2E3E900EF71BC /* Products */, - ); - sourceTree = ""; - }; - 4A90B5D715D2E3E900EF71BC /* Products */ = { - isa = PBXGroup; - children = ( - 4A90B5D615D2E3E900EF71BC /* CatchSelfTestSingle */, - ); - name = Products; - sourceTree = ""; - }; - 4A90B5D915D2E3E900EF71BC /* CatchSelfTestSingle */ = { - isa = PBXGroup; - children = ( - 4A2894E315D3959800E20735 /* Test Cases */, - 4A2894E215D3957D00E20735 /* Self Test */, - ); - path = CatchSelfTestSingle; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4A90B5D515D2E3E900EF71BC /* CatchSelfTestSingle */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4A90B5E015D2E3E900EF71BC /* Build configuration list for PBXNativeTarget "CatchSelfTestSingle" */; - buildPhases = ( - 4A90B5D215D2E3E900EF71BC /* Sources */, - 4A90B5D315D2E3E900EF71BC /* Frameworks */, - 4A90B5D415D2E3E900EF71BC /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = CatchSelfTestSingle; - productName = CatchSelfTestSingle; - productReference = 4A90B5D615D2E3E900EF71BC /* CatchSelfTestSingle */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4A90B5CD15D2E3E900EF71BC /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - ORGANIZATIONNAME = "Phil Nash"; - }; - buildConfigurationList = 4A90B5D015D2E3E900EF71BC /* Build configuration list for PBXProject "CatchSelfTestSingle" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 4A90B5CB15D2E3E900EF71BC; - productRefGroup = 4A90B5D715D2E3E900EF71BC /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 4A90B5D515D2E3E900EF71BC /* CatchSelfTestSingle */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 4A90B5D215D2E3E900EF71BC /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4A2894D615D3956000E20735 /* ApproxTests.cpp in Sources */, - 4AB735FA15D396F400F9F7C3 /* TestMain.cpp in Sources */, - 4AB735FB15D3970C00F9F7C3 /* ClassTests.cpp in Sources */, - 4AB735FC15D3971100F9F7C3 /* ConditionTests.cpp in Sources */, - 4AB735FD15D3971600F9F7C3 /* ExceptionTests.cpp in Sources */, - 4AB735FE15D3971600F9F7C3 /* GeneratorTests.cpp in Sources */, - 4AB735FF15D3971600F9F7C3 /* MessageTests.cpp in Sources */, - 4AB7360015D3971600F9F7C3 /* MiscTests.cpp in Sources */, - 4AB7360115D3971600F9F7C3 /* TrickyTests.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 4A90B5DE15D2E3E900EF71BC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 4A90B5DF15D2E3E900EF71BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.8; - SDKROOT = macosx; - }; - name = Release; - }; - 4A90B5E115D2E3E900EF71BC /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LIBRARY = "libc++"; - HEADER_SEARCH_PATHS = "../../../single_include/**"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 4A90B5E215D2E3E900EF71BC /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LIBRARY = "libc++"; - HEADER_SEARCH_PATHS = "../../../single_include/**"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4A90B5D015D2E3E900EF71BC /* Build configuration list for PBXProject "CatchSelfTestSingle" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A90B5DE15D2E3E900EF71BC /* Debug */, - 4A90B5DF15D2E3E900EF71BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4A90B5E015D2E3E900EF71BC /* Build configuration list for PBXNativeTarget "CatchSelfTestSingle" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A90B5E115D2E3E900EF71BC /* Debug */, - 4A90B5E215D2E3E900EF71BC /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 4A90B5CD15D2E3E900EF71BC /* Project object */; -} diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 4fcfc0e62ac..00000000000 --- a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/xcshareddata/CatchSelfTestSingle.xccheckout b/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/xcshareddata/CatchSelfTestSingle.xccheckout deleted file mode 100644 index cce7052bd19..00000000000 --- a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj/project.xcworkspace/xcshareddata/CatchSelfTestSingle.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 3A514CAE-B659-4429-93A3-39F9C0349EC4 - IDESourceControlProjectName - CatchSelfTestSingle - IDESourceControlProjectOriginsDictionary - - 90C00904F36E6ADB57A7313E998815D255B0DEAF - https://github.com/philsquared/Catch.git - - IDESourceControlProjectPath - projects/XCode/CatchSelfTest/CatchSelfTestSingle.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 90C00904F36E6ADB57A7313E998815D255B0DEAF - ../../../../.. - - IDESourceControlProjectURL - https://github.com/philsquared/Catch.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 90C00904F36E6ADB57A7313E998815D255B0DEAF - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 90C00904F36E6ADB57A7313E998815D255B0DEAF - IDESourceControlWCCName - Catch-Develop - - - - diff --git a/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle/dummy.txt b/3rdparty/catch/projects/XCode/CatchSelfTest/CatchSelfTestSingle/dummy.txt deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.pbxproj b/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.pbxproj deleted file mode 100644 index 6777e8e72c9..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,265 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 4A63D2AC14E3C1A900F615CB /* OCTest.1 in CopyFiles */ = {isa = PBXBuildFile; fileRef = 4A63D2AB14E3C1A900F615CB /* OCTest.1 */; }; - 4A63D2B314E3C1E600F615CB /* Main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A63D2B214E3C1E600F615CB /* Main.mm */; }; - 4A63D2C014E4544700F615CB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A63D2BF14E4544700F615CB /* Foundation.framework */; }; - 4A63D2C614E454CC00F615CB /* CatchOCTestCase.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A63D2C214E454CC00F615CB /* CatchOCTestCase.mm */; }; - 4A63D2C714E454CC00F615CB /* OCTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A63D2C314E454CC00F615CB /* OCTest.mm */; }; - 4A63D2C814E454CC00F615CB /* TestObj.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A63D2C514E454CC00F615CB /* TestObj.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 4A63D2A314E3C1A900F615CB /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - 4A63D2AC14E3C1A900F615CB /* OCTest.1 in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 4A63D2A514E3C1A900F615CB /* OCTest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = OCTest; sourceTree = BUILT_PRODUCTS_DIR; }; - 4A63D2AB14E3C1A900F615CB /* OCTest.1 */ = {isa = PBXFileReference; lastKnownFileType = text.man; path = OCTest.1; sourceTree = ""; }; - 4A63D2B214E3C1E600F615CB /* Main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Main.mm; sourceTree = ""; }; - 4A63D2BF14E4544700F615CB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 4A63D2C114E454CC00F615CB /* CatchOCTestCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatchOCTestCase.h; sourceTree = ""; }; - 4A63D2C214E454CC00F615CB /* CatchOCTestCase.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CatchOCTestCase.mm; sourceTree = ""; }; - 4A63D2C314E454CC00F615CB /* OCTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OCTest.mm; sourceTree = ""; }; - 4A63D2C414E454CC00F615CB /* TestObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObj.h; sourceTree = ""; }; - 4A63D2C514E454CC00F615CB /* TestObj.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestObj.m; sourceTree = ""; }; - 4AA0D951154C0A7A004B4193 /* catch_objc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_objc.hpp; path = ../../../include/internal/catch_objc.hpp; sourceTree = ""; }; - 4ABEA80615C90E10009F0424 /* catch_objc_arc.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_objc_arc.hpp; path = ../../../include/internal/catch_objc_arc.hpp; sourceTree = ""; }; - 4ABEA80815C90E38009F0424 /* catch_tostring.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_tostring.hpp; path = ../../../include/internal/catch_tostring.hpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4A63D2A214E3C1A900F615CB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4A63D2C014E4544700F615CB /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4A63D29A14E3C1A900F615CB = { - isa = PBXGroup; - children = ( - 4AA0D94F154C0A63004B4193 /* Catch */, - 4A63D2BF14E4544700F615CB /* Foundation.framework */, - 4A63D2A814E3C1A900F615CB /* OCTest */, - 4A63D2A614E3C1A900F615CB /* Products */, - ); - sourceTree = ""; - }; - 4A63D2A614E3C1A900F615CB /* Products */ = { - isa = PBXGroup; - children = ( - 4A63D2A514E3C1A900F615CB /* OCTest */, - ); - name = Products; - sourceTree = ""; - }; - 4A63D2A814E3C1A900F615CB /* OCTest */ = { - isa = PBXGroup; - children = ( - 4A63D2C114E454CC00F615CB /* CatchOCTestCase.h */, - 4A63D2C214E454CC00F615CB /* CatchOCTestCase.mm */, - 4A63D2C314E454CC00F615CB /* OCTest.mm */, - 4A63D2C414E454CC00F615CB /* TestObj.h */, - 4A63D2C514E454CC00F615CB /* TestObj.m */, - 4A63D2B214E3C1E600F615CB /* Main.mm */, - 4A63D2AB14E3C1A900F615CB /* OCTest.1 */, - ); - path = OCTest; - sourceTree = ""; - }; - 4AA0D94F154C0A63004B4193 /* Catch */ = { - isa = PBXGroup; - children = ( - 4ABEA80815C90E38009F0424 /* catch_tostring.hpp */, - 4ABEA80615C90E10009F0424 /* catch_objc_arc.hpp */, - 4AA0D951154C0A7A004B4193 /* catch_objc.hpp */, - ); - name = Catch; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4A63D2A414E3C1A900F615CB /* OCTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4A63D2AF14E3C1A900F615CB /* Build configuration list for PBXNativeTarget "OCTest" */; - buildPhases = ( - 4A63D2A114E3C1A900F615CB /* Sources */, - 4A63D2A214E3C1A900F615CB /* Frameworks */, - 4A63D2A314E3C1A900F615CB /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OCTest; - productName = OCTest; - productReference = 4A63D2A514E3C1A900F615CB /* OCTest */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4A63D29C14E3C1A900F615CB /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - }; - buildConfigurationList = 4A63D29F14E3C1A900F615CB /* Build configuration list for PBXProject "OCTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 4A63D29A14E3C1A900F615CB; - productRefGroup = 4A63D2A614E3C1A900F615CB /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 4A63D2A414E3C1A900F615CB /* OCTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 4A63D2A114E3C1A900F615CB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4A63D2B314E3C1E600F615CB /* Main.mm in Sources */, - 4A63D2C614E454CC00F615CB /* CatchOCTestCase.mm in Sources */, - 4A63D2C714E454CC00F615CB /* OCTest.mm in Sources */, - 4A63D2C814E454CC00F615CB /* TestObj.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 4A63D2AD14E3C1A900F615CB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ../../../include; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 4A63D2AE14E3C1A900F615CB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ../../../include; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 4A63D2B014E3C1A900F615CB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - HEADER_SEARCH_PATHS = ../../../include; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 4A63D2B114E3C1A900F615CB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_ENABLE_OBJC_ARC = YES; - HEADER_SEARCH_PATHS = ../../../include; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4A63D29F14E3C1A900F615CB /* Build configuration list for PBXProject "OCTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A63D2AD14E3C1A900F615CB /* Debug */, - 4A63D2AE14E3C1A900F615CB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4A63D2AF14E3C1A900F615CB /* Build configuration list for PBXNativeTarget "OCTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A63D2B014E3C1A900F615CB /* Debug */, - 4A63D2B114E3C1A900F615CB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 4A63D29C14E3C1A900F615CB /* Project object */; -} diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 119e61c58c7..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/xcshareddata/OCTest.xccheckout b/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/xcshareddata/OCTest.xccheckout deleted file mode 100644 index 2480364e3e2..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/xcshareddata/OCTest.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 2F99C19E-ADF6-4D99-86C7-7A7830677E7D - IDESourceControlProjectName - OCTest - IDESourceControlProjectOriginsDictionary - - DE66138E-2FC7-4C1B-9901-82CBF6694223 - ssh://github.com/philsquared/Catch.git - - IDESourceControlProjectPath - projects/XCode4/OCTest/OCTest.xcodeproj/project.xcworkspace - IDESourceControlProjectRelativeInstallPathDictionary - - DE66138E-2FC7-4C1B-9901-82CBF6694223 - ../../../../.. - - IDESourceControlProjectURL - ssh://github.com/philsquared/Catch.git - IDESourceControlProjectVersion - 110 - IDESourceControlProjectWCCIdentifier - DE66138E-2FC7-4C1B-9901-82CBF6694223 - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - DE66138E-2FC7-4C1B-9901-82CBF6694223 - IDESourceControlWCCName - Catch - - - - diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.h b/3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.h deleted file mode 100644 index bd26239ae16..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// CatchOCTestCase.h -// OCTest -// -// Created by Phil on 13/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_CATCHOCTESTCASE_H_INCLUDED -#define TWOBLUECUBES_CATCHOCTESTCASE_H_INCLUDED - -#include "catch.hpp" - -#import -#import "TestObj.h" - -@interface TestFixture : NSObject -{ - TestObj* obj; -} - -@end - -#endif // TWOBLUECUBES_CATCHOCTESTCASE_H_INCLUDED diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.mm b/3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.mm deleted file mode 100644 index fb20287b8f0..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest/CatchOCTestCase.mm +++ /dev/null @@ -1,83 +0,0 @@ -// -// CatchOCTestCase.mm -// OCTest -// -// Created by Phil Nash on 13/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) - -#import "CatchOCTestCase.h" - - -@implementation TestFixture - - --(void) setUp -{ - obj = [[TestObj alloc] init]; -} - --(void) tearDown -{ - arcSafeRelease( obj ); -} - -OC_TEST_CASE( "OCTest/test1", "This is a test case" ) -{ - REQUIRE( obj.int_val == 0 ); - - obj.int_val = 1; - - REQUIRE( obj.int_val == 1 ); -} - -OC_TEST_CASE( "OCTest/test2", "This is another test case" ) -{ - REQUIRE( obj.int_val == 0 ); - - obj.int_val = 2; - - REQUIRE( obj.int_val == 2 ); -} - -OC_TEST_CASE( "OCTest/BOOL", "tests a boolean value" ) -{ - CHECK( [obj isTrue] == NO ); - CHECK( [obj isFalse] == YES ); -} - -OC_TEST_CASE( "OCTest/throws/objc", "throws an Objective-C exception" ) -{ - @throw [[NSException alloc] initWithName: NSGenericException - reason: @"Objective-C exception" - userInfo: nil]; -} -OC_TEST_CASE( "OCTest/throws/stdc++", "throws a std c++ exception" ) -{ - throw std::domain_error( "std C++ exception" ); -} - -/////////////////////////////////////////////////////////////////////////// -template -void useObject( const T& object ){} - -template -void useObject( const T* object ){} - -OC_TEST_CASE( "OCTest/matchers", "Matches work with OC types (NSString so far)" ) -{ - REQUIRE_THAT( @"This is a string", Equals( @"This isnt a string" ) ); - REQUIRE_THAT( @"This is a string", Contains( @"is a" ) ); - REQUIRE_THAT( @"This is a string", StartsWith( @"This" ) ); - REQUIRE_THAT( @"This is a string", EndsWith( @"string" ) ); -} - -OC_TEST_CASE( "OCTest/matchers/nil", "nil NSString should not crash the test" ) -{ - CHECK_THAT( (NSString*)nil, Equals( @"This should fail, but not crash" ) ); - CHECK_THAT( (NSString*)nil, StartsWith( @"anything" ) ); -} - -@end diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest/Main.mm b/3rdparty/catch/projects/XCode/OCTest/OCTest/Main.mm deleted file mode 100644 index 569dc4d9cab..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest/Main.mm +++ /dev/null @@ -1,2 +0,0 @@ -#define CATCH_CONFIG_MAIN -#import "catch.hpp" diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.1 b/3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.1 deleted file mode 100644 index 7915d02a059..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.1 +++ /dev/null @@ -1,79 +0,0 @@ -.\"Modified from man(1) of FreeBSD, the NetBSD mdoc.template, and mdoc.samples. -.\"See Also: -.\"man mdoc.samples for a complete listing of options -.\"man mdoc for the short list of editing options -.\"/usr/share/misc/mdoc.template -.Dd 09/02/2012 \" DATE -.Dt OCTest 1 \" Program name and manual section number -.Os Darwin -.Sh NAME \" Section Header - required - don't modify -.Nm OCTest, -.\" The following lines are read in generating the apropos(man -k) database. Use only key -.\" words here as the database is built based on the words here and in the .ND line. -.Nm Other_name_for_same_program(), -.Nm Yet another name for the same program. -.\" Use .Nm macro to designate other names for the documented program. -.Nd This line parsed for whatis database. -.Sh SYNOPSIS \" Section Header - required - don't modify -.Nm -.Op Fl abcd \" [-abcd] -.Op Fl a Ar path \" [-a path] -.Op Ar file \" [file] -.Op Ar \" [file ...] -.Ar arg0 \" Underlined argument - use .Ar anywhere to underline -arg2 ... \" Arguments -.Sh DESCRIPTION \" Section Header - required - don't modify -Use the .Nm macro to refer to your program throughout the man page like such: -.Nm -Underlining is accomplished with the .Ar macro like this: -.Ar underlined text . -.Pp \" Inserts a space -A list of items with descriptions: -.Bl -tag -width -indent \" Begins a tagged list -.It item a \" Each item preceded by .It macro -Description of item a -.It item b -Description of item b -.El \" Ends the list -.Pp -A list of flags and their descriptions: -.Bl -tag -width -indent \" Differs from above in tag removed -.It Fl a \"-a flag as a list item -Description of -a flag -.It Fl b -Description of -b flag -.El \" Ends the list -.Pp -.\" .Sh ENVIRONMENT \" May not be needed -.\" .Bl -tag -width "ENV_VAR_1" -indent \" ENV_VAR_1 is width of the string ENV_VAR_1 -.\" .It Ev ENV_VAR_1 -.\" Description of ENV_VAR_1 -.\" .It Ev ENV_VAR_2 -.\" Description of ENV_VAR_2 -.\" .El -.Sh FILES \" File used or created by the topic of the man page -.Bl -tag -width "/Users/joeuser/Library/really_long_file_name" -compact -.It Pa /usr/share/file_name -FILE_1 description -.It Pa /Users/joeuser/Library/really_long_file_name -FILE_2 description -.El \" Ends the list -.\" .Sh DIAGNOSTICS \" May not be needed -.\" .Bl -diag -.\" .It Diagnostic Tag -.\" Diagnostic informtion here. -.\" .It Diagnostic Tag -.\" Diagnostic informtion here. -.\" .El -.Sh SEE ALSO -.\" List links in ascending order by section, alphabetically within a section. -.\" Please do not reference files that do not exist without filing a bug report -.Xr a 1 , -.Xr b 1 , -.Xr c 1 , -.Xr a 2 , -.Xr b 2 , -.Xr a 3 , -.Xr b 3 -.\" .Sh BUGS \" Document known, unremedied bugs -.\" .Sh HISTORY \" Document history if command behaves in a unique manner \ No newline at end of file diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.mm b/3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.mm deleted file mode 100644 index bfb2ca26d00..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest/OCTest.mm +++ /dev/null @@ -1,28 +0,0 @@ -/* - * OCTest.mm - * OCTest - * - * Created by Phil on 13/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) - * - */ - -#import "catch.hpp" - -#import "TestObj.h" - -TEST_CASE( "OCTest/TestObj", "tests TestObj" ) -{ - TestObj* obj = [[TestObj alloc] init]; - - REQUIRE( obj.int_val == 0 ); - - obj.int_val = 1; - - REQUIRE( obj.int_val == 1 ); - - arcSafeRelease( obj ); -} diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.h b/3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.h deleted file mode 100644 index 8443921ffe4..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// TestObj.h -// OCTest -// -// Created by Phil on 13/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_TESTOBJ_H_INCLUDED -#define TWOBLUECUBES_TESTOBJ_H_INCLUDED - -#import - - -@interface TestObj : NSObject { - - int int_val; -} - --(BOOL) isTrue; --(BOOL) isFalse; - -@property (nonatomic, assign ) int int_val; - -@end - -#endif // TWOBLUECUBES_TESTOBJ_H_INCLUDED diff --git a/3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.m b/3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.m deleted file mode 100644 index 2c7dc99b8f7..00000000000 --- a/3rdparty/catch/projects/XCode/OCTest/OCTest/TestObj.m +++ /dev/null @@ -1,25 +0,0 @@ -// -// TestObj.m -// OCTest -// -// Created by Phil on 13/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) - -#import "TestObj.h" - - -@implementation TestObj - -@synthesize int_val; - --(BOOL) isTrue { - return YES; -} --(BOOL) isFalse { - return NO; -} - -@end diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.pbxproj b/3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.pbxproj deleted file mode 100644 index e968cf620fc..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,299 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 4A73280A14E66CFC0044823F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A73280914E66CFC0044823F /* UIKit.framework */; }; - 4A73280C14E66CFC0044823F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A73280B14E66CFC0044823F /* Foundation.framework */; }; - 4A73280E14E66CFC0044823F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4A73280D14E66CFC0044823F /* CoreGraphics.framework */; }; - 4A73281414E66CFC0044823F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4A73281214E66CFC0044823F /* InfoPlist.strings */; }; - 4A73282614E66D8B0044823F /* itChRunnerMain.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4A73282514E66D8B0044823F /* itChRunnerMain.mm */; }; - 4AB1C74F14FCC74900F31DF7 /* OCTest.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4AB1C74C14FCC74900F31DF7 /* OCTest.mm */; }; - 4AB1C75014FCC74900F31DF7 /* TestObj.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AB1C74E14FCC74900F31DF7 /* TestObj.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 4A73280514E66CFC0044823F /* iOSTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iOSTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 4A73280914E66CFC0044823F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 4A73280B14E66CFC0044823F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 4A73280D14E66CFC0044823F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 4A73281114E66CFC0044823F /* iOSTest-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iOSTest-Info.plist"; sourceTree = ""; }; - 4A73281314E66CFC0044823F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 4A73281714E66CFC0044823F /* iOSTest-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iOSTest-Prefix.pch"; sourceTree = ""; }; - 4A73282214E66D8B0044823F /* iTchRunnerAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerAppDelegate.h; sourceTree = ""; }; - 4A73282314E66D8B0044823F /* iTchRunnerMainView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerMainView.h; sourceTree = ""; }; - 4A73282414E66D8B0044823F /* iTchRunnerReporter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTchRunnerReporter.h; sourceTree = ""; }; - 4A73282514E66D8B0044823F /* itChRunnerMain.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = itChRunnerMain.mm; path = ../../../runners/iTchRunner/itChRunnerMain.mm; sourceTree = ""; }; - 4AB1C74C14FCC74900F31DF7 /* OCTest.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OCTest.mm; sourceTree = ""; }; - 4AB1C74D14FCC74900F31DF7 /* TestObj.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestObj.h; sourceTree = ""; }; - 4AB1C74E14FCC74900F31DF7 /* TestObj.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestObj.m; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4A73280214E66CFC0044823F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4A73280A14E66CFC0044823F /* UIKit.framework in Frameworks */, - 4A73280C14E66CFC0044823F /* Foundation.framework in Frameworks */, - 4A73280E14E66CFC0044823F /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4A7327FA14E66CFC0044823F = { - isa = PBXGroup; - children = ( - 4A73280F14E66CFC0044823F /* iOSTest */, - 4A73280814E66CFC0044823F /* Frameworks */, - 4A73280614E66CFC0044823F /* Products */, - ); - sourceTree = ""; - }; - 4A73280614E66CFC0044823F /* Products */ = { - isa = PBXGroup; - children = ( - 4A73280514E66CFC0044823F /* iOSTest.app */, - ); - name = Products; - sourceTree = ""; - }; - 4A73280814E66CFC0044823F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4A73280914E66CFC0044823F /* UIKit.framework */, - 4A73280B14E66CFC0044823F /* Foundation.framework */, - 4A73280D14E66CFC0044823F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4A73280F14E66CFC0044823F /* iOSTest */ = { - isa = PBXGroup; - children = ( - 4A73282014E66D6C0044823F /* iTch */, - 4A73281014E66CFC0044823F /* Supporting Files */, - ); - path = iOSTest; - sourceTree = ""; - }; - 4A73281014E66CFC0044823F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 4A73281114E66CFC0044823F /* iOSTest-Info.plist */, - 4A73281214E66CFC0044823F /* InfoPlist.strings */, - 4A73281714E66CFC0044823F /* iOSTest-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 4A73282014E66D6C0044823F /* iTch */ = { - isa = PBXGroup; - children = ( - 4AB1C74C14FCC74900F31DF7 /* OCTest.mm */, - 4AB1C74D14FCC74900F31DF7 /* TestObj.h */, - 4AB1C74E14FCC74900F31DF7 /* TestObj.m */, - 4A73282114E66D8B0044823F /* internal */, - 4A73282514E66D8B0044823F /* itChRunnerMain.mm */, - ); - name = iTch; - sourceTree = ""; - }; - 4A73282114E66D8B0044823F /* internal */ = { - isa = PBXGroup; - children = ( - 4A73282214E66D8B0044823F /* iTchRunnerAppDelegate.h */, - 4A73282314E66D8B0044823F /* iTchRunnerMainView.h */, - 4A73282414E66D8B0044823F /* iTchRunnerReporter.h */, - ); - name = internal; - path = ../../../runners/iTchRunner/internal; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4A73280414E66CFC0044823F /* iOSTest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4A73281D14E66CFC0044823F /* Build configuration list for PBXNativeTarget "iOSTest" */; - buildPhases = ( - 4A73280114E66CFC0044823F /* Sources */, - 4A73280214E66CFC0044823F /* Frameworks */, - 4A73280314E66CFC0044823F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = iOSTest; - productName = iOSTest; - productReference = 4A73280514E66CFC0044823F /* iOSTest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4A7327FC14E66CFC0044823F /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - }; - buildConfigurationList = 4A7327FF14E66CFC0044823F /* Build configuration list for PBXProject "iOSTest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 4A7327FA14E66CFC0044823F; - productRefGroup = 4A73280614E66CFC0044823F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 4A73280414E66CFC0044823F /* iOSTest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 4A73280314E66CFC0044823F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4A73281414E66CFC0044823F /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 4A73280114E66CFC0044823F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4A73282614E66D8B0044823F /* itChRunnerMain.mm in Sources */, - 4AB1C74F14FCC74900F31DF7 /* OCTest.mm in Sources */, - 4AB1C75014FCC74900F31DF7 /* TestObj.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 4A73281214E66CFC0044823F /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 4A73281314E66CFC0044823F /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 4A73281B14E66CFC0044823F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "iPhone Developer: Phil Nash (4KJCM5XSVL)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - PROVISIONING_PROFILE = "95C4758A-E0B8-4714-9DA3-C7E1284444A4"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ../../../include; - }; - name = Debug; - }; - 4A73281C14E66CFC0044823F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - CLANG_ENABLE_OBJC_ARC = YES; - CODE_SIGN_IDENTITY = "iPhone Developer: Phil Nash (4KJCM5XSVL)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PROVISIONING_PROFILE = "95C4758A-E0B8-4714-9DA3-C7E1284444A4"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ../../../include; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 4A73281E14E66CFC0044823F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "iOSTest/iOSTest-Prefix.pch"; - INFOPLIST_FILE = "iOSTest/iOSTest-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 4A73281F14E66CFC0044823F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "iOSTest/iOSTest-Prefix.pch"; - INFOPLIST_FILE = "iOSTest/iOSTest-Info.plist"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4A7327FF14E66CFC0044823F /* Build configuration list for PBXProject "iOSTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A73281B14E66CFC0044823F /* Debug */, - 4A73281C14E66CFC0044823F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4A73281D14E66CFC0044823F /* Build configuration list for PBXNativeTarget "iOSTest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4A73281E14E66CFC0044823F /* Debug */, - 4A73281F14E66CFC0044823F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 4A7327FC14E66CFC0044823F /* Project object */; -} diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index aaadc7d492c..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/OCTest.mm b/3rdparty/catch/projects/XCode/iOSTest/iOSTest/OCTest.mm deleted file mode 100644 index d476cb42bf0..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/OCTest.mm +++ /dev/null @@ -1,27 +0,0 @@ -/* - * OCTest.mm - * OCTest - * - * Created by Phil on 13/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) - * - */ -#include "catch.hpp" - -#import "TestObj.h" - -TEST_CASE( "OCTest/TestObj", "tests TestObj" ) -{ - TestObj* obj = [[TestObj alloc] init]; - - REQUIRE( obj.int_val == 0 ); - - obj.int_val = 1; - - REQUIRE( obj.int_val == 1 ); - - arcSafeRelease( obj ); -} diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.h b/3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.h deleted file mode 100644 index de6725027a2..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.h +++ /dev/null @@ -1,25 +0,0 @@ -// -// TestObj.h -// OCTest -// -// Created by Phil on 13/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_TESTOBJ_H_INCLUDED -#define TWOBLUECUBES_TESTOBJ_H_INCLUDED - -#import - - -@interface TestObj : NSObject { - - int int_val; -} - -@property (nonatomic, assign ) int int_val; - -@end - -#endif // TWOBLUECUBES_TESTOBJ_H_INCLUDED diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.m b/3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.m deleted file mode 100644 index 943f4450837..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/TestObj.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// TestObj.m -// OCTest -// -// Created by Phil on 13/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) - -#import "TestObj.h" - - -@implementation TestObj - -@synthesize int_val; - -@end diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/en.lproj/InfoPlist.strings b/3rdparty/catch/projects/XCode/iOSTest/iOSTest/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff8f8..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Info.plist b/3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Info.plist deleted file mode 100644 index f74b6db0993..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFiles - - CFBundleIdentifier - twobluecubes.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Prefix.pch b/3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Prefix.pch deleted file mode 100644 index 403e8e45e5e..00000000000 --- a/3rdparty/catch/projects/XCode/iOSTest/iOSTest/iOSTest-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'iOSTest' target in the 'iOSTest' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iOS SDK 3.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerAppDelegate.h b/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerAppDelegate.h deleted file mode 100644 index 522291a905a..00000000000 --- a/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerAppDelegate.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * iTchRunnerAppDelegate.h - * iTchRunner - * - * Created by Phil on 07/02/2011. - * Copyright 2011 Two Blue Cubes Ltd. All rights reserved. - * - */ -#ifndef TWOBLUECUBES_ITCHRUNNERAPPDELEGATE_H_INCLUDED -#define TWOBLUECUBES_ITCHRUNNERAPPDELEGATE_H_INCLUDED - -#import "iTchRunnerMainView.h" - - - -@interface iTchRunnerAppDelegate : NSObject -{ - UIWindow *window; -} - -@end - - -@implementation iTchRunnerAppDelegate - - -/////////////////////////////////////////////////////////////////////////////// -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - [window setUserInteractionEnabled:YES]; - [window setMultipleTouchEnabled:YES]; - - CGRect screenRect = [[UIScreen mainScreen] applicationFrame]; - iTchRunnerMainView* view = [[iTchRunnerMainView alloc] initWithFrame:screenRect]; - - [window addSubview:view]; - [window makeKeyAndVisible]; - arcSafeRelease( view ); - - return YES; -} - -/////////////////////////////////////////////////////////////////////////////// -- (void)dealloc -{ -#if !CATCH_ARC_ENABLED - [window release]; - [super dealloc]; -#endif -} - - -/////////////////////////////////////////////////////////////////////////////// -- (void)applicationWillResignActive:(UIApplication *)application -{ - /* - Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - */ -} - - -/////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - /* - Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - If your application supports background execution, called instead of applicationWillTerminate: when the user quits. - */ -} - - -/////////////////////////////////////////////////////////////////////////////// -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - /* - Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. - */ -} - - -/////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - /* - Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - */ -} - - -/////////////////////////////////////////////////////////////////////////////// -- (void)applicationWillTerminate:(UIApplication *)application -{ - /* - Called when the application is about to terminate. - See also applicationDidEnterBackground:. - */ -} - - -/////////////////////////////////////////////////////////////////////////////// -- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application -{ - /* - Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. - */ -} - - - -@end - -#endif // TWOBLUECUBES_ITCHRUNNERAPPDELEGATE_H_INCLUDED diff --git a/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerMainView.h b/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerMainView.h deleted file mode 100644 index c6a6394ea57..00000000000 --- a/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerMainView.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * iTchRunnerMainView.h - * iTchRunner - * - * Created by Phil on 07/02/2011. - * Copyright 2011 Two Blue Cubes Ltd. All rights reserved. - * - */ -#ifndef TWOBLUECUBES_ITCHRUNNERMAINVIEW_H_INCLUDED -#define TWOBLUECUBES_ITCHRUNNERMAINVIEW_H_INCLUDED - -#include "internal/catch_config.hpp" -#include "internal/catch_runner_impl.hpp" -#include "internal/catch_context_impl.hpp" -#include "catch.hpp" - -#include "iTchRunnerReporter.h" - -#import - -@interface iTchRunnerMainView : UIView -{ - UITextField* appName; -} - --(void) showAlert; - -@end - -@implementation iTchRunnerMainView - - -/////////////////////////////////////////////////////////////////////////////// --(id) initWithFrame:(CGRect)frame -{ - if ((self = [super initWithFrame:frame])) - { - // Initialization code - self.backgroundColor = [UIColor blackColor]; - - appName = [[UITextField alloc] initWithFrame: CGRectMake( 0, 50, 320, 50 )]; - [self addSubview: appName]; - arcSafeRelease( appName ); - appName.textColor = [[UIColor alloc] initWithRed:0.35 green:0.35 blue:1 alpha:1]; - arcSafeRelease( appName.textColor ); - appName.textAlignment = NSTextAlignmentCenter; - - appName.text = [NSString stringWithFormat:@"CATCH tests"]; -// [self performSelector: @selector(showAlert) withObject:nil afterDelay:0.1]; - [self performSelectorOnMainThread:@selector(showAlert) withObject:nil waitUntilDone:NO]; - - } - return self; -} - -/////////////////////////////////////////////////////////////////////////////// --(void) dealloc -{ - [appName removeFromSuperview]; -#if !CATCH_ARC_ENABLED - [super dealloc]; -#endif -} - -/////////////////////////////////////////////////////////////////////////////// --(void) showAlert -{ - UIActionSheet* menu = [[UIActionSheet alloc] initWithTitle:@"Options" - delegate:self - cancelButtonTitle:nil - destructiveButtonTitle:nil - otherButtonTitles:@"Run all tests", nil]; - [menu showInView: self]; - arcSafeRelease( menu ); - -} - -// This is a copy & paste from Catch::Runner2 to get us bootstrapped (this is due to all be -// replaced anyway) -inline Catch::Totals runTestsForGroup( Catch::RunContext& context, const Catch::TestCaseFilters& filterGroup ) { - using namespace Catch; - Totals totals; - std::vector::const_iterator it = getRegistryHub().getTestCaseRegistry().getAllTests().begin(); - std::vector::const_iterator itEnd = getRegistryHub().getTestCaseRegistry().getAllTests().end(); - int testsRunForGroup = 0; - for(; it != itEnd; ++it ) { - if( filterGroup.shouldInclude( *it ) ) { - testsRunForGroup++; - - if( context.aborting() ) - break; - - totals += context.runTest( *it ); - } - } - if( testsRunForGroup == 0 ) - std::cerr << "\n[No test cases matched with: " << filterGroup.getName() << "]" << std::endl; - return totals; - -} - -/////////////////////////////////////////////////////////////////////////////// --(void) actionSheet: (UIActionSheet*) sheet clickedButtonAtIndex: (NSInteger) index -{ - Catch::Ptr config = new Catch::Config(); - Catch::IReporter* reporter = new Catch::iTchRunnerReporter( self ); - Catch::LegacyReporterAdapter* reporterAdapter = new Catch::LegacyReporterAdapter( reporter ); - Catch::RunContext runner( config.get(), reporterAdapter ); - - - std::vector filterGroups; - Catch::TestCaseFilters filterGroup( "" ); - filterGroups.push_back( filterGroup ); - - Catch::Totals totals; - - std::vector::const_iterator it = filterGroups.begin(); - std::vector::const_iterator itEnd = filterGroups.end(); - - std::size_t groupCount = filterGroups.size(); - std::size_t groupIndex = 0; - for(; it != itEnd && !runner.aborting(); ++it, ++index ) { - runner.testGroupStarting( it->getName(), groupIndex, groupCount ); - totals += runTestsForGroup( runner, *it ); - runner.testGroupEnded( it->getName(), totals, groupIndex, groupCount ); - } - - - if( totals.assertions.failed == 0 ) - { - NSLog( @"no failures" ); - if( totals.assertions.passed > 0 ) - appName.textColor = [[UIColor alloc] initWithRed:0.35 green:1 blue:0.35 alpha:1]; - } - else - { - NSLog( @"%lu failures", totals.assertions.failed ); - appName.textColor = [[UIColor alloc] initWithRed:1 green:0.35 blue:0.35 alpha:1]; - } -} - -/////////////////////////////////////////////////////////////////////////////// --(void) testWasRun: (const Catch::AssertionResult*) pResultInfo -{ - const Catch::AssertionResult& resultInfo = *pResultInfo; - std::ostringstream oss; - - if( resultInfo.hasExpression() ) - { - oss << resultInfo.getExpression(); - if( resultInfo.isOk() ) - oss << " succeeded"; - else - oss << " failed"; - } - switch( resultInfo.getResultType() ) - { - case Catch::ResultWas::ThrewException: - if( resultInfo.hasExpression() ) - oss << " with unexpected"; - else - oss << "Unexpected"; - oss << " exception with message: '" << resultInfo.getMessage() << "'"; - break; - case Catch::ResultWas::Info: - oss << "info: '" << resultInfo.getMessage() << "'"; - break; - case Catch::ResultWas::Warning: - oss << "warning: '" << resultInfo.getMessage() << "'"; - break; - case Catch::ResultWas::ExplicitFailure: - oss << "failed with message: '" << resultInfo.getMessage() << "'"; - break; - default: - break; - } - - if( resultInfo.hasExpression() ) - { - oss << " for: " << resultInfo.getExpandedExpression(); - } - oss << std::endl; - NSLog( @"%s", oss.str().c_str() ); -} - - -@end - -#endif // TWOBLUECUBES_ITCHRUNNERMAINVIEW_H_INCLUDED diff --git a/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerReporter.h b/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerReporter.h deleted file mode 100644 index d2628861562..00000000000 --- a/3rdparty/catch/projects/runners/iTchRunner/internal/iTchRunnerReporter.h +++ /dev/null @@ -1,115 +0,0 @@ -/* - * iTchRunnerReporter.h - * iTchRunner - * - * Created by Phil on 07/02/2011. - * Copyright 2011 Two Blue Cubes Ltd. All rights reserved. - * - */ -#ifndef TWOBLUECUBES_ITCHRUNNERREPORTER_H_INCLUDED -#define TWOBLUECUBES_ITCHRUNNERREPORTER_H_INCLUDED - -#include "catch.hpp" - -@protocol iTchRunnerDelegate - --(void) testWasRun: (const Catch::AssertionResult*) result; - -@end - -namespace Catch -{ - class iTchRunnerReporter : public SharedImpl - { - public: - /////////////////////////////////////////////////////////////////////////// - iTchRunnerReporter - ( - id delegate - ) - : m_delegate( delegate ) - { - } - - /////////////////////////////////////////////////////////////////////////// - virtual bool shouldRedirectStdout - () - const - { - return true; - } - - /////////////////////////////////////////////////////////////////////////// - static std::string getDescription - () - { - return "Captures results for iOS runner"; - } - - /////////////////////////////////////////////////////////////////////////// - size_t getSucceeded - () - const - { - return m_totals.assertions.passed; - } - - /////////////////////////////////////////////////////////////////////////// - size_t getFailed - () - const - { - return m_totals.assertions.failed; - } - - /////////////////////////////////////////////////////////////////////////// - void reset() - { - m_totals = Totals(); - } - - private: // IReporter - - /////////////////////////////////////////////////////////////////////////// - virtual void StartTesting - () - {} - - /////////////////////////////////////////////////////////////////////////// - virtual void EndTesting - ( - const Totals& totals - ) - { - m_totals = totals; - } - - /////////////////////////////////////////////////////////////////////////// - virtual void Result - ( - const AssertionResult& result - ) - { - [m_delegate testWasRun: &result]; - } - - /////////////////////////////////////////////////////////////////////////// - // Deliberately unimplemented: - virtual void StartGroup( const std::string& ){} - virtual void EndGroup( const std::string&, const Totals& ){} - virtual void StartTestCase( const TestCaseInfo& ){} - virtual void StartSection( const std::string& sectionName, const std::string& description ) {} - virtual void EndSection( const std::string&, const Counts& ){} - virtual void EndTestCase( const TestCaseInfo&, const Totals&, const std::string&, const std::string& ){} - virtual void Aborted() {} - virtual void NoAssertionsInSection( std::string const& sectionName ) {} - virtual void NoAssertionsInTestCase( std::string const& testName ) {} - - private: - Totals m_totals; - - id m_delegate; - }; -} - -#endif // TWOBLUECUBES_ITCHRUNNERREPORTER_H_INCLUDED diff --git a/3rdparty/catch/projects/runners/iTchRunner/itChRunnerMain.mm b/3rdparty/catch/projects/runners/iTchRunner/itChRunnerMain.mm deleted file mode 100644 index cac5faecca4..00000000000 --- a/3rdparty/catch/projects/runners/iTchRunner/itChRunnerMain.mm +++ /dev/null @@ -1,27 +0,0 @@ -// -// iTchRunnerMain.mm -// iTchRunner -// -// Created by Phil on 04/02/2011. -// Copyright Two Blue Cubes Ltd 2011. All rights reserved. -// - -#define CATCH_CONFIG_RUNNER -#include "catch.hpp" -#import "internal/iTchRunnerAppDelegate.h" - -int main(int argc, char *argv[]) -{ -#if !CATCH_ARC_ENABLED - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; -#endif - - Catch::registerTestMethods(); - int retVal = UIApplicationMain(argc, argv, nil, @"iTchRunnerAppDelegate"); - -#if !CATCH_ARC_ENABLED - [pool release]; -#endif - - return retVal; -} diff --git a/3rdparty/catch/projects/runners/iTchRunner/readme b/3rdparty/catch/projects/runners/iTchRunner/readme deleted file mode 100644 index 2b2549176ce..00000000000 --- a/3rdparty/catch/projects/runners/iTchRunner/readme +++ /dev/null @@ -1,6 +0,0 @@ -* Select Project -> New Target. Select Cocoa Touch -> Application. Click next and name it something like "Unit Tests" -* While the target info is displayed, find: 'User Header Search Paths' and add a path to the Catch folder -* Open the plist file for the target (Unit Test-Info.plist, if you used that name). Delete the entry for "Main nib file base name: MainWindow" -* From the overview drop-down select the new target. -* Add the file Catch/Runner/iTchRunnerMain.mm into your project - but only in the new target -* Write tests (adding files under test into the target as necessary) \ No newline at end of file diff --git a/3rdparty/catch/scripts/approvalTests.py b/3rdparty/catch/scripts/approvalTests.py index 618812f888d..6c51aa4eff2 100644 --- a/3rdparty/catch/scripts/approvalTests.py +++ b/3rdparty/catch/scripts/approvalTests.py @@ -1,115 +1,152 @@ -from __future__ import print_function +#!/usr/bin/env python + +from __future__ import print_function import os import sys import subprocess import re +import difflib +import scriptCommon from scriptCommon import catchPath -rootPath = os.path.join( catchPath, 'projects/SelfTest/Baselines' ) +rootPath = os.path.join(catchPath, 'projects/SelfTest/Baselines') -filenameParser = re.compile( r'(.*)/(.*\..pp:)(.*)' ) -filelineParser = re.compile( r'(.*\..pp:)([0-9]*)(.*)' ) -pathParser = re.compile( r'(.*?)/(.*\..pp)(.*)' ) -lineNumberParser = re.compile( r'(.*)line="[0-9]*"(.*)' ) -hexParser = re.compile( r'(.*)\b(0[xX][0-9a-fA-F]+)\b(.*)' ) -durationsParser = re.compile( r'(.*)time="[0-9]*\.[0-9]*"(.*)' ) -versionParser = re.compile( r'(.*?)Catch v[0-9]*\.[0-9]*\.[0-9]*(.*)' ) -devVersionParser = re.compile( r'(.*?)Catch v[0-9]*\.[0-9]*\.[0-9]*-develop\.[0-9]*(.*)' ) + +filelocParser = re.compile(r''' + .*/ + (.+\.[ch]pp) # filename + (?::|\() # : is starting separator between filename and line number on Linux, ( on Windows + ([0-9]*) # line number + \)? # Windows also has an ending separator, ) +''', re.VERBOSE) +lineNumberParser = re.compile(r' line="[0-9]*"') +hexParser = re.compile(r'\b(0[xX][0-9a-fA-F]+)\b') +durationsParser = re.compile(r' time="[0-9]*\.[0-9]*"') +timestampsParser = re.compile(r' timestamp="\d{4}-\d{2}-\d{2}T\d{2}\:\d{2}\:\d{2}Z"') +versionParser = re.compile(r'Catch v[0-9]+\.[0-9]+\.[0-9]+(-develop\.[0-9]+)?') +nullParser = re.compile(r'\b(__null|nullptr)\b') +exeNameParser = re.compile(r''' + \b + (CatchSelfTest|SelfTest) # Expected executable name + (?:.exe)? # Executable name contains .exe on Windows. + \b +''', re.VERBOSE) +# This is a hack until something more reasonable is figured out +specialCaseParser = re.compile(r'file\((\d+)\)') if len(sys.argv) == 2: - cmdPath = sys.argv[1] + cmdPath = sys.argv[1] else: - cmdPath = os.path.join( catchPath, 'projects/XCode/CatchSelfTest/DerivedData/CatchSelfTest/Build/Products/Debug/CatchSelfTest' ) + cmdPath = os.path.join(catchPath, scriptCommon.getBuildExecutable()) overallResult = 0 -def filterLine( line ): - m = filenameParser.match( line ) - if m: - line = m.group(2) + m.group(3) - m2 = filelineParser.match( line ) - if m2: - line = m2.group(1) + "" + m2.group(3) - else: - m2 = lineNumberParser.match( line ) - if m2: - line = m2.group(1) + m2.group(2) - m = pathParser.match( line ) - if m: - path = "/" + m.group(2) - if path.startswith( catchPath ): - path = path[1+len(catchPath):] - line = m.group(1) + path + m.group(3) - m = devVersionParser.match( line ) - if m: - line = m.group(1) + "" + m.group(2) - else: - m = versionParser.match( line ) - if m: - line = m.group(1) + "" + m.group(2) +def diffFiles(fileA, fileB): + with open(fileA, 'r') as file: + aLines = file.readlines() + with open(fileB, 'r') as file: + bLines = file.readlines() - while True: - m = hexParser.match( line ) - if m: - line = m.group(1) + "0x" + m.group(3) - else: - break - m = durationsParser.match( line ) - if m: - line = m.group(1) + 'time="{duration}"' + m.group(2) - return line + shortenedFilenameA = fileA.rsplit(os.sep, 1)[-1] + shortenedFilenameB = fileB.rsplit(os.sep, 1)[-1] -def approve( baseName, args ): - global overallResult - args[0:0] = [cmdPath] - if not os.path.exists( cmdPath ): - raise Exception( "Executable doesn't exist at " + cmdPath ) - baselinesPath = os.path.join( rootPath, '{0}.approved.txt'.format( baseName ) ) - rawResultsPath = os.path.join( rootPath, '_{0}.tmp'.format( baseName ) ) - filteredResultsPath = os.path.join( rootPath, '{0}.unapproved.txt'.format( baseName ) ) + diff = difflib.unified_diff(aLines, bLines, fromfile=shortenedFilenameA, tofile=shortenedFilenameB, n=0) + return [line for line in diff if line[0] in ('+', '-')] - f = open( rawResultsPath, 'w' ) - subprocess.call( args, stdout=f, stderr=f ) - f.close() - rawFile = open( rawResultsPath, 'r' ) - filteredFile = open( filteredResultsPath, 'w' ) - for line in rawFile: - filteredFile.write( filterLine( line ).rstrip() + "\n" ) - filteredFile.close() - rawFile.close() +def filterLine(line): + if catchPath in line: + # make paths relative to Catch root + line = line.replace(catchPath + os.sep, '') + # go from \ in windows paths to / + line = line.replace('\\', '/') - os.remove( rawResultsPath ) - print() - print( baseName + ":" ) - if os.path.exists( baselinesPath ): - diffResult = subprocess.call([ "diff", baselinesPath, filteredResultsPath ] ) - if diffResult == 0: - os.remove( filteredResultsPath ) - print( " \033[92mResults matched" ) - else: - print( " \n****************************\n \033[91mResults differed" ) - if diffResult > overallResult: - overallResult = diffResult - print( "\033[0m" ) - else: - print( " first approval" ) - if overallResult == 0: - overallResult = 1 + + # strip source line numbers + m = filelocParser.match(line) + if m: + # note that this also strips directories, leaving only the filename + filename, lnum = m.groups() + lnum = ":" if lnum else "" + line = filename + lnum + line[m.end():] + else: + line = lineNumberParser.sub(" ", line) + + # strip Catch version number + line = versionParser.sub("", line) + + # replace *null* with 0 + line = nullParser.sub("0", line) + + # strip executable name + line = exeNameParser.sub("", line) + + # strip hexadecimal numbers (presumably pointer values) + line = hexParser.sub("0x", line) + + # strip durations and timestamps + line = durationsParser.sub(' time="{duration}"', line) + line = timestampsParser.sub(' timestamp="{iso8601-timestamp}"', line) + line = specialCaseParser.sub('file:\g<1>', line) + return line + + +def approve(baseName, args): + global overallResult + args[0:0] = [cmdPath] + if not os.path.exists(cmdPath): + raise Exception("Executable doesn't exist at " + cmdPath) + baselinesPath = os.path.join(rootPath, '{0}.approved.txt'.format(baseName)) + rawResultsPath = os.path.join(rootPath, '_{0}.tmp'.format(baseName)) + filteredResultsPath = os.path.join(rootPath, '{0}.unapproved.txt'.format(baseName)) + + f = open(rawResultsPath, 'w') + subprocess.call(args, stdout=f, stderr=f) + f.close() + + rawFile = open(rawResultsPath, 'r') + filteredFile = open(filteredResultsPath, 'w') + for line in rawFile: + filteredFile.write(filterLine(line).rstrip() + "\n") + filteredFile.close() + rawFile.close() + + os.remove(rawResultsPath) + print() + print(baseName + ":") + if os.path.exists(baselinesPath): + diffResult = diffFiles(baselinesPath, filteredResultsPath) + if diffResult: + print(''.join(diffResult)) + print(" \n****************************\n \033[91mResults differed") + if len(diffResult) > overallResult: + overallResult = len(diffResult) + else: + os.remove(filteredResultsPath) + print(" \033[92mResults matched") + print("\033[0m") + else: + print(" first approval") + if overallResult == 0: + overallResult = 1 + + +print("Running approvals against executable:") +print(" " + cmdPath) # Standard console reporter -approve( "console.std", ["~_"] ) +approve("console.std", ["~[c++11]~[!nonportable]", "--order", "lex"]) # console reporter, include passes, warn about No Assertions -approve( "console.sw", ["~_", "-s", "-w", "NoAssertions"] ) +approve("console.sw", ["~[c++11]~[!nonportable]", "-s", "-w", "NoAssertions", "--order", "lex"]) # console reporter, include passes, warn about No Assertions, limit failures to first 4 -approve( "console.swa4", ["~_", "-s", "-w", "NoAssertions", "-x", "4"] ) +approve("console.swa4", ["~[c++11]~[!nonportable]", "-s", "-w", "NoAssertions", "-x", "4", "--order", "lex"]) # junit reporter, include passes, warn about No Assertions -approve( "junit.sw", ["~_", "-s", "-w", "NoAssertions", "-r", "junit"] ) +approve("junit.sw", ["~[c++11]~[!nonportable]", "-s", "-w", "NoAssertions", "-r", "junit", "--order", "lex"]) # xml reporter, include passes, warn about No Assertions -approve( "xml.sw", ["~_", "-s", "-w", "NoAssertions", "-r", "xml"] ) +approve("xml.sw", ["~[c++11]~[!nonportable]", "-s", "-w", "NoAssertions", "-r", "xml", "--order", "lex"]) if overallResult != 0: - print( "run approve.py to approve new baselines" ) -exit( overallResult) + print("If these differenecs are expected run approve.py to approve new baselines") +exit(overallResult) diff --git a/3rdparty/catch/scripts/approve.py b/3rdparty/catch/scripts/approve.py index f4b66aa4a90..78a2a9e1cb8 100644 --- a/3rdparty/catch/scripts/approve.py +++ b/3rdparty/catch/scripts/approve.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function import os diff --git a/3rdparty/catch/scripts/benchmarkRunner.py b/3rdparty/catch/scripts/benchmarkRunner.py new file mode 100644 index 00000000000..dc753cf0050 --- /dev/null +++ b/3rdparty/catch/scripts/benchmarkRunner.py @@ -0,0 +1,56 @@ +#!/usr/bin/env python3 + +import subprocess, os, sys +import xml.etree.ElementTree as ET +from collections import defaultdict +from statistics import median, stdev +from datetime import datetime + +def get_commit_hash(): + res = subprocess.run('git rev-parse HEAD'.split(), check=True, stdout=subprocess.PIPE, universal_newlines=True) + return res.stdout.strip() + +if len(sys.argv) < 2: + print('Usage: {} benchmark-binary'.format(sys.argv[0])) + exit(1) + + +num_runs = 10 +data = defaultdict(list) + + +def parse_file(file): + + def recursive_search(node): + if node.tag == 'TestCase': + results = node.find('OverallResult') + time = results.get('durationInSeconds') + data[node.get('name')].append(float(time)) + elif node.tag in ('Group', 'Catch'): + for child in node: + recursive_search(child) + + tree = ET.parse(file) + recursive_search(tree.getroot()) + +def run_benchmarks(binary): + call = [binary] + '-d yes -r xml -o'.split() + for i in range(num_runs): + file = 'temp{}.xml'.format(i) + print('Run number {}'.format(i)) + subprocess.run(call + [file]) + parse_file(file) + # Remove file right after parsing, because benchmark output can be big + os.remove(file) + + +# Run benchmarks +run_benchmarks(sys.argv[1]) + +result_file = '{:%Y-%m-%dT%H-%M-%S}-{}.result'.format(datetime.now(), get_commit_hash()) + + +print('Writing results to {}'.format(result_file)) +with open(result_file, 'w') as file: + for k in sorted(data): + file.write('{}: median: {} (s), stddev: {} (s)\n'.format(k, median(data[k]), stdev(data[k]))) diff --git a/3rdparty/catch/scripts/developBuild.py b/3rdparty/catch/scripts/developBuild.py index c244871ab79..c16c8a6ddf8 100644 --- a/3rdparty/catch/scripts/developBuild.py +++ b/3rdparty/catch/scripts/developBuild.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function from releaseCommon import Version diff --git a/3rdparty/catch/scripts/fixTrailingWhitespace.py b/3rdparty/catch/scripts/fixWhitespace.py similarity index 94% rename from 3rdparty/catch/scripts/fixTrailingWhitespace.py rename to 3rdparty/catch/scripts/fixWhitespace.py index a1b6bbe871b..6f37c5399f8 100644 --- a/3rdparty/catch/scripts/fixTrailingWhitespace.py +++ b/3rdparty/catch/scripts/fixWhitespace.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function import os from scriptCommon import catchPath @@ -22,6 +24,7 @@ def fixFile( path ): changed = 0 for line in f: trimmed = line.rstrip() + "\n" + trimmed = trimmed.replace('\t', ' ') if trimmed != line: changed = changed +1 lines.append( trimmed ) diff --git a/3rdparty/catch/scripts/generateSingleHeader.py b/3rdparty/catch/scripts/generateSingleHeader.py index 419633f8328..78ed075390f 100644 --- a/3rdparty/catch/scripts/generateSingleHeader.py +++ b/3rdparty/catch/scripts/generateSingleHeader.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function import os diff --git a/3rdparty/catch/scripts/majorRelease.py b/3rdparty/catch/scripts/majorRelease.py index 03b7e78ec66..f367506a9d5 100644 --- a/3rdparty/catch/scripts/majorRelease.py +++ b/3rdparty/catch/scripts/majorRelease.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function from releaseCommon import Version diff --git a/3rdparty/catch/scripts/minorRelease.py b/3rdparty/catch/scripts/minorRelease.py index bbd97ed042e..ac36df96492 100644 --- a/3rdparty/catch/scripts/minorRelease.py +++ b/3rdparty/catch/scripts/minorRelease.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function from releaseCommon import Version diff --git a/3rdparty/catch/scripts/patchRelease.py b/3rdparty/catch/scripts/patchRelease.py index 6abf87af152..878662f8eaa 100644 --- a/3rdparty/catch/scripts/patchRelease.py +++ b/3rdparty/catch/scripts/patchRelease.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + from __future__ import print_function from releaseCommon import Version diff --git a/3rdparty/catch/scripts/releaseCommon.py b/3rdparty/catch/scripts/releaseCommon.py index 14eb235e5bf..236bfbd04dc 100644 --- a/3rdparty/catch/scripts/releaseCommon.py +++ b/3rdparty/catch/scripts/releaseCommon.py @@ -75,6 +75,8 @@ class Version: f.write( line + "\n" ) def updateReadmeFile(self): + versionParser = re.compile( r'\*v\d+\.\d+\.\d+\*' ) + downloadParser = re.compile( r'' ) f = open( readmePath, 'r' ) lines = [] for line in f: @@ -82,8 +84,7 @@ class Version: f.close() f = open( readmePath, 'w' ) for line in lines: - if line.startswith( "*v" ): - f.write( '*v{0}*\n'.format( self.getVersionString() ) ) - else: - f.write( line + "\n" ) + line = versionParser.sub( '*v{0}*'.format(self.getVersionString()), line) + line = downloadParser.sub( r''.format(self.getVersionString()) , line) + f.write( line + "\n" ) diff --git a/3rdparty/catch/scripts/releaseNotes.py b/3rdparty/catch/scripts/releaseNotes.py index e083ec94534..324ae932a2f 100644 --- a/3rdparty/catch/scripts/releaseNotes.py +++ b/3rdparty/catch/scripts/releaseNotes.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python + import os import re import urllib2 diff --git a/3rdparty/catch/scripts/scriptCommon.py b/3rdparty/catch/scripts/scriptCommon.py index 6ac381adcb6..9adadb6ddcf 100644 --- a/3rdparty/catch/scripts/scriptCommon.py +++ b/3rdparty/catch/scripts/scriptCommon.py @@ -2,8 +2,13 @@ import os import sys import subprocess + catchPath = os.path.dirname(os.path.realpath( os.path.dirname(sys.argv[0]))) +def getBuildExecutable(): + dir = os.environ.get('CATCH_DEV_OUT_DIR', "cmake-build-debug/SelfTest") + return dir + def runAndCapture( args ): child = subprocess.Popen(" ".join( args ), shell=True, stdout=subprocess.PIPE) lines = [] @@ -18,4 +23,4 @@ def runAndCapture( args ): line = "" else: line = line + out - return lines \ No newline at end of file + return lines diff --git a/3rdparty/catch/single_include/catch.hpp b/3rdparty/catch/single_include/catch.hpp index 2e6fe8d39cc..99c93f17f7c 100644 --- a/3rdparty/catch/single_include/catch.hpp +++ b/3rdparty/catch/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * Catch v1.5.8 - * Generated: 2016-10-26 12:07:30.938259 + * Catch v1.7.0 + * Generated: 2017-02-01 21:32:13.239291 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -60,21 +60,6 @@ // #included from: catch_common.h #define TWOBLUECUBES_CATCH_COMMON_H_INCLUDED -#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line -#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) -#ifdef CATCH_CONFIG_COUNTER -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) -#else -# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) -#endif - -#define INTERNAL_CATCH_STRINGIFY2( expr ) #expr -#define INTERNAL_CATCH_STRINGIFY( expr ) INTERNAL_CATCH_STRINGIFY2( expr ) - -#include -#include -#include - // #included from: catch_compiler_capabilities.h #define TWOBLUECUBES_CATCH_COMPILER_CAPABILITIES_HPP_INCLUDED @@ -89,6 +74,8 @@ // CATCH_CONFIG_CPP11_LONG_LONG : is long long supported? // CATCH_CONFIG_CPP11_OVERRIDE : is override supported? // CATCH_CONFIG_CPP11_UNIQUE_PTR : is unique_ptr supported (otherwise use auto_ptr) +// CATCH_CONFIG_CPP11_SHUFFLE : is std::shuffle supported? +// CATCH_CONFIG_CPP11_TYPE_TRAITS : are type_traits and enable_if supported? // CATCH_CONFIG_CPP11_OR_GREATER : Is C++11 supported? @@ -181,6 +168,8 @@ #if (_MSC_VER >= 1900 ) // (VC++ 13 (VS2015)) #define CATCH_INTERNAL_CONFIG_CPP11_NOEXCEPT #define CATCH_INTERNAL_CONFIG_CPP11_GENERATED_METHODS +#define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE +#define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS #endif #endif // _MSC_VER @@ -246,6 +235,12 @@ # if !defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) # define CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR # endif +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) +# define CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE +# endif +# if !defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) +# define CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS +# endif #endif // __cplusplus >= 201103L @@ -268,18 +263,27 @@ #if defined(CATCH_INTERNAL_CONFIG_VARIADIC_MACROS) && !defined(CATCH_CONFIG_NO_VARIADIC_MACROS) && !defined(CATCH_CONFIG_VARIADIC_MACROS) # define CATCH_CONFIG_VARIADIC_MACROS #endif -#if defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_CPP11) +#if defined(CATCH_INTERNAL_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_NO_LONG_LONG) && !defined(CATCH_CONFIG_CPP11_LONG_LONG) && !defined(CATCH_CONFIG_NO_CPP11) # define CATCH_CONFIG_CPP11_LONG_LONG #endif -#if defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_CPP11) +#if defined(CATCH_INTERNAL_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_NO_OVERRIDE) && !defined(CATCH_CONFIG_CPP11_OVERRIDE) && !defined(CATCH_CONFIG_NO_CPP11) # define CATCH_CONFIG_CPP11_OVERRIDE #endif -#if defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_CPP11) +#if defined(CATCH_INTERNAL_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_NO_UNIQUE_PTR) && !defined(CATCH_CONFIG_CPP11_UNIQUE_PTR) && !defined(CATCH_CONFIG_NO_CPP11) # define CATCH_CONFIG_CPP11_UNIQUE_PTR #endif -#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) +// Use of __COUNTER__ is suppressed if __JETBRAINS_IDE__ is #defined (meaning we're being parsed by a JetBrains IDE for +// analytics) because, at time of writing, __COUNTER__ is not properly handled by it. +// This does not affect compilation +#if defined(CATCH_INTERNAL_CONFIG_COUNTER) && !defined(CATCH_CONFIG_NO_COUNTER) && !defined(CATCH_CONFIG_COUNTER) && !defined(__JETBRAINS_IDE__) # define CATCH_CONFIG_COUNTER #endif +#if defined(CATCH_INTERNAL_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_NO_SHUFFLE) && !defined(CATCH_CONFIG_CPP11_SHUFFLE) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_SHUFFLE +#endif +# if defined(CATCH_INTERNAL_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_NO_TYPE_TRAITS) && !defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) && !defined(CATCH_CONFIG_NO_CPP11) +# define CATCH_CONFIG_CPP11_TYPE_TRAITS +# endif #if !defined(CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS) # define CATCH_INTERNAL_SUPPRESS_PARENTHESES_WARNINGS @@ -315,6 +319,21 @@ # define CATCH_AUTO_PTR( T ) std::auto_ptr #endif +#define INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) name##line +#define INTERNAL_CATCH_UNIQUE_NAME_LINE( name, line ) INTERNAL_CATCH_UNIQUE_NAME_LINE2( name, line ) +#ifdef CATCH_CONFIG_COUNTER +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __COUNTER__ ) +#else +# define INTERNAL_CATCH_UNIQUE_NAME( name ) INTERNAL_CATCH_UNIQUE_NAME_LINE( name, __LINE__ ) +#endif + +#define INTERNAL_CATCH_STRINGIFY2( expr ) #expr +#define INTERNAL_CATCH_STRINGIFY( expr ) INTERNAL_CATCH_STRINGIFY2( expr ) + +#include +#include +#include + namespace Catch { struct IConfig; @@ -367,7 +386,10 @@ namespace Catch { } bool startsWith( std::string const& s, std::string const& prefix ); + bool startsWith( std::string const& s, char prefix ); bool endsWith( std::string const& s, std::string const& suffix ); + bool endsWith( std::string const& s, char suffix ); + bool contains( std::string const& s, std::string const& infix ); bool contains( std::string const& s, std::string const& infix ); void toLowerInPlace( std::string& s ); std::string toLower( std::string const& s ); @@ -387,8 +409,8 @@ namespace Catch { SourceLineInfo(); SourceLineInfo( char const* _file, std::size_t _line ); - SourceLineInfo( SourceLineInfo const& other ); # ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS + SourceLineInfo(SourceLineInfo const& other) = default; SourceLineInfo( SourceLineInfo && ) = default; SourceLineInfo& operator = ( SourceLineInfo const& ) = default; SourceLineInfo& operator = ( SourceLineInfo && ) = default; @@ -397,7 +419,7 @@ namespace Catch { bool operator == ( SourceLineInfo const& other ) const; bool operator < ( SourceLineInfo const& other ) const; - std::string file; + char const* file; std::size_t line; }; @@ -832,6 +854,27 @@ namespace Catch { namespace Catch { + struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison; + + struct DecomposedExpression + { + virtual ~DecomposedExpression() {} + virtual bool isBinaryExpression() const { + return false; + } + virtual void reconstructExpression( std::string& dest ) const = 0; + + // Only simple binary comparisons can be decomposed. + // If more complex check is required then wrap sub-expressions in parentheses. + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator + ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator - ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator * ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator / ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator % ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( T const& ); + template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( T const& ); + }; + struct AssertionInfo { AssertionInfo() {} @@ -848,11 +891,41 @@ namespace Catch { struct AssertionResultData { - AssertionResultData() : resultType( ResultWas::Unknown ) {} + AssertionResultData() : decomposedExpression( CATCH_NULL ) + , resultType( ResultWas::Unknown ) + , negated( false ) + , parenthesized( false ) {} - std::string reconstructedExpression; + void negate( bool parenthesize ) { + negated = !negated; + parenthesized = parenthesize; + if( resultType == ResultWas::Ok ) + resultType = ResultWas::ExpressionFailed; + else if( resultType == ResultWas::ExpressionFailed ) + resultType = ResultWas::Ok; + } + + std::string const& reconstructExpression() const { + if( decomposedExpression != CATCH_NULL ) { + decomposedExpression->reconstructExpression( reconstructedExpression ); + if( parenthesized ) { + reconstructedExpression.insert( 0, 1, '(' ); + reconstructedExpression.append( 1, ')' ); + } + if( negated ) { + reconstructedExpression.insert( 0, 1, '!' ); + } + decomposedExpression = CATCH_NULL; + } + return reconstructedExpression; + } + + mutable DecomposedExpression const* decomposedExpression; + mutable std::string reconstructedExpression; std::string message; ResultWas::OfType resultType; + bool negated; + bool parenthesized; }; class AssertionResult { @@ -879,6 +952,8 @@ namespace Catch { std::string getMessage() const; SourceLineInfo getSourceInfo() const; std::string getTestMacroName() const; + void discardDecomposedExpression() const; + void expandDecomposedExpression() const; protected: AssertionInfo m_info; @@ -1065,7 +1140,7 @@ namespace Matchers { { return m_caseSensitivity == CaseSensitive::No ? " (case insensitive)" - : ""; + : std::string(); } CaseSensitive::Choice m_caseSensitivity; std::string m_str; @@ -1083,7 +1158,7 @@ namespace Matchers { return m_data.m_str == m_data.adjustString( expr );; } virtual std::string toString() const { - return "equals: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "equals: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; @@ -1100,7 +1175,7 @@ namespace Matchers { return m_data.adjustString( expr ).find( m_data.m_str ) != std::string::npos; } virtual std::string toString() const { - return "contains: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "contains: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; @@ -1118,7 +1193,7 @@ namespace Matchers { return startsWith( m_data.adjustString( expr ), m_data.m_str ); } virtual std::string toString() const { - return "starts with: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "starts with: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; @@ -1135,7 +1210,7 @@ namespace Matchers { return endsWith( m_data.adjustString( expr ), m_data.m_str ); } virtual std::string toString() const { - return "ends with: \"" + m_data.m_str + "\"" + m_data.toStringSuffix(); + return "ends with: \"" + m_data.m_str + '"' + m_data.toStringSuffix(); } CasedString m_data; @@ -1210,22 +1285,20 @@ namespace Catch { template class ExpressionLhs; - struct STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison; - struct CopyableStream { CopyableStream() {} CopyableStream( CopyableStream const& other ) { oss << other.oss.str(); } CopyableStream& operator=( CopyableStream const& other ) { - oss.str(""); + oss.str(std::string()); oss << other.oss.str(); return *this; } std::ostringstream oss; }; - class ResultBuilder { + class ResultBuilder : public DecomposedExpression { public: ResultBuilder( char const* macroName, SourceLineInfo const& lineInfo, @@ -1243,19 +1316,15 @@ namespace Catch { return *this; } - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( RhsT const& ); - ResultBuilder& setResultType( ResultWas::OfType result ); ResultBuilder& setResultType( bool result ); - ResultBuilder& setLhs( std::string const& lhs ); - ResultBuilder& setRhs( std::string const& rhs ); - ResultBuilder& setOp( std::string const& op ); - void endExpression(); + void endExpression( DecomposedExpression const& expr ); + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE; - std::string reconstructExpression() const; AssertionResult build() const; + AssertionResult build( DecomposedExpression const& expr ) const; void useActiveException( ResultDisposition::Flags resultDisposition = ResultDisposition::Normal ); void captureResult( ResultWas::OfType resultType ); @@ -1267,14 +1336,12 @@ namespace Catch { bool shouldDebugBreak() const; bool allowThrows() const; + template + void captureMatch( ArgT const& arg, MatcherT const& matcher, char const* matcherString ); + private: AssertionInfo m_assertionInfo; AssertionResultData m_data; - struct ExprComponents { - ExprComponents() : testFalse( false ) {} - bool testFalse; - std::string lhs, rhs, op; - } m_exprComponents; CopyableStream m_stream; bool m_shouldDebugBreak; @@ -1796,90 +1863,155 @@ std::string toString( T const& value ) { namespace Catch { -// Wraps the LHS of an expression and captures the operator and RHS (if any) - -// wrapping them all in a ResultBuilder object -template -class ExpressionLhs { - ExpressionLhs& operator = ( ExpressionLhs const& ); -# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS - ExpressionLhs& operator = ( ExpressionLhs && ) = delete; -# endif +template +class BinaryExpression; +template +class MatchExpression; + +// Wraps the LHS of an expression and overloads comparison operators +// for also capturing those and RHS (if any) +template +class ExpressionLhs : public DecomposedExpression { public: - ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ) {} -# ifdef CATCH_CONFIG_CPP11_GENERATED_METHODS - ExpressionLhs( ExpressionLhs const& ) = default; - ExpressionLhs( ExpressionLhs && ) = default; -# endif + ExpressionLhs( ResultBuilder& rb, T lhs ) : m_rb( rb ), m_lhs( lhs ), m_truthy(false) {} template - ResultBuilder& operator == ( RhsT const& rhs ) { + BinaryExpression + operator == ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator != ( RhsT const& rhs ) { + BinaryExpression + operator != ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator < ( RhsT const& rhs ) { + BinaryExpression + operator < ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator > ( RhsT const& rhs ) { + BinaryExpression + operator > ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator <= ( RhsT const& rhs ) { + BinaryExpression + operator <= ( RhsT const& rhs ) const { return captureExpression( rhs ); } template - ResultBuilder& operator >= ( RhsT const& rhs ) { + BinaryExpression + operator >= ( RhsT const& rhs ) const { return captureExpression( rhs ); } - ResultBuilder& operator == ( bool rhs ) { + BinaryExpression operator == ( bool rhs ) const { return captureExpression( rhs ); } - ResultBuilder& operator != ( bool rhs ) { + BinaryExpression operator != ( bool rhs ) const { return captureExpression( rhs ); } void endExpression() { - bool value = m_lhs ? true : false; + m_truthy = m_lhs ? true : false; m_rb - .setLhs( Catch::toString( value ) ) - .setResultType( value ) - .endExpression(); + .setResultType( m_truthy ) + .endExpression( *this ); } - // Only simple binary expressions are allowed on the LHS. - // If more complex compositions are required then place the sub expression in parentheses - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator + ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator - ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator / ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator * ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator && ( RhsT const& ); - template STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& operator || ( RhsT const& ); + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + dest = Catch::toString( m_truthy ); + } private: template - ResultBuilder& captureExpression( RhsT const& rhs ) { - return m_rb - .setResultType( Internal::compare( m_lhs, rhs ) ) - .setLhs( Catch::toString( m_lhs ) ) - .setRhs( Catch::toString( rhs ) ) - .setOp( Internal::OperatorTraits::getName() ); + BinaryExpression captureExpression( RhsT& rhs ) const { + return BinaryExpression( m_rb, m_lhs, rhs ); + } + + template + BinaryExpression captureExpression( bool rhs ) const { + return BinaryExpression( m_rb, m_lhs, rhs ); } private: ResultBuilder& m_rb; T m_lhs; + bool m_truthy; +}; + +template +class BinaryExpression : public DecomposedExpression { +public: + BinaryExpression( ResultBuilder& rb, LhsT lhs, RhsT rhs ) + : m_rb( rb ), m_lhs( lhs ), m_rhs( rhs ) {} + + void endExpression() const { + m_rb + .setResultType( Internal::compare( m_lhs, m_rhs ) ) + .endExpression( *this ); + } + + virtual bool isBinaryExpression() const CATCH_OVERRIDE { + return true; + } + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + std::string lhs = Catch::toString( m_lhs ); + std::string rhs = Catch::toString( m_rhs ); + char delim = lhs.size() + rhs.size() < 40 && + lhs.find('\n') == std::string::npos && + rhs.find('\n') == std::string::npos ? ' ' : '\n'; + dest.reserve( 7 + lhs.size() + rhs.size() ); + // 2 for spaces around operator + // 2 for operator + // 2 for parentheses (conditionally added later) + // 1 for negation (conditionally added later) + dest = lhs; + dest += delim; + dest += Internal::OperatorTraits::getName(); + dest += delim; + dest += rhs; + } + +private: + ResultBuilder& m_rb; + LhsT m_lhs; + RhsT m_rhs; +}; + +template +class MatchExpression : public DecomposedExpression { +public: + MatchExpression( ArgT arg, MatcherT matcher, char const* matcherString ) + : m_arg( arg ), m_matcher( matcher ), m_matcherString( matcherString ) {} + + virtual bool isBinaryExpression() const CATCH_OVERRIDE { + return true; + } + + virtual void reconstructExpression( std::string& dest ) const CATCH_OVERRIDE { + std::string matcherAsString = m_matcher.toString(); + dest = Catch::toString( m_arg ); + dest += ' '; + if( matcherAsString == Detail::unprintableString ) + dest += m_matcherString; + else + dest += matcherAsString; + } + +private: + ArgT m_arg; + MatcherT m_matcher; + char const* m_matcherString; }; } // end namespace Catch @@ -1896,6 +2028,14 @@ namespace Catch { return ExpressionLhs( *this, value ); } + template + inline void ResultBuilder::captureMatch( ArgT const& arg, MatcherT const& matcher, + char const* matcherString ) { + MatchExpression expr( arg, matcher, matcherString ); + setResultType( matcher.match( arg ) ); + endExpression( expr ); + } + } // namespace Catch // #included from: catch_message.h @@ -1998,11 +2138,19 @@ namespace Catch { #define TWOBLUECUBES_CATCH_PLATFORM_H_INCLUDED #if defined(__MAC_OS_X_VERSION_MIN_REQUIRED) -#define CATCH_PLATFORM_MAC +# define CATCH_PLATFORM_MAC #elif defined(__IPHONE_OS_VERSION_MIN_REQUIRED) -#define CATCH_PLATFORM_IPHONE +# define CATCH_PLATFORM_IPHONE +#elif defined(linux) || defined(__linux) || defined(__linux__) +# define CATCH_PLATFORM_LINUX #elif defined(WIN32) || defined(__WIN32__) || defined(_WIN32) || defined(_MSC_VER) -#define CATCH_PLATFORM_WINDOWS +# define CATCH_PLATFORM_WINDOWS +# if !defined(NOMINMAX) && !defined(CATCH_CONFIG_NO_NOMINMAX) +# define CATCH_DEFINES_NOMINMAX +# endif +# if !defined(WIN32_LEAN_AND_MEAN) && !defined(CATCH_CONFIG_NO_WIN32_LEAN_AND_MEAN) +# define CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# endif #endif #include @@ -2017,27 +2165,36 @@ namespace Catch{ // The following code snippet based on: // http://cocoawithlove.com/2008/03/break-into-debugger.html - #ifdef DEBUG - #if defined(__ppc64__) || defined(__ppc__) - #define CATCH_BREAK_INTO_DEBUGGER() \ - if( Catch::isDebuggerActive() ) { \ - __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ - : : : "memory","r0","r3","r4" ); \ - } - #else - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) {__asm__("int $3\n" : : );} - #endif + #if defined(__ppc64__) || defined(__ppc__) + #define CATCH_TRAP() \ + __asm__("li r0, 20\nsc\nnop\nli r0, 37\nli r4, 2\nsc\nnop\n" \ + : : : "memory","r0","r3","r4" ) + #else + #define CATCH_TRAP() __asm__("int $3\n" : : ) #endif +#elif defined(CATCH_PLATFORM_LINUX) + // If we can use inline assembler, do it because this allows us to break + // directly at the location of the failing check instead of breaking inside + // raise() called from it, i.e. one stack frame below. + #if defined(__GNUC__) && (defined(__i386) || defined(__x86_64)) + #define CATCH_TRAP() asm volatile ("int $3") + #else // Fall back to the generic way. + #include + + #define CATCH_TRAP() raise(SIGTRAP) + #endif #elif defined(_MSC_VER) - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { __debugbreak(); } + #define CATCH_TRAP() __debugbreak() #elif defined(__MINGW32__) extern "C" __declspec(dllimport) void __stdcall DebugBreak(); - #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { DebugBreak(); } + #define CATCH_TRAP() DebugBreak() #endif -#ifndef CATCH_BREAK_INTO_DEBUGGER -#define CATCH_BREAK_INTO_DEBUGGER() Catch::alwaysTrue(); +#ifdef CATCH_TRAP + #define CATCH_BREAK_INTO_DEBUGGER() if( Catch::isDebuggerActive() ) { CATCH_TRAP(); } +#else + #define CATCH_BREAK_INTO_DEBUGGER() Catch::alwaysTrue(); #endif // #included from: catch_interfaces_runner.h @@ -2070,10 +2227,11 @@ namespace Catch { ( __catchResult <= expr ).endExpression(); \ } \ catch( ... ) { \ - __catchResult.useActiveException( Catch::ResultDisposition::Normal ); \ + __catchResult.useActiveException( resultDisposition ); \ } \ INTERNAL_CATCH_REACT( __catchResult ) \ - } while( Catch::isTrue( false && !!(expr) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look + } while( Catch::isTrue( false && static_cast( !!(expr) ) ) ) // expr here is never evaluated at runtime but it forces the compiler to give it a look + // The double negation silences MSVC's C4800 warning, the static_cast forces short-circuit evaluation if the type has overloaded &&. /////////////////////////////////////////////////////////////////////////////// #define INTERNAL_CATCH_IF( expr, resultDisposition, macroName ) \ @@ -2090,7 +2248,7 @@ namespace Catch { do { \ Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \ try { \ - expr; \ + static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::Ok ); \ } \ catch( ... ) { \ @@ -2105,7 +2263,7 @@ namespace Catch { Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition, #matcher ); \ if( __catchResult.allowThrows() ) \ try { \ - expr; \ + static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ catch( ... ) { \ @@ -2122,7 +2280,7 @@ namespace Catch { Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #expr, resultDisposition ); \ if( __catchResult.allowThrows() ) \ try { \ - expr; \ + static_cast(expr); \ __catchResult.captureResult( Catch::ResultWas::DidntThrowException ); \ } \ catch( exceptionType ) { \ @@ -2164,13 +2322,7 @@ namespace Catch { do { \ Catch::ResultBuilder __catchResult( macroName, CATCH_INTERNAL_LINEINFO, #arg ", " #matcher, resultDisposition ); \ try { \ - std::string matcherAsString = (matcher).toString(); \ - __catchResult \ - .setLhs( Catch::toString( arg ) ) \ - .setRhs( matcherAsString == Catch::Detail::unprintableString ? #matcher : matcherAsString ) \ - .setOp( "matches" ) \ - .setResultType( (matcher).match( arg ) ); \ - __catchResult.captureExpression(); \ + __catchResult.captureMatch( arg, matcher, #matcher ); \ } catch( ... ) { \ __catchResult.useActiveException( resultDisposition | Catch::ResultDisposition::ContinueOnFailure ); \ } \ @@ -2623,6 +2775,10 @@ namespace Catch { #include #include +#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) +#include +#endif + namespace Catch { namespace Detail { @@ -2651,6 +2807,53 @@ namespace Detail { return approx; } +#if defined(CATCH_CONFIG_CPP11_TYPE_TRAITS) + template ::value>::type> + friend bool operator == ( const T& lhs, Approx const& rhs ) { + // Thanks to Richard Harris for his help refining this formula + auto lhs_v = double(lhs); + return fabs( lhs_v - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs_v), fabs(rhs.m_value) ) ); + } + + template ::value>::type> + friend bool operator == ( Approx const& lhs, const T& rhs ) { + return operator==( rhs, lhs ); + } + + template ::value>::type> + friend bool operator != ( T lhs, Approx const& rhs ) { + return !operator==( lhs, rhs ); + } + + template ::value>::type> + friend bool operator != ( Approx const& lhs, T rhs ) { + return !operator==( rhs, lhs ); + } + + template ::value>::type> + friend bool operator <= ( T lhs, Approx const& rhs ) + { + return double(lhs) < rhs.m_value || lhs == rhs; + } + + template ::value>::type> + friend bool operator <= ( Approx const& lhs, T rhs ) + { + return lhs.m_value < double(rhs) || lhs == rhs; + } + + template ::value>::type> + friend bool operator >= ( T lhs, Approx const& rhs ) + { + return double(lhs) > rhs.m_value || lhs == rhs; + } + + template ::value>::type> + friend bool operator >= ( Approx const& lhs, T rhs ) + { + return lhs.m_value > double(rhs) || lhs == rhs; + } +#else friend bool operator == ( double lhs, Approx const& rhs ) { // Thanks to Richard Harris for his help refining this formula return fabs( lhs - rhs.m_value ) < rhs.m_epsilon * (rhs.m_scale + (std::max)( fabs(lhs), fabs(rhs.m_value) ) ); @@ -2668,6 +2871,27 @@ namespace Detail { return !operator==( rhs, lhs ); } + friend bool operator <= ( double lhs, Approx const& rhs ) + { + return lhs < rhs.m_value || lhs == rhs; + } + + friend bool operator <= ( Approx const& lhs, double rhs ) + { + return lhs.m_value < rhs || lhs == rhs; + } + + friend bool operator >= ( double lhs, Approx const& rhs ) + { + return lhs > rhs.m_value || lhs == rhs; + } + + friend bool operator >= ( Approx const& lhs, double rhs ) + { + return lhs.m_value > rhs || lhs == rhs; + } +#endif + Approx& epsilon( double newEpsilon ) { m_epsilon = newEpsilon; return *this; @@ -2822,7 +3046,8 @@ namespace Catch { IsHidden = 1 << 1, ShouldFail = 1 << 2, MayFail = 1 << 3, - Throws = 1 << 4 + Throws = 1 << 4, + NonPortable = 1 << 5 }; TestCaseInfo( std::string const& _name, @@ -3134,11 +3359,11 @@ namespace Catch m_wildcard( NoWildcard ), m_pattern( adjustCase( pattern ) ) { - if( startsWith( m_pattern, "*" ) ) { + if( startsWith( m_pattern, '*' ) ) { m_pattern = m_pattern.substr( 1 ); m_wildcard = WildcardAtStart; } - if( endsWith( m_pattern, "*" ) ) { + if( endsWith( m_pattern, '*' ) ) { m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); m_wildcard = static_cast( m_wildcard | WildcardAtEnd ); } @@ -3257,11 +3482,12 @@ namespace Catch { namespace Catch { class TestSpecParser { - enum Mode{ None, Name, QuotedName, Tag }; + enum Mode{ None, Name, QuotedName, Tag, EscapedName }; Mode m_mode; bool m_exclusion; std::size_t m_start, m_pos; std::string m_arg; + std::vector m_escapeChars; TestSpec::Filter m_currentFilter; TestSpec m_testSpec; ITagAliasRegistry const* m_tagAliases; @@ -3274,6 +3500,7 @@ namespace Catch { m_exclusion = false; m_start = std::string::npos; m_arg = m_tagAliases->expandAliases( arg ); + m_escapeChars.clear(); for( m_pos = 0; m_pos < m_arg.size(); ++m_pos ) visitChar( m_arg[m_pos] ); if( m_mode == Name ) @@ -3292,6 +3519,7 @@ namespace Catch { case '~': m_exclusion = true; return; case '[': return startNewMode( Tag, ++m_pos ); case '"': return startNewMode( QuotedName, ++m_pos ); + case '\\': return escape(); default: startNewMode( Name, m_pos ); break; } } @@ -3307,7 +3535,11 @@ namespace Catch { addPattern(); startNewMode( Tag, ++m_pos ); } + else if( c == '\\' ) + escape(); } + else if( m_mode == EscapedName ) + m_mode = Name; else if( m_mode == QuotedName && c == '"' ) addPattern(); else if( m_mode == Tag && c == ']' ) @@ -3317,10 +3549,19 @@ namespace Catch { m_mode = mode; m_start = start; } + void escape() { + if( m_mode == None ) + m_start = m_pos; + m_mode = EscapedName; + m_escapeChars.push_back( m_pos ); + } std::string subString() const { return m_arg.substr( m_start, m_pos - m_start ); } template void addPattern() { std::string token = subString(); + for( size_t i = 0; i < m_escapeChars.size(); ++i ) + token = token.substr( 0, m_escapeChars[i]-i ) + token.substr( m_escapeChars[i]+1-i ); + m_escapeChars.clear(); if( startsWith( token, "exclude:" ) ) { m_exclusion = true; token = token.substr( 8 ); @@ -3406,6 +3647,8 @@ namespace Catch { virtual RunTests::InWhatOrder runOrder() const = 0; virtual unsigned int rngSeed() const = 0; virtual UseColour::YesOrNo useColour() const = 0; + virtual std::vector const& getSectionsToRun() const = 0; + }; } @@ -3428,6 +3671,7 @@ namespace Catch { #include #include #include +#include namespace Catch { @@ -3531,6 +3775,7 @@ namespace Catch { std::vector reporterNames; std::vector testsOrTags; + std::vector sectionsToRun; }; class Config : public SharedImpl { @@ -3571,7 +3816,8 @@ namespace Catch { bool shouldDebugBreak() const { return m_data.shouldDebugBreak; } - std::vector getReporterNames() const { return m_data.reporterNames; } + std::vector const& getReporterNames() const { return m_data.reporterNames; } + std::vector const& getSectionsToRun() const CATCH_OVERRIDE { return m_data.sectionsToRun; } int abortAfter() const { return m_data.abortAfter; } @@ -3995,9 +4241,12 @@ namespace Clara { inline void convertInto( std::string const& _source, std::string& _dest ) { _dest = _source; } + char toLowerCh(char c) { + return static_cast( ::tolower( c ) ); + } inline void convertInto( std::string const& _source, bool& _dest ) { std::string sourceLC = _source; - std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), ::tolower ); + std::transform( sourceLC.begin(), sourceLC.end(), sourceLC.begin(), toLowerCh ); if( sourceLC == "y" || sourceLC == "1" || sourceLC == "true" || sourceLC == "yes" || sourceLC == "on" ) _dest = true; else if( sourceLC == "n" || sourceLC == "0" || sourceLC == "false" || sourceLC == "no" || sourceLC == "off" ) @@ -4658,13 +4907,14 @@ namespace Catch { config.abortAfter = x; } inline void addTestOrTags( ConfigData& config, std::string const& _testSpec ) { config.testsOrTags.push_back( _testSpec ); } + inline void addSectionToRun( ConfigData& config, std::string const& sectionName ) { config.sectionsToRun.push_back( sectionName ); } inline void addReporterName( ConfigData& config, std::string const& _reporterName ) { config.reporterNames.push_back( _reporterName ); } inline void addWarning( ConfigData& config, std::string const& _warning ) { if( _warning == "NoAssertions" ) config.warnings = static_cast( config.warnings | WarnAbout::NoAssertions ); else - throw std::runtime_error( "Unrecognised warning: '" + _warning + "'" ); + throw std::runtime_error( "Unrecognised warning: '" + _warning + '\'' ); } inline void setOrder( ConfigData& config, std::string const& order ) { if( startsWith( "declared", order ) ) @@ -4674,7 +4924,7 @@ namespace Catch { else if( startsWith( "random", order ) ) config.runOrder = RunTests::InRandomOrder; else - throw std::runtime_error( "Unrecognised ordering: '" + order + "'" ); + throw std::runtime_error( "Unrecognised ordering: '" + order + '\'' ); } inline void setRngSeed( ConfigData& config, std::string const& seed ) { if( seed == "time" ) { @@ -4720,10 +4970,10 @@ namespace Catch { std::string line; while( std::getline( f, line ) ) { line = trim(line); - if( !line.empty() && !startsWith( line, "#" ) ) { - if( !startsWith( line, "\"" ) ) - line = "\"" + line + "\""; - addTestOrTags( config, line + "," ); + if( !line.empty() && !startsWith( line, '#' ) ) { + if( !startsWith( line, '"' ) ) + line = '"' + line + '"'; + addTestOrTags( config, line + ',' ); } } } @@ -4811,6 +5061,10 @@ namespace Catch { .describe( "adds a tag for the filename" ) .bind( &ConfigData::filenamesAsTags ); + cli["-c"]["--section"] + .describe( "specify section to run" ) + .bind( &addSectionToRun, "section name" ); + // Less common commands which don't have a short form cli["--list-test-names-only"] .describe( "list all/matching test cases names only" ) @@ -4883,19 +5137,16 @@ namespace Tbc { TextAttributes() : initialIndent( std::string::npos ), indent( 0 ), - width( consoleWidth-1 ), - tabChar( '\t' ) + width( consoleWidth-1 ) {} TextAttributes& setInitialIndent( std::size_t _value ) { initialIndent = _value; return *this; } TextAttributes& setIndent( std::size_t _value ) { indent = _value; return *this; } TextAttributes& setWidth( std::size_t _value ) { width = _value; return *this; } - TextAttributes& setTabChar( char _value ) { tabChar = _value; return *this; } std::size_t initialIndent; // indent of first line, or npos std::size_t indent; // indent of subsequent lines, or all if initialIndent is npos std::size_t width; // maximum width of text, including indent. Longer text will wrap - char tabChar; // If this char is seen the indent is changed to current pos }; class Text { @@ -4903,62 +5154,76 @@ namespace Tbc { Text( std::string const& _str, TextAttributes const& _attr = TextAttributes() ) : attr( _attr ) { - std::string wrappableChars = " [({.,/|\\-"; - std::size_t indent = _attr.initialIndent != std::string::npos - ? _attr.initialIndent - : _attr.indent; - std::string remainder = _str; + const std::string wrappableBeforeChars = "[({<\t"; + const std::string wrappableAfterChars = "])}>-,./|\\"; + const std::string wrappableInsteadOfChars = " \n\r"; + std::string indent = _attr.initialIndent != std::string::npos + ? std::string( _attr.initialIndent, ' ' ) + : std::string( _attr.indent, ' ' ); + + typedef std::string::const_iterator iterator; + iterator it = _str.begin(); + const iterator strEnd = _str.end(); + + while( it != strEnd ) { - while( !remainder.empty() ) { if( lines.size() >= 1000 ) { lines.push_back( "... message truncated due to excessive size" ); return; } - std::size_t tabPos = std::string::npos; - std::size_t width = (std::min)( remainder.size(), _attr.width - indent ); - std::size_t pos = remainder.find_first_of( '\n' ); - if( pos <= width ) { - width = pos; - } - pos = remainder.find_last_of( _attr.tabChar, width ); - if( pos != std::string::npos ) { - tabPos = pos; - if( remainder[width] == '\n' ) - width--; - remainder = remainder.substr( 0, tabPos ) + remainder.substr( tabPos+1 ); - } - if( width == remainder.size() ) { - spliceLine( indent, remainder, width ); - } - else if( remainder[width] == '\n' ) { - spliceLine( indent, remainder, width ); - if( width <= 1 || remainder.size() != 1 ) - remainder = remainder.substr( 1 ); - indent = _attr.indent; - } - else { - pos = remainder.find_last_of( wrappableChars, width ); - if( pos != std::string::npos && pos > 0 ) { - spliceLine( indent, remainder, pos ); - if( remainder[0] == ' ' ) - remainder = remainder.substr( 1 ); + std::string suffix; + std::size_t width = (std::min)( static_cast( strEnd-it ), _attr.width-static_cast( indent.size() ) ); + iterator itEnd = it+width; + iterator itNext = _str.end(); + + iterator itNewLine = std::find( it, itEnd, '\n' ); + if( itNewLine != itEnd ) + itEnd = itNewLine; + + if( itEnd != strEnd ) { + bool foundWrapPoint = false; + iterator findIt = itEnd; + do { + if( wrappableAfterChars.find( *findIt ) != std::string::npos && findIt != itEnd ) { + itEnd = findIt+1; + itNext = findIt+1; + foundWrapPoint = true; + } + else if( findIt > it && wrappableBeforeChars.find( *findIt ) != std::string::npos ) { + itEnd = findIt; + itNext = findIt; + foundWrapPoint = true; + } + else if( wrappableInsteadOfChars.find( *findIt ) != std::string::npos ) { + itNext = findIt+1; + itEnd = findIt; + foundWrapPoint = true; + } + if( findIt == it ) + break; + else + --findIt; + } + while( !foundWrapPoint ); + + if( !foundWrapPoint ) { + // No good wrap char, so we'll break mid word and add a hyphen + --itEnd; + itNext = itEnd; + suffix = "-"; } else { - spliceLine( indent, remainder, width-1 ); - lines.back() += "-"; + while( itEnd > it && wrappableInsteadOfChars.find( *(itEnd-1) ) != std::string::npos ) + --itEnd; } - if( lines.size() == 1 ) - indent = _attr.indent; - if( tabPos != std::string::npos ) - indent += tabPos; } - } - } + lines.push_back( indent + std::string( it, itEnd ) + suffix ); - void spliceLine( std::size_t _indent, std::string& _remainder, std::size_t _pos ) { - lines.push_back( std::string( _indent, ' ' ) + _remainder.substr( 0, _pos ) ); - _remainder = _remainder.substr( _pos ); + if( indent.size() != _attr.indent ) + indent = std::string( _attr.indent, ' ' ); + it = itNext; + } } typedef std::vector::const_iterator const_iterator; @@ -5355,9 +5620,9 @@ namespace Catch { } if( !config.testSpec().hasFilters() ) - Catch::cout() << pluralise( matchedTests, "test case" ) << "\n" << std::endl; + Catch::cout() << pluralise( matchedTests, "test case" ) << '\n' << std::endl; else - Catch::cout() << pluralise( matchedTests, "matching test case" ) << "\n" << std::endl; + Catch::cout() << pluralise( matchedTests, "matching test case" ) << '\n' << std::endl; return matchedTests; } @@ -5372,8 +5637,8 @@ namespace Catch { ++it ) { matchedTests++; TestCaseInfo const& testCaseInfo = it->getTestCaseInfo(); - if( startsWith( testCaseInfo.name, "#" ) ) - Catch::cout() << "\"" << testCaseInfo.name << "\"" << std::endl; + if( startsWith( testCaseInfo.name, '#' ) ) + Catch::cout() << '"' << testCaseInfo.name << '"' << std::endl; else Catch::cout() << testCaseInfo.name << std::endl; } @@ -5436,9 +5701,9 @@ namespace Catch { .setInitialIndent( 0 ) .setIndent( oss.str().size() ) .setWidth( CATCH_CONFIG_CONSOLE_WIDTH-10 ) ); - Catch::cout() << oss.str() << wrapper << "\n"; + Catch::cout() << oss.str() << wrapper << '\n'; } - Catch::cout() << pluralise( tagCounts.size(), "tag" ) << "\n" << std::endl; + Catch::cout() << pluralise( tagCounts.size(), "tag" ) << '\n' << std::endl; return tagCounts.size(); } @@ -5457,9 +5722,9 @@ namespace Catch { .setWidth( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 ) ); Catch::cout() << " " << it->first - << ":" + << ':' << std::string( maxNameLen - it->first.size() + 2, ' ' ) - << wrapper << "\n"; + << wrapper << '\n'; } Catch::cout() << std::endl; return factories.size(); @@ -5490,15 +5755,26 @@ namespace Catch { #include #include #include +#include namespace Catch { namespace TestCaseTracking { + struct NameAndLocation { + std::string name; + SourceLineInfo location; + + NameAndLocation( std::string const& _name, SourceLineInfo const& _location ) + : name( _name ), + location( _location ) + {} + }; + struct ITracker : SharedImpl<> { virtual ~ITracker(); // static queries - virtual std::string name() const = 0; + virtual NameAndLocation const& nameAndLocation() const = 0; // dynamic queries virtual bool isComplete() const = 0; // Successfully completed or failed @@ -5514,7 +5790,7 @@ namespace TestCaseTracking { virtual void markAsNeedingAnotherRun() = 0; virtual void addChild( Ptr const& child ) = 0; - virtual ITracker* findChild( std::string const& name ) = 0; + virtual ITracker* findChild( NameAndLocation const& nameAndLocation ) = 0; virtual void openChild() = 0; // Debug/ checking @@ -5522,7 +5798,7 @@ namespace TestCaseTracking { virtual bool isIndexTracker() const = 0; }; - class TrackerContext { + class TrackerContext { enum RunState { NotStarted, @@ -5584,30 +5860,32 @@ namespace TestCaseTracking { Failed }; class TrackerHasName { - std::string m_name; + NameAndLocation m_nameAndLocation; public: - TrackerHasName( std::string const& name ) : m_name( name ) {} + TrackerHasName( NameAndLocation const& nameAndLocation ) : m_nameAndLocation( nameAndLocation ) {} bool operator ()( Ptr const& tracker ) { - return tracker->name() == m_name; + return + tracker->nameAndLocation().name == m_nameAndLocation.name && + tracker->nameAndLocation().location == m_nameAndLocation.location; } }; typedef std::vector > Children; - std::string m_name; + NameAndLocation m_nameAndLocation; TrackerContext& m_ctx; ITracker* m_parent; Children m_children; CycleState m_runState; public: - TrackerBase( std::string const& name, TrackerContext& ctx, ITracker* parent ) - : m_name( name ), + TrackerBase( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : m_nameAndLocation( nameAndLocation ), m_ctx( ctx ), m_parent( parent ), m_runState( NotStarted ) {} virtual ~TrackerBase(); - virtual std::string name() const CATCH_OVERRIDE { - return m_name; + virtual NameAndLocation const& nameAndLocation() const CATCH_OVERRIDE { + return m_nameAndLocation; } virtual bool isComplete() const CATCH_OVERRIDE { return m_runState == CompletedSuccessfully || m_runState == Failed; @@ -5626,8 +5904,8 @@ namespace TestCaseTracking { m_children.push_back( child ); } - virtual ITracker* findChild( std::string const& name ) CATCH_OVERRIDE { - Children::const_iterator it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( name ) ); + virtual ITracker* findChild( NameAndLocation const& nameAndLocation ) CATCH_OVERRIDE { + Children::const_iterator it = std::find_if( m_children.begin(), m_children.end(), TrackerHasName( nameAndLocation ) ); return( it != m_children.end() ) ? it->get() : CATCH_NULL; @@ -5705,41 +5983,65 @@ namespace TestCaseTracking { }; class SectionTracker : public TrackerBase { + std::vector m_filters; public: - SectionTracker( std::string const& name, TrackerContext& ctx, ITracker* parent ) - : TrackerBase( name, ctx, parent ) - {} + SectionTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent ) + : TrackerBase( nameAndLocation, ctx, parent ) + { + if( parent ) { + while( !parent->isSectionTracker() ) + parent = &parent->parent(); + + SectionTracker& parentSection = static_cast( *parent ); + addNextFilters( parentSection.m_filters ); + } + } virtual ~SectionTracker(); virtual bool isSectionTracker() const CATCH_OVERRIDE { return true; } - static SectionTracker& acquire( TrackerContext& ctx, std::string const& name ) { + static SectionTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation ) { SectionTracker* section = CATCH_NULL; ITracker& currentTracker = ctx.currentTracker(); - if( ITracker* childTracker = currentTracker.findChild( name ) ) { + if( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isSectionTracker() ); section = static_cast( childTracker ); } else { - section = new SectionTracker( name, ctx, ¤tTracker ); + section = new SectionTracker( nameAndLocation, ctx, ¤tTracker ); currentTracker.addChild( section ); } - if( !ctx.completedCycle() && !section->isComplete() ) { - - section->open(); - } + if( !ctx.completedCycle() ) + section->tryOpen(); return *section; } + + void tryOpen() { + if( !isComplete() && (m_filters.empty() || m_filters[0].empty() || m_filters[0] == m_nameAndLocation.name ) ) + open(); + } + + void addInitialFilters( std::vector const& filters ) { + if( !filters.empty() ) { + m_filters.push_back(""); // Root - should never be consulted + m_filters.push_back(""); // Test Case - not a section filter + std::copy( filters.begin(), filters.end(), std::back_inserter( m_filters ) ); + } + } + void addNextFilters( std::vector const& filters ) { + if( filters.size() > 1 ) + std::copy( filters.begin()+1, filters.end(), std::back_inserter( m_filters ) ); + } }; class IndexTracker : public TrackerBase { int m_size; int m_index; public: - IndexTracker( std::string const& name, TrackerContext& ctx, ITracker* parent, int size ) - : TrackerBase( name, ctx, parent ), + IndexTracker( NameAndLocation const& nameAndLocation, TrackerContext& ctx, ITracker* parent, int size ) + : TrackerBase( nameAndLocation, ctx, parent ), m_size( size ), m_index( -1 ) {} @@ -5747,17 +6049,17 @@ namespace TestCaseTracking { virtual bool isIndexTracker() const CATCH_OVERRIDE { return true; } - static IndexTracker& acquire( TrackerContext& ctx, std::string const& name, int size ) { + static IndexTracker& acquire( TrackerContext& ctx, NameAndLocation const& nameAndLocation, int size ) { IndexTracker* tracker = CATCH_NULL; ITracker& currentTracker = ctx.currentTracker(); - if( ITracker* childTracker = currentTracker.findChild( name ) ) { + if( ITracker* childTracker = currentTracker.findChild( nameAndLocation ) ) { assert( childTracker ); assert( childTracker->isIndexTracker() ); tracker = static_cast( childTracker ); } else { - tracker = new IndexTracker( name, ctx, ¤tTracker, size ); + tracker = new IndexTracker( nameAndLocation, ctx, ¤tTracker, size ); currentTracker.addChild( tracker ); } @@ -5785,7 +6087,7 @@ namespace TestCaseTracking { }; inline ITracker& TrackerContext::startRun() { - m_rootTracker = new SectionTracker( "{root}", *this, CATCH_NULL ); + m_rootTracker = new SectionTracker( NameAndLocation( "{root}", CATCH_INTERNAL_LINEINFO ), *this, CATCH_NULL ); m_currentTracker = CATCH_NULL; m_runState = Executing; return *m_rootTracker; @@ -5805,25 +6107,77 @@ using TestCaseTracking::IndexTracker; namespace Catch { - // Report the error condition then exit the process - inline void fatal( std::string const& message, int exitCode ) { + // Report the error condition + inline void reportFatal( std::string const& message ) { IContext& context = Catch::getCurrentContext(); IResultCapture* resultCapture = context.getResultCapture(); resultCapture->handleFatalErrorCondition( message ); - - if( Catch::alwaysTrue() ) // avoids "no return" warnings - exit( exitCode ); } } // namespace Catch #if defined ( CATCH_PLATFORM_WINDOWS ) ///////////////////////////////////////// +#define NOMINMAX +#define WIN32_LEAN_AND_MEAN +#include +#undef WIN32_LEAN_AND_MEAN +#undef NOMINMAX + namespace Catch { + struct SignalDefs { DWORD id; const char* name; }; + extern SignalDefs signalDefs[]; + // There is no 1-1 mapping between signals and windows exceptions. + // Windows can easily distinguish between SO and SigSegV, + // but SigInt, SigTerm, etc are handled differently. + SignalDefs signalDefs[] = { + { EXCEPTION_ILLEGAL_INSTRUCTION, "SIGILL - Illegal instruction signal" }, + { EXCEPTION_STACK_OVERFLOW, "SIGSEGV - Stack overflow" }, + { EXCEPTION_ACCESS_VIOLATION, "SIGSEGV - Segmentation violation signal" }, + { EXCEPTION_INT_DIVIDE_BY_ZERO, "Divide by zero error" }, + }; + struct FatalConditionHandler { - void reset() {} - }; + + static LONG CALLBACK handleVectoredException(PEXCEPTION_POINTERS ExceptionInfo) { + for (int i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { + if (ExceptionInfo->ExceptionRecord->ExceptionCode == signalDefs[i].id) { + reportFatal(signalDefs[i].name); + } + } + // If its not an exception we care about, pass it along. + // This stops us from eating debugger breaks etc. + return EXCEPTION_CONTINUE_SEARCH; + } + + // 32k seems enough for Catch to handle stack overflow, + // but the value was found experimentally, so there is no strong guarantee + FatalConditionHandler():m_isSet(true), m_guaranteeSize(32 * 1024), m_exceptionHandlerHandle(CATCH_NULL) { + // Register as first handler in current chain + m_exceptionHandlerHandle = AddVectoredExceptionHandler(1, handleVectoredException); + // Pass in guarantee size to be filled + SetThreadStackGuarantee(&m_guaranteeSize); + } + + void reset() { + if (m_isSet) { + // Unregister handler and restore the old guarantee + RemoveVectoredExceptionHandler(m_exceptionHandlerHandle); + SetThreadStackGuarantee(&m_guaranteeSize); + m_exceptionHandlerHandle = CATCH_NULL; + m_isSet = false; + } + } + + ~FatalConditionHandler() { + reset(); + } + private: + bool m_isSet; + ULONG m_guaranteeSize; + PVOID m_exceptionHandlerHandle; + }; } // namespace Catch @@ -5833,7 +6187,10 @@ namespace Catch { namespace Catch { - struct SignalDefs { int id; const char* name; }; + struct SignalDefs { + int id; + const char* name; + }; extern SignalDefs signalDefs[]; SignalDefs signalDefs[] = { { SIGINT, "SIGINT - Terminal interrupt signal" }, @@ -5842,35 +6199,66 @@ namespace Catch { { SIGSEGV, "SIGSEGV - Segmentation violation signal" }, { SIGTERM, "SIGTERM - Termination request signal" }, { SIGABRT, "SIGABRT - Abort (abnormal termination) signal" } - }; + }; struct FatalConditionHandler { + static bool isSet; + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)]; + static stack_t oldSigStack; + static char altStackMem[SIGSTKSZ]; + static void handleSignal( int sig ) { - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) - if( sig == signalDefs[i].id ) - fatal( signalDefs[i].name, -sig ); - fatal( "", -sig ); + std::string name = ""; + for (std::size_t i = 0; i < sizeof(signalDefs) / sizeof(SignalDefs); ++i) { + SignalDefs &def = signalDefs[i]; + if (sig == def.id) { + name = def.name; + break; + } + } + reset(); + reportFatal(name); + raise( sig ); } - FatalConditionHandler() : m_isSet( true ) { - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) - signal( signalDefs[i].id, handleSignal ); - } - ~FatalConditionHandler() { - reset(); - } - void reset() { - if( m_isSet ) { - for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) - signal( signalDefs[i].id, SIG_DFL ); - m_isSet = false; + FatalConditionHandler() { + isSet = true; + stack_t sigStack; + sigStack.ss_sp = altStackMem; + sigStack.ss_size = SIGSTKSZ; + sigStack.ss_flags = 0; + sigaltstack(&sigStack, &oldSigStack); + struct sigaction sa = { 0 }; + + sa.sa_handler = handleSignal; + sa.sa_flags = SA_ONSTACK; + for (std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i) { + sigaction(signalDefs[i].id, &sa, &oldSigActions[i]); } } - bool m_isSet; + ~FatalConditionHandler() { + reset(); + } + static void reset() { + if( isSet ) { + // Set signals back to previous values -- hopefully nobody overwrote them in the meantime + for( std::size_t i = 0; i < sizeof(signalDefs)/sizeof(SignalDefs); ++i ) { + sigaction(signalDefs[i].id, &oldSigActions[i], CATCH_NULL); + } + // Return the old stack + sigaltstack(&oldSigStack, CATCH_NULL); + isSet = false; + } + } }; + bool FatalConditionHandler::isSet = false; + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; + char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; + } // namespace Catch #endif // not Windows @@ -5949,10 +6337,11 @@ namespace Catch { m_activeTestCase = &testCase; do { - m_trackerContext.startRun(); + ITracker& rootTracker = m_trackerContext.startRun(); + dynamic_cast( rootTracker ).addInitialFilters( m_config->getSectionsToRun() ); do { m_trackerContext.startCycle(); - m_testCaseTracker = &SectionTracker::acquire( m_trackerContext, testInfo.name ); + m_testCaseTracker = &SectionTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( testInfo.name, testInfo.lineInfo ) ); runCurrentTest( redirectedCout, redirectedCerr ); } while( !m_testCaseTracker->isSuccessfullyCompleted() && !aborting() ); @@ -5997,7 +6386,7 @@ namespace Catch { m_messages.clear(); // Reset working state - m_lastAssertionInfo = AssertionInfo( "", m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition ); + m_lastAssertionInfo = AssertionInfo( std::string(), m_lastAssertionInfo.lineInfo, "{Unknown expression after the reported line}" , m_lastAssertionInfo.resultDisposition ); m_lastResult = result; } @@ -6006,10 +6395,7 @@ namespace Catch { Counts& assertions ) { - std::ostringstream oss; - oss << sectionInfo.name << "@" << sectionInfo.lineInfo; - - ITracker& sectionTracker = SectionTracker::acquire( m_trackerContext, oss.str() ); + ITracker& sectionTracker = SectionTracker::acquire( m_trackerContext, TestCaseTracking::NameAndLocation( sectionInfo.name, sectionInfo.lineInfo ) ); if( !sectionTracker.isOpen() ) return false; m_activeSections.push_back( §ionTracker ); @@ -6068,7 +6454,7 @@ namespace Catch { virtual std::string getCurrentTestName() const { return m_activeTestCase ? m_activeTestCase->getTestCaseInfo().name - : ""; + : std::string(); } virtual const AssertionResult* getLastResult() const { @@ -6098,11 +6484,11 @@ namespace Catch { deltaTotals.testCases.failed = 1; m_reporter->testCaseEnded( TestCaseStats( testInfo, deltaTotals, - "", - "", + std::string(), + std::string(), false ) ); m_totals.testCases.failed++; - testGroupEnded( "", m_totals, 1, 1 ); + testGroupEnded( std::string(), m_totals, 1, 1 ); m_reporter->testRunEnded( TestRunStats( m_runInfo, m_totals, false ) ); } @@ -6121,7 +6507,7 @@ namespace Catch { Counts prevAssertions = m_totals.assertions; double duration = 0; try { - m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, "", ResultDisposition::Normal ); + m_lastAssertionInfo = AssertionInfo( "TEST_CASE", testCaseInfo.lineInfo, std::string(), ResultDisposition::Normal ); seedRng( *m_config ); @@ -6454,10 +6840,6 @@ namespace Catch { #include #include -#ifdef CATCH_CPP14_OR_GREATER -#include -#endif - namespace Catch { struct RandomNumberGenerator { @@ -6465,7 +6847,7 @@ namespace Catch { result_type operator()( result_type n ) const { return std::rand() % n; } -#ifdef CATCH_CPP14_OR_GREATER +#ifdef CATCH_CONFIG_CPP11_SHUFFLE static constexpr result_type min() { return 0; } static constexpr result_type max() { return 1000000; } result_type operator()() const { return std::rand() % max(); } @@ -6473,7 +6855,7 @@ namespace Catch { template static void shuffle( V& vector ) { RandomNumberGenerator rng; -#ifdef CATCH_CPP14_OR_GREATER +#ifdef CATCH_CONFIG_CPP11_SHUFFLE std::shuffle( vector.begin(), vector.end(), rng ); #else std::random_shuffle( vector.begin(), vector.end(), rng ); @@ -6516,7 +6898,7 @@ namespace Catch { ss << Colour( Colour::Red ) << "error: TEST_CASE( \"" << it->name << "\" ) already defined.\n" - << "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << "\n" + << "\tFirst seen at " << prev.first->getTestCaseInfo().lineInfo << '\n' << "\tRedefined at " << it->getTestCaseInfo().lineInfo << std::endl; throw std::runtime_error(ss.str()); @@ -6548,7 +6930,7 @@ namespace Catch { virtual void registerTest( TestCase const& testCase ) { std::string name = testCase.getTestCaseInfo().name; - if( name == "" ) { + if( name.empty() ) { std::ostringstream oss; oss << "Anonymous test case " << ++m_unnamedCount; return registerTest( testCase.withName( oss.str() ) ); @@ -6597,7 +6979,7 @@ namespace Catch { inline std::string extractClassName( std::string const& classOrQualifiedMethodName ) { std::string className = classOrQualifiedMethodName; - if( startsWith( className, "&" ) ) + if( startsWith( className, '&' ) ) { std::size_t lastColons = className.rfind( "::" ); std::size_t penultimateColons = className.rfind( "::", lastColons-1 ); @@ -6887,7 +7269,7 @@ namespace Catch { m_ofs.open( filename.c_str() ); if( m_ofs.fail() ) { std::ostringstream oss; - oss << "Unable to open file: '" << filename << "'"; + oss << "Unable to open file: '" << filename << '\''; throw std::domain_error( oss.str() ); } } @@ -6940,6 +7322,11 @@ namespace Catch { Context( Context const& ); void operator=( Context const& ); + public: + virtual ~Context() { + deleteAllValues( m_generatorsByTestName ); + } + public: // IContext virtual IResultCapture* getResultCapture() { return m_resultCapture; @@ -7053,8 +7440,15 @@ namespace Catch { #if defined ( CATCH_CONFIG_COLOUR_WINDOWS ) ///////////////////////////////////////// -#ifndef NOMINMAX -#define NOMINMAX +// #included from: catch_windows_h_proxy.h + +#define TWOBLUECUBES_CATCH_WINDOWS_H_PROXY_H_INCLUDED + +#ifdef CATCH_DEFINES_NOMINMAX +# define NOMINMAX +#endif +#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN #endif #ifdef __AFXDLL @@ -7063,6 +7457,13 @@ namespace Catch { #include #endif +#ifdef CATCH_DEFINES_NOMINMAX +# undef NOMINMAX +#endif +#ifdef CATCH_DEFINES_WIN32_LEAN_AND_MEAN +# undef WIN32_LEAN_AND_MEAN +#endif + namespace Catch { namespace { @@ -7143,7 +7544,7 @@ namespace { case Colour::White: return setColour( "[0m" ); case Colour::Red: return setColour( "[0;31m" ); case Colour::Green: return setColour( "[0;32m" ); - case Colour::Blue: return setColour( "[0:34m" ); + case Colour::Blue: return setColour( "[0;34m" ); case Colour::Cyan: return setColour( "[0;36m" ); case Colour::Yellow: return setColour( "[0;33m" ); case Colour::Grey: return setColour( "[1;30m" ); @@ -7329,7 +7730,7 @@ namespace Catch { std::string AssertionResult::getExpression() const { if( isFalseTest( m_info.resultDisposition ) ) - return "!" + m_info.capturedExpression; + return '!' + m_info.capturedExpression; else return m_info.capturedExpression; } @@ -7345,7 +7746,7 @@ namespace Catch { } std::string AssertionResult::getExpandedExpression() const { - return m_resultData.reconstructedExpression; + return m_resultData.reconstructExpression(); } std::string AssertionResult::getMessage() const { @@ -7359,6 +7760,14 @@ namespace Catch { return m_info.macroName; } + void AssertionResult::discardDecomposedExpression() const { + m_resultData.decomposedExpression = CATCH_NULL; + } + + void AssertionResult::expandDecomposedExpression() const { + m_resultData.reconstructExpression(); + } + } // end namespace Catch // #included from: catch_test_case_info.hpp @@ -7367,7 +7776,7 @@ namespace Catch { namespace Catch { inline TestCaseInfo::SpecialProperties parseSpecialTag( std::string const& tag ) { - if( startsWith( tag, "." ) || + if( startsWith( tag, '.' ) || tag == "hide" || tag == "!hide" ) return TestCaseInfo::IsHidden; @@ -7377,6 +7786,8 @@ namespace Catch { return TestCaseInfo::ShouldFail; else if( tag == "!mayfail" ) return TestCaseInfo::MayFail; + else if( tag == "!nonportable" ) + return TestCaseInfo::NonPortable; else return TestCaseInfo::None; } @@ -7451,7 +7862,7 @@ namespace Catch { std::ostringstream oss; for( std::set::const_iterator it = tags.begin(), itEnd = tags.end(); it != itEnd; ++it ) { - oss << "[" << *it << "]"; + oss << '[' << *it << ']'; std::string lcaseTag = toLower( *it ); testCaseInfo.properties = static_cast( testCaseInfo.properties | parseSpecialTag( lcaseTag ) ); testCaseInfo.lcaseTags.insert( lcaseTag ); @@ -7567,18 +7978,18 @@ namespace Catch { {} std::ostream& operator << ( std::ostream& os, Version const& version ) { - os << version.majorVersion << "." - << version.minorVersion << "." + os << version.majorVersion << '.' + << version.minorVersion << '.' << version.patchNumber; if( !version.branchName.empty() ) { - os << "-" << version.branchName - << "." << version.buildNumber; + os << '-' << version.branchName + << '.' << version.buildNumber; } return os; } - Version libraryVersion( 1, 5, 8, "", 0 ); + Version libraryVersion( 1, 7, 0, "", 0 ); } @@ -7749,7 +8160,6 @@ namespace Catch #endif #ifdef CATCH_PLATFORM_WINDOWS -#include #else #include #endif @@ -7798,17 +8208,28 @@ namespace Catch { // #included from: catch_common.hpp #define TWOBLUECUBES_CATCH_COMMON_HPP_INCLUDED +#include + namespace Catch { bool startsWith( std::string const& s, std::string const& prefix ) { - return s.size() >= prefix.size() && s.substr( 0, prefix.size() ) == prefix; + return s.size() >= prefix.size() && std::equal(prefix.begin(), prefix.end(), s.begin()); + } + bool startsWith( std::string const& s, char prefix ) { + return !s.empty() && s[0] == prefix; } bool endsWith( std::string const& s, std::string const& suffix ) { - return s.size() >= suffix.size() && s.substr( s.size()-suffix.size(), suffix.size() ) == suffix; + return s.size() >= suffix.size() && std::equal(suffix.rbegin(), suffix.rend(), s.rbegin()); + } + bool endsWith( std::string const& s, char suffix ) { + return !s.empty() && s[s.size()-1] == suffix; } bool contains( std::string const& s, std::string const& infix ) { return s.find( infix ) != std::string::npos; } + bool contains( std::string const& s, char infix ) { + return s.find(infix) != std::string::npos; + } char toLowerCh(char c) { return static_cast( ::tolower( c ) ); } @@ -7825,7 +8246,7 @@ namespace Catch { std::string::size_type start = str.find_first_not_of( whitespaceChars ); std::string::size_type end = str.find_last_not_of( whitespaceChars ); - return start != std::string::npos ? str.substr( start, 1+end-start ) : ""; + return start != std::string::npos ? str.substr( start, 1+end-start ) : std::string(); } bool replaceInPlace( std::string& str, std::string const& replaceThis, std::string const& withThis ) { @@ -7848,29 +8269,25 @@ namespace Catch { {} std::ostream& operator << ( std::ostream& os, pluralise const& pluraliser ) { - os << pluraliser.m_count << " " << pluraliser.m_label; + os << pluraliser.m_count << ' ' << pluraliser.m_label; if( pluraliser.m_count != 1 ) - os << "s"; + os << 's'; return os; } - SourceLineInfo::SourceLineInfo() : line( 0 ){} + SourceLineInfo::SourceLineInfo() : file(""), line( 0 ){} SourceLineInfo::SourceLineInfo( char const* _file, std::size_t _line ) : file( _file ), line( _line ) {} - SourceLineInfo::SourceLineInfo( SourceLineInfo const& other ) - : file( other.file ), - line( other.line ) - {} bool SourceLineInfo::empty() const { - return file.empty(); + return file[0] == '\0'; } bool SourceLineInfo::operator == ( SourceLineInfo const& other ) const { - return line == other.line && file == other.file; + return line == other.line && (file == other.file || std::strcmp(file, other.file) == 0); } bool SourceLineInfo::operator < ( SourceLineInfo const& other ) const { - return line < other.line || ( line == other.line && file < other.file ); + return line < other.line || ( line == other.line && (std::strcmp(file, other.file) < 0)); } void seedRng( IConfig const& config ) { @@ -7883,16 +8300,16 @@ namespace Catch { std::ostream& operator << ( std::ostream& os, SourceLineInfo const& info ) { #ifndef __GNUG__ - os << info.file << "(" << info.line << ")"; + os << info.file << '(' << info.line << ')'; #else - os << info.file << ":" << info.line; + os << info.file << ':' << info.line; #endif return os; } void throwLogicError( std::string const& message, SourceLineInfo const& locationInfo ) { std::ostringstream oss; - oss << locationInfo << ": Internal Catch error: '" << message << "'"; + oss << locationInfo << ": Internal Catch error: '" << message << '\''; if( alwaysTrue() ) throw std::logic_error( oss.str() ); } @@ -7989,6 +8406,33 @@ namespace Catch { } } // namespace Catch +#elif defined(CATCH_PLATFORM_LINUX) + #include + #include + + namespace Catch{ + // The standard POSIX way of detecting a debugger is to attempt to + // ptrace() the process, but this needs to be done from a child and not + // this process itself to still allow attaching to this process later + // if wanted, so is rather heavy. Under Linux we have the PID of the + // "debugger" (which doesn't need to be gdb, of course, it could also + // be strace, for example) in /proc/$PID/status, so just get it from + // there instead. + bool isDebuggerActive(){ + std::ifstream in("/proc/self/status"); + for( std::string line; std::getline(in, line); ) { + static const int PREFIX_LEN = 11; + if( line.compare(0, PREFIX_LEN, "TracerPid:\t") == 0 ) { + // We're traced if the PID is not 0 and no other PID starts + // with 0 digit, so it's enough to check for just a single + // character. + return line.length() > PREFIX_LEN && line[PREFIX_LEN] != '0'; + } + } + + return false; + } + } // namespace Catch #elif defined(_MSC_VER) extern "C" __declspec(dllimport) int __stdcall IsDebuggerPresent(); namespace Catch { @@ -8086,7 +8530,7 @@ std::string toString( std::string const& value ) { } } } - return "\"" + s + "\""; + return '"' + s + '"'; } std::string toString( std::wstring const& value ) { @@ -8107,19 +8551,19 @@ std::string toString( char* const value ) { std::string toString( const wchar_t* const value ) { - return value ? Catch::toString( std::wstring(value) ) : std::string( "{null string}" ); + return value ? Catch::toString( std::wstring(value) ) : std::string( "{null string}" ); } std::string toString( wchar_t* const value ) { - return Catch::toString( static_cast( value ) ); + return Catch::toString( static_cast( value ) ); } std::string toString( int value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } @@ -8127,7 +8571,7 @@ std::string toString( unsigned long value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } @@ -8155,7 +8599,7 @@ std::string toString( const double value ) { return fpToString( value, 10 ); } std::string toString( const float value ) { - return fpToString( value, 5 ) + "f"; + return fpToString( value, 5 ) + 'f'; } std::string toString( bool value ) { @@ -8163,9 +8607,19 @@ std::string toString( bool value ) { } std::string toString( char value ) { - return value < ' ' - ? toString( static_cast( value ) ) - : Detail::makeString( value ); + if ( value == '\r' ) + return "'\\r'"; + if ( value == '\f' ) + return "'\\f'"; + if ( value == '\n' ) + return "'\\n'"; + if ( value == '\t' ) + return "'\\t'"; + if ( '\0' <= value && value < ' ' ) + return toString( static_cast( value ) ); + char chstr[] = "' '"; + chstr[1] = value; + return chstr; } std::string toString( signed char value ) { @@ -8181,14 +8635,14 @@ std::string toString( long long value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } std::string toString( unsigned long long value ) { std::ostringstream oss; oss << value; if( value > Detail::hexThreshold ) - oss << " (0x" << std::hex << value << ")"; + oss << " (0x" << std::hex << value << ')'; return oss.str(); } #endif @@ -8245,22 +8699,10 @@ namespace Catch { m_data.resultType = result ? ResultWas::Ok : ResultWas::ExpressionFailed; return *this; } - ResultBuilder& ResultBuilder::setLhs( std::string const& lhs ) { - m_exprComponents.lhs = lhs; - return *this; - } - ResultBuilder& ResultBuilder::setRhs( std::string const& rhs ) { - m_exprComponents.rhs = rhs; - return *this; - } - ResultBuilder& ResultBuilder::setOp( std::string const& op ) { - m_exprComponents.op = op; - return *this; - } - void ResultBuilder::endExpression() { - m_exprComponents.testFalse = isFalseTest( m_assertionInfo.resultDisposition ); - captureExpression(); + void ResultBuilder::endExpression( DecomposedExpression const& expr ) { + AssertionResult result = build( expr ); + handleResult( result ); } void ResultBuilder::useActiveException( ResultDisposition::Flags resultDisposition ) { @@ -8273,6 +8715,7 @@ namespace Catch { setResultType( resultType ); captureExpression(); } + void ResultBuilder::captureExpectedException( std::string const& expectedMessage ) { if( expectedMessage.empty() ) captureExpectedException( Matchers::Impl::Generic::AllOf() ); @@ -8282,7 +8725,7 @@ namespace Catch { void ResultBuilder::captureExpectedException( Matchers::Impl::Matcher const& matcher ) { - assert( m_exprComponents.testFalse == false ); + assert( !isFalseTest( m_assertionInfo.resultDisposition ) ); AssertionResultData data = m_data; data.resultType = ResultWas::Ok; data.reconstructedExpression = m_assertionInfo.capturedExpression; @@ -8300,6 +8743,7 @@ namespace Catch { AssertionResult result = build(); handleResult( result ); } + void ResultBuilder::handleResult( AssertionResult const& result ) { getResultCapture().assertionEnded( result ); @@ -8311,6 +8755,7 @@ namespace Catch { m_shouldThrow = true; } } + void ResultBuilder::react() { if( m_shouldThrow ) throw Catch::TestFailureException(); @@ -8321,43 +8766,32 @@ namespace Catch { AssertionResult ResultBuilder::build() const { - assert( m_data.resultType != ResultWas::Unknown ); + return build( *this ); + } + // CAVEAT: The returned AssertionResult stores a pointer to the argument expr, + // a temporary DecomposedExpression, which in turn holds references to + // operands, possibly temporary as well. + // It should immediately be passed to handleResult; if the expression + // needs to be reported, its string expansion must be composed before + // the temporaries are destroyed. + AssertionResult ResultBuilder::build( DecomposedExpression const& expr ) const + { + assert( m_data.resultType != ResultWas::Unknown ); AssertionResultData data = m_data; - // Flip bool results if testFalse is set - if( m_exprComponents.testFalse ) { - if( data.resultType == ResultWas::Ok ) - data.resultType = ResultWas::ExpressionFailed; - else if( data.resultType == ResultWas::ExpressionFailed ) - data.resultType = ResultWas::Ok; + // Flip bool results if FalseTest flag is set + if( isFalseTest( m_assertionInfo.resultDisposition ) ) { + data.negate( expr.isBinaryExpression() ); } data.message = m_stream.oss.str(); - data.reconstructedExpression = reconstructExpression(); - if( m_exprComponents.testFalse ) { - if( m_exprComponents.op == "" ) - data.reconstructedExpression = "!" + data.reconstructedExpression; - else - data.reconstructedExpression = "!(" + data.reconstructedExpression + ")"; - } + data.decomposedExpression = &expr; // for lazy reconstruction return AssertionResult( m_assertionInfo, data ); } - std::string ResultBuilder::reconstructExpression() const { - if( m_exprComponents.op == "" ) - return m_exprComponents.lhs.empty() ? m_assertionInfo.capturedExpression : m_exprComponents.op + m_exprComponents.lhs; - else if( m_exprComponents.op == "matches" ) - return m_exprComponents.lhs + " " + m_exprComponents.rhs; - else if( m_exprComponents.op != "!" ) { - if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 40 && - m_exprComponents.lhs.find("\n") == std::string::npos && - m_exprComponents.rhs.find("\n") == std::string::npos ) - return m_exprComponents.lhs + " " + m_exprComponents.op + " " + m_exprComponents.rhs; - else - return m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs; - } - else - return "{can't expand - use " + m_assertionInfo.macroName + "_FALSE( " + m_assertionInfo.capturedExpression.substr(1) + " ) instead of " + m_assertionInfo.macroName + "( " + m_assertionInfo.capturedExpression + " ) for better diagnostics}"; + + void ResultBuilder::reconstructExpression( std::string& dest ) const { + dest = m_assertionInfo.capturedExpression; } } // end namespace Catch @@ -8418,7 +8852,7 @@ namespace Catch { void TagAliasRegistry::add( char const* alias, char const* tag, SourceLineInfo const& lineInfo ) { - if( !startsWith( alias, "[@" ) || !endsWith( alias, "]" ) ) { + if( !startsWith( alias, "[@" ) || !endsWith( alias, ']' ) ) { std::ostringstream oss; oss << "error: tag alias, \"" << alias << "\" is not of the form [@alias name].\n" << lineInfo; throw std::domain_error( oss.str().c_str() ); @@ -8426,7 +8860,7 @@ namespace Catch { if( !m_registry.insert( std::make_pair( alias, TagAlias( tag, lineInfo ) ) ).second ) { std::ostringstream oss; oss << "error: tag alias, \"" << alias << "\" already registered.\n" - << "\tFirst seen at " << find(alias)->lineInfo << "\n" + << "\tFirst seen at " << find(alias)->lineInfo << '\n' << "\tRedefined at " << lineInfo; throw std::domain_error( oss.str().c_str() ); } @@ -8694,12 +9128,12 @@ namespace Catch { struct BySectionInfo { BySectionInfo( SectionInfo const& other ) : m_other( other ) {} - BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} + BySectionInfo( BySectionInfo const& other ) : m_other( other.m_other ) {} bool operator() ( Ptr const& node ) const { return node->stats.sectionInfo.lineInfo == m_other.lineInfo; } private: - void operator=( BySectionInfo const& ); + void operator=( BySectionInfo const& ); SectionInfo const& m_other; }; @@ -8755,6 +9189,12 @@ namespace Catch { assert( !m_sectionStack.empty() ); SectionNode& sectionNode = *m_sectionStack.back(); sectionNode.assertions.push_back( assertionStats ); + // AssertionResult holds a pointer to a temporary DecomposedExpression, + // which getExpandedExpression() calls to build the expression string. + // Our section stack copy of the assertionResult will likely outlive the + // temporary, so it must be expanded or discarded now to avoid calling + // a destroyed object later. + prepareExpandedExpression( sectionNode.assertions.back().assertionResult ); return true; } virtual void sectionEnded( SectionStats const& sectionStats ) CATCH_OVERRIDE { @@ -8789,6 +9229,13 @@ namespace Catch { virtual void skipTest( TestCaseInfo const& ) CATCH_OVERRIDE {} + virtual void prepareExpandedExpression( AssertionResult& result ) const { + if( result.isOk() ) + result.discardDecomposedExpression(); + else + result.expandDecomposedExpression(); + } + Ptr m_config; std::ostream& stream; std::vector m_assertions; @@ -8894,7 +9341,7 @@ namespace Catch { return new T( config ); } virtual std::string getDescription() const { - return ""; + return std::string(); } }; @@ -8963,7 +9410,7 @@ namespace Catch { default: // Escape control chars - based on contribution by @espenalb in PR #465 and // by @mrpi PR #588 - if ( ( c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) + if ( ( c >= 0 && c < '\x09' ) || ( c > '\x0D' && c < '\x20') || c=='\x7F' ) os << "&#x" << std::uppercase << std::hex << std::setfill('0') << std::setw(2) << static_cast( c ) << ';'; else os << c; @@ -9042,7 +9489,7 @@ namespace Catch { XmlWriter& startElement( std::string const& name ) { ensureTagClosed(); newlineIfNecessary(); - stream() << m_indent << "<" << name; + stream() << m_indent << '<' << name; m_tags.push_back( name ); m_indent += " "; m_tagIsOpen = true; @@ -9071,12 +9518,12 @@ namespace Catch { XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ) { if( !name.empty() && !attribute.empty() ) - stream() << " " << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << "\""; + stream() << ' ' << name << "=\"" << XmlEncode( attribute, XmlEncode::ForAttributes ) << '"'; return *this; } XmlWriter& writeAttribute( std::string const& name, bool attribute ) { - stream() << " " << name << "=\"" << ( attribute ? "true" : "false" ) << "\""; + stream() << ' ' << name << "=\"" << ( attribute ? "true" : "false" ) << '"'; return *this; } @@ -9108,7 +9555,7 @@ namespace Catch { XmlWriter& writeBlankLine() { ensureTagClosed(); - stream() << "\n"; + stream() << '\n'; return *this; } @@ -9133,7 +9580,7 @@ namespace Catch { void newlineIfNecessary() { if( m_needsNewline ) { - stream() << "\n"; + stream() << '\n'; m_needsNewline = false; } } @@ -9166,6 +9613,7 @@ namespace Catch { public: XmlReporter( ReporterConfig const& _config ) : StreamingReporterBase( _config ), + m_xml(_config.stream()), m_sectionDepth( 0 ) { m_reporterPrefs.shouldRedirectStdOut = true; @@ -9185,7 +9633,6 @@ namespace Catch { virtual void testRunStarting( TestRunInfo const& testInfo ) CATCH_OVERRIDE { StreamingReporterBase::testRunStarting( testInfo ); - m_xml.setStream( stream ); m_xml.startElement( "Catch" ); if( !m_config->name().empty() ) m_xml.writeAttribute( "name", m_config->name() ); @@ -9242,7 +9689,7 @@ namespace Catch { if( assertionResult.hasExpression() ) { m_xml.startElement( "Expression" ) .writeAttribute( "success", assertionResult.succeeded() ) - .writeAttribute( "type", assertionResult.getTestMacroName() ) + .writeAttribute( "type", assertionResult.getTestMacroName() ) .writeAttribute( "filename", assertionResult.getSourceInfo().file ) .writeAttribute( "line", assertionResult.getSourceInfo().line ); @@ -9349,6 +9796,35 @@ namespace Catch { namespace Catch { + namespace { + std::string getCurrentTimestamp() { + // Beware, this is not reentrant because of backward compatibility issues + // Also, UTC only, again because of backward compatibility (%z is C++11) + time_t rawtime; + std::time(&rawtime); + const size_t timeStampSize = sizeof("2017-01-16T17:06:45Z"); + +#ifdef CATCH_PLATFORM_WINDOWS + std::tm timeInfo = {}; + gmtime_s(&timeInfo, &rawtime); +#else + std::tm* timeInfo; + timeInfo = std::gmtime(&rawtime); +#endif + + char timeStamp[timeStampSize]; + const char * const fmt = "%Y-%m-%dT%H:%M:%SZ"; + +#ifdef CATCH_PLATFORM_WINDOWS + std::strftime(timeStamp, timeStampSize, fmt, &timeInfo); +#else + std::strftime(timeStamp, timeStampSize, fmt, timeInfo); +#endif + return std::string(timeStamp); + } + + } + class JunitReporter : public CumulativeReporterBase { public: JunitReporter( ReporterConfig const& _config ) @@ -9413,7 +9889,7 @@ namespace Catch { xml.writeAttribute( "time", "" ); else xml.writeAttribute( "time", suiteTime ); - xml.writeAttribute( "timestamp", "tbd" ); // !TBD + xml.writeAttribute( "timestamp", getCurrentTimestamp() ); // Write test cases for( TestGroupNode::ChildNodes::const_iterator @@ -9448,7 +9924,7 @@ namespace Catch { SectionNode const& sectionNode ) { std::string name = trim( sectionNode.stats.sectionInfo.name ); if( !rootName.empty() ) - name = rootName + "/" + name; + name = rootName + '/' + name; if( !sectionNode.assertions.empty() || !sectionNode.stdOut.empty() || @@ -9526,14 +10002,14 @@ namespace Catch { std::ostringstream oss; if( !result.getMessage().empty() ) - oss << result.getMessage() << "\n"; + oss << result.getMessage() << '\n'; for( std::vector::const_iterator it = stats.infoMessages.begin(), itEnd = stats.infoMessages.end(); it != itEnd; ++it ) if( it->type == ResultWas::Info ) - oss << it->message << "\n"; + oss << it->message << '\n'; oss << "at " << result.getSourceInfo(); xml.writeText( oss.str(), false ); @@ -9568,7 +10044,7 @@ namespace Catch { } virtual void noMatchingTestCases( std::string const& spec ) CATCH_OVERRIDE { - stream << "No test cases matched '" << spec << "'" << std::endl; + stream << "No test cases matched '" << spec << '\'' << std::endl; } virtual void assertionStarting( AssertionInfo const& ) CATCH_OVERRIDE { @@ -9610,12 +10086,12 @@ namespace Catch { } if( m_headerPrinted ) { if( m_config->showDurations() == ShowDurations::Always ) - stream << "Completed in " << _sectionStats.durationInSeconds << "s" << std::endl; + stream << "Completed in " << _sectionStats.durationInSeconds << 's' << std::endl; m_headerPrinted = false; } else { if( m_config->showDurations() == ShowDurations::Always ) - stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << "s" << std::endl; + stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << 's' << std::endl; } StreamingReporterBase::sectionEnded( _sectionStats ); } @@ -9629,7 +10105,7 @@ namespace Catch { printSummaryDivider(); stream << "Summary for group '" << _testGroupStats.groupInfo.name << "':\n"; printTotals( _testGroupStats.totals ); - stream << "\n" << std::endl; + stream << '\n' << std::endl; } StreamingReporterBase::testGroupEnded( _testGroupStats ); } @@ -9721,13 +10197,13 @@ namespace Catch { printSourceInfo(); if( stats.totals.assertions.total() > 0 ) { if( result.isOk() ) - stream << "\n"; + stream << '\n'; printResultType(); printOriginalExpression(); printReconstructedExpression(); } else { - stream << "\n"; + stream << '\n'; } printMessage(); } @@ -9744,25 +10220,25 @@ namespace Catch { Colour colourGuard( Colour::OriginalExpression ); stream << " "; stream << result.getExpressionInMacro(); - stream << "\n"; + stream << '\n'; } } void printReconstructedExpression() const { if( result.hasExpandedExpression() ) { stream << "with expansion:\n"; Colour colourGuard( Colour::ReconstructedExpression ); - stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << "\n"; + stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << '\n'; } } void printMessage() const { if( !messageLabel.empty() ) - stream << messageLabel << ":" << "\n"; + stream << messageLabel << ':' << '\n'; for( std::vector::const_iterator it = messages.begin(), itEnd = messages.end(); it != itEnd; ++it ) { // If this assertion is a warning ignore any INFO messages if( printInfoMessages || it->type != ResultWas::Info ) - stream << Text( it->message, TextAttributes().setIndent(2) ) << "\n"; + stream << Text( it->message, TextAttributes().setIndent(2) ) << '\n'; } } void printSourceInfo() const { @@ -9794,7 +10270,7 @@ namespace Catch { } } void lazyPrintRunInfo() { - stream << "\n" << getLineOfChars<'~'>() << "\n"; + stream << '\n' << getLineOfChars<'~'>() << '\n'; Colour colour( Colour::SecondaryText ); stream << currentTestRunInfo->name << " is a Catch v" << libraryVersion << " host application.\n" @@ -9828,19 +10304,19 @@ namespace Catch { SourceLineInfo lineInfo = m_sectionStack.front().lineInfo; if( !lineInfo.empty() ){ - stream << getLineOfChars<'-'>() << "\n"; + stream << getLineOfChars<'-'>() << '\n'; Colour colourGuard( Colour::FileName ); - stream << lineInfo << "\n"; + stream << lineInfo << '\n'; } - stream << getLineOfChars<'.'>() << "\n" << std::endl; + stream << getLineOfChars<'.'>() << '\n' << std::endl; } void printClosedHeader( std::string const& _name ) { printOpenHeader( _name ); - stream << getLineOfChars<'.'>() << "\n"; + stream << getLineOfChars<'.'>() << '\n'; } void printOpenHeader( std::string const& _name ) { - stream << getLineOfChars<'-'>() << "\n"; + stream << getLineOfChars<'-'>() << '\n'; { Colour colourGuard( Colour::Headers ); printHeaderString( _name ); @@ -9857,7 +10333,7 @@ namespace Catch { i = 0; stream << Text( _string, TextAttributes() .setIndent( indent+i) - .setInitialIndent( indent ) ) << "\n"; + .setInitialIndent( indent ) ) << '\n'; } struct SummaryColumn { @@ -9872,9 +10348,9 @@ namespace Catch { std::string row = oss.str(); for( std::vector::iterator it = rows.begin(); it != rows.end(); ++it ) { while( it->size() < row.size() ) - *it = " " + *it; + *it = ' ' + *it; while( it->size() > row.size() ) - row = " " + row; + row = ' ' + row; } rows.push_back( row ); return *this; @@ -9894,8 +10370,8 @@ namespace Catch { stream << Colour( Colour::ResultSuccess ) << "All tests passed"; stream << " (" << pluralise( totals.assertions.passed, "assertion" ) << " in " - << pluralise( totals.testCases.passed, "test case" ) << ")" - << "\n"; + << pluralise( totals.testCases.passed, "test case" ) << ')' + << '\n'; } else { @@ -9930,10 +10406,10 @@ namespace Catch { else if( value != "0" ) { stream << Colour( Colour::LightGrey ) << " | "; stream << Colour( it->colour ) - << value << " " << it->label; + << value << ' ' << it->label; } } - stream << "\n"; + stream << '\n'; } static std::size_t makeRatio( std::size_t number, std::size_t total ) { @@ -9969,10 +10445,10 @@ namespace Catch { else { stream << Colour( Colour::Warning ) << std::string( CATCH_CONFIG_CONSOLE_WIDTH-1, '=' ); } - stream << "\n"; + stream << '\n'; } void printSummaryDivider() { - stream << getLineOfChars<'-'>() << "\n"; + stream << getLineOfChars<'-'>() << '\n'; } private: @@ -10007,7 +10483,7 @@ namespace Catch { } virtual void noMatchingTestCases( std::string const& spec ) { - stream << "No test cases matched '" << spec << "'" << std::endl; + stream << "No test cases matched '" << spec << '\'' << std::endl; } virtual void assertionStarting( AssertionInfo const& ) { @@ -10034,7 +10510,7 @@ namespace Catch { virtual void testRunEnded( TestRunStats const& _testRunStats ) { printTotals( _testRunStats.totals ); - stream << "\n" << std::endl; + stream << '\n' << std::endl; StreamingReporterBase::testRunEnded( _testRunStats ); } @@ -10134,26 +10610,26 @@ namespace Catch { void printSourceInfo() const { Colour colourGuard( Colour::FileName ); - stream << result.getSourceInfo() << ":"; + stream << result.getSourceInfo() << ':'; } void printResultType( Colour::Code colour, std::string passOrFail ) const { if( !passOrFail.empty() ) { { Colour colourGuard( colour ); - stream << " " << passOrFail; + stream << ' ' << passOrFail; } - stream << ":"; + stream << ':'; } } void printIssue( std::string issue ) const { - stream << " " << issue; + stream << ' ' << issue; } void printExpressionWas() { if( result.hasExpression() ) { - stream << ";"; + stream << ';'; { Colour colour( dimColour() ); stream << " expression was:"; @@ -10164,7 +10640,7 @@ namespace Catch { void printOriginalExpression() const { if( result.hasExpression() ) { - stream << " " << result.getExpression(); + stream << ' ' << result.getExpression(); } } @@ -10180,7 +10656,7 @@ namespace Catch { void printMessage() { if ( itMessage != messages.end() ) { - stream << " '" << itMessage->message << "'"; + stream << " '" << itMessage->message << '\''; ++itMessage; } } @@ -10195,13 +10671,13 @@ namespace Catch { { Colour colourGuard( colour ); - stream << " with " << pluralise( N, "message" ) << ":"; + stream << " with " << pluralise( N, "message" ) << ':'; } for(; itMessage != itEnd; ) { // If this assertion is a warning ignore any INFO messages if( printInfoMessages || itMessage->type != ResultWas::Info ) { - stream << " '" << itMessage->message << "'"; + stream << " '" << itMessage->message << '\''; if ( ++itMessage != itEnd ) { Colour colourGuard( dimColour() ); stream << " and"; @@ -10227,7 +10703,7 @@ namespace Catch { // - green: Passed [both/all] N tests cases with M assertions. std::string bothOrAll( std::size_t count ) const { - return count == 1 ? "" : count == 2 ? "both " : "all " ; + return count == 1 ? std::string() : count == 2 ? "both " : "all " ; } void printTotals( const Totals& totals ) const { @@ -10238,12 +10714,12 @@ namespace Catch { Colour colour( Colour::ResultError ); const std::string qualify_assertions_failed = totals.assertions.failed == totals.assertions.total() ? - bothOrAll( totals.assertions.failed ) : ""; + bothOrAll( totals.assertions.failed ) : std::string(); stream << "Failed " << bothOrAll( totals.testCases.failed ) << pluralise( totals.testCases.failed, "test case" ) << ", " "failed " << qualify_assertions_failed << - pluralise( totals.assertions.failed, "assertion" ) << "."; + pluralise( totals.assertions.failed, "assertion" ) << '.'; } else if( totals.assertions.total() == 0 ) { stream << @@ -10255,14 +10731,14 @@ namespace Catch { Colour colour( Colour::ResultError ); stream << "Failed " << pluralise( totals.testCases.failed, "test case" ) << ", " - "failed " << pluralise( totals.assertions.failed, "assertion" ) << "."; + "failed " << pluralise( totals.assertions.failed, "assertion" ) << '.'; } else { Colour colour( Colour::ResultSuccess ); stream << "Passed " << bothOrAll( totals.testCases.passed ) << pluralise( totals.testCases.passed, "test case" ) << - " with " << pluralise( totals.assertions.passed, "assertion" ) << "."; + " with " << pluralise( totals.assertions.passed, "assertion" ) << '.'; } } }; @@ -10348,7 +10824,8 @@ namespace Catch { // Standard C/C++ main entry point int main (int argc, char * argv[]) { - return Catch::Session().run( argc, argv ); + int result = Catch::Session().run( argc, argv ); + return ( result < 0xff ? result : 0xff ); } #else // __OBJC__ @@ -10366,7 +10843,7 @@ int main (int argc, char * const argv[]) { [pool drain]; #endif - return result; + return ( result < 0xff ? result : 0xff ); } #endif // __OBJC__ @@ -10396,12 +10873,12 @@ int main (int argc, char * const argv[]) { #define CATCH_CHECKED_ELSE( expr ) INTERNAL_CATCH_ELSE( expr, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECKED_ELSE" ) #define CATCH_CHECK_NOFAIL( expr ) INTERNAL_CATCH_TEST( expr, Catch::ResultDisposition::ContinueOnFailure | Catch::ResultDisposition::SuppressFail, "CATCH_CHECK_NOFAIL" ) -#define CATCH_CHECK_THROWS( expr ) INTERNAL_CATCH_THROWS( expr, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THROWS" ) +#define CATCH_CHECK_THROWS( expr ) INTERNAL_CATCH_THROWS( expr, Catch::ResultDisposition::ContinueOnFailure, "", "CATCH_CHECK_THROWS" ) #define CATCH_CHECK_THROWS_AS( expr, exceptionType ) INTERNAL_CATCH_THROWS_AS( expr, exceptionType, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THROWS_AS" ) #define CATCH_CHECK_THROWS_WITH( expr, matcher ) INTERNAL_CATCH_THROWS( expr, Catch::ResultDisposition::ContinueOnFailure, matcher, "CATCH_CHECK_THROWS_WITH" ) #define CATCH_CHECK_NOTHROW( expr ) INTERNAL_CATCH_NO_THROW( expr, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_NOTHROW" ) -#define CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THAT" ) +#define CATCH_CHECK_THAT( arg, matcher ) INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::ContinueOnFailure, "CATCH_CHECK_THAT" ) #define CATCH_REQUIRE_THAT( arg, matcher ) INTERNAL_CHECK_THAT( arg, matcher, Catch::ResultDisposition::Normal, "CATCH_REQUIRE_THAT" ) #define CATCH_INFO( msg ) INTERNAL_CATCH_INFO( msg, "CATCH_INFO" )