https://github.com/philsquared/Catch

sort by:
Revision Author Date Message Commit Date
5c88067 v2.13.6 16 April 2021, 18:14:58 UTC
86a4d70 fixed inconsistent semicolon expansion in catch_discover_tests (Bug #2214) 16 April 2021, 15:26:08 UTC
469a717 Fixed [dis]engage_platform declarations mismatch 13 April 2021, 17:50:32 UTC
42e368d v2.13.5 10 April 2021, 21:48:32 UTC
1ff1f27 Prevent Catch2 v2 tests running if loaded as a sub-project See #2202 09 April 2021, 21:54:13 UTC
269f96e Fix typos in the code base Note that only documentation and comments are impacted by this change. 08 April 2021, 16:06:36 UTC
cec3563 Don't build Catch2WithMain target by default for v2 The `Catch2WithMain` target was added experimentally for v2.13.4 to provide potentially better compilation (and link) times to users. However, having it compiled by default causes worse experience for people who do not use it, and for the v2 versions the single include distribution is still the main one. Closes #2142 05 April 2021, 16:04:31 UTC
b8b03da Mangle doccoments to avoid breaking single include stitching 04 April 2021, 16:09:29 UTC
8f277a5 Significantly refactor fatal error handling Because new glibc has changed `MINSIGSTKSZ` to be a syscall instead of being constant, the signal posix handling needed changes, as it used the value in constexpr context, for deciding size of an array. It would be simple to fix it by having the handler determine the signal handling stack size and allocate the memory every time the handler is being installed, but that would add another allocation and a syscall every time a test case is entered. Instead, I split apart the idea of preparing fatal error handlers, and engaging them, so that the memory can be allocated only once and still be guarded by RAII. Also turns out that Catch2's use of `MINSIGSTKSZ` was wrong, and we should've been using `SIGSTKSZ` the whole time, which we use now. Closes #2178 04 April 2021, 16:09:26 UTC
4cb3220 Add lcc to the list of unwanted compilers that mimic gcc 04 April 2021, 12:05:39 UTC
b025a00 Wrap all std::min and std::max calls in parentheses 20 February 2021, 22:28:20 UTC
68975e3 [Issue 2154] Correct error when building with IBM's latest XLC (#2155) * [Issue 2154] Correct error when building with IBM's latest XLC compiler with xlclang++ front-end. On AIX, the XLC 16.1.0.1 compiler considers the call to `std::abs` ambigious, so it needs help with a static_cast to the type of the template argument. Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 21 January 2021, 21:50:49 UTC
bcb9ea8 Merge pull request #2157 from tdegeus/patch Making target detection on Mac more robust 21 January 2021, 14:35:23 UTC
d4c9494 Making target detection on Mac more robust 20 January 2021, 20:12:18 UTC
bed285a Make the build reproducible with g++-8 and clang-10 Make the build reproducible by removing references to the source directory from the Catch2WithMain static library. 13 January 2021, 17:09:24 UTC
de6fe18 v2.13.4 29 December 2020, 14:03:40 UTC
fe3dddc Fix updateVersionPlaceholder when the placeholder starts the line 29 December 2020, 14:02:25 UTC
18ab353 Add deprecation warning in ParseAndCatchTests Parsing C++ with regex in CMake is error prone and regularly leads to silently dropped (not run) test cases. Going forward the function `catch_discover_tests` from `contrib/CMake.cmake` should be used. For more information see https://github.com/catchorg/Catch2/issues/2092#issuecomment-747342765 21 December 2020, 12:15:36 UTC
2375a7f Fix Catch.cmake helper by setting variable globally Set `_CATCH_DISCOVER_TESTS_SCRIPT` helper variable globally. Otherwise in a scoped call (like `add_subdirectory()`) the variable gets lost. This lost variable results in a post build error with not much information to lead to the root of the problem. This enables the usage of the helper script with the following example structure - CMakeLists.txt (project root with `add_subdirectory(external/catch2)` - external/catch2 - CMakeLists.txt (contents listed below) - contrib/Catch.cmake - contrib/CatchAddTests.cmake - catch2/catch.hpp - tests - CMakeLists.txt (add tests with `catch_discover_tests(${PROJECT_NAME})`) contents of project specific helper `external/catch2/CMakeLists.txt` ```cmake cmake_minimum_required (VERSION 3.1...${CMAKE_VERSION}) project(Catch2 LANGUAGES CXX VERSION 2.13.3) add_library(Catch2 INTERFACE) target_include_directories(Catch2 INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}> ) # provide a namespaced alias for clients to 'link' against if catch is included as a sub-project add_library(Catch2::Catch2 ALIAS Catch2) include(contrib/Catch.cmake) ``` 17 December 2020, 17:50:04 UTC
fac517d Fix conan package build 26 November 2020, 14:05:58 UTC
578f8b8 Add bazel support 18 November 2020, 20:37:12 UTC
92f8b01 Add the static library Catch2WithMain It should provide a shared impl for all targets that need to link against Catch2's implementation. However, due to limitations of C++ linking and Catch2's v2 implementation, this is only experimental and might not work under some circumstances. 18 November 2020, 20:37:10 UTC
dc7e705 Small cleanups for the reworked test case order hashing 17 November 2020, 20:08:33 UTC
3ba7455 Modified hash to make it more independent of the choice of test names. 17 November 2020, 19:58:16 UTC
ff349a5 v2.13.3 31 October 2020, 17:21:23 UTC
aca2472 Stop uploading new releases to wandbox 31 October 2020, 17:21:00 UTC
765ac08 Fix potential infinite loops in generators combined with section filter The problem was that under specific circumstances, namely that none of their children progressed, `GeneratorTracker` will not progress. This was changed recently, to allow for code like this, where a `SECTION` follows a `GENERATE` at the same level: ```cpp SECTION("A") {} auto a = GENERATE(1, 2); SECTION("B") {} ``` However, this interacted badly with `SECTION` filters (`-c foo`), as they could deactivate all `SECTION`s below a generator, and thus stop it from progressing forever. This commit makes GeneratorTracker check whether there are any filters active, and if they are, it checks whether its section-children can ever run. Fixes #2025 31 October 2020, 17:04:15 UTC
8dd25b0 Fix bunch of links to master to point to v2.x branch Fixes #2063 Related to #2050 21 October 2020, 13:30:35 UTC
69297ce Consider CMP0110 add_test() policy CMake 3.19 introduces new add_test() behavior guarded with the policy CMP0110. See: https://cmake.org/cmake/help/latest/policy/CMP0110.html Update the helper script ParseAndAddCatchTests to consider the policy and handle the test case name accordingly. 20 October 2020, 21:25:45 UTC
2d30df3 Fix indentation in ParseAndAddCatchTests Consistently use 4 spaces instead of tabs 20 October 2020, 11:48:46 UTC
77b2a7d Fix CMake regex to add tests Fix regex that requires two string arguments in the form of TEST_CASE("a", "b") resulting in not finding TEST_CASE("a") entries. See https://regex101.com/r/JygOND/1 Fixes: https://github.com/catchorg/Catch2/issues/2055 20 October 2020, 11:48:14 UTC
e905edb Add AppMesh to Open Source projects using Catch 20 October 2020, 11:48:14 UTC
87074da v2.13.2 07 October 2020, 09:43:02 UTC
e6f5e05 Improve detection of std::uncaught_exceptions support The problem was that Catch2 did not reliably include `<exception>` before it checked for the feature test macro for `std::uncaught_exceptions`. To avoid overhead of including `<exception>` everywhere, the configuration check was split out into a separate header. Closes #2021 06 October 2020, 09:07:53 UTC
44900d5 Add WORKING_DIRECTORY to CatchAddTests.cmake commands 02 October 2020, 21:29:40 UTC
7c75eca Workaround AppleClang bug by renaming TestHasher constructor argument As far as I understand the standard, if there is a function called `rng` in the global namespace, and a function argument called `rng`, then the argument should shadow the function. This then means that uses of `rng` inside the function should refer to the argument. This is not the case for AppleClang 12.0.0. Luckily the workaround is simple enough; just rename the argument. Given that the function is 3 lines and uncomplicated, the change of the name doesn't really affect readability. Still, WTF AppleClang? Closes #2030 02 October 2020, 21:22:49 UTC
fba0fee Add missing syntax highlighting tag 24 September 2020, 20:43:07 UTC
3e8800b Support template test cases in ParseAndAddCatchTests * Change regex to allow parentheses inside the test macro for a type list * Append a wildcard to the CTestName if the test case is a template * Also change the regular expression so parentheses are allowed in names (fixes #1848) 24 September 2020, 20:42:32 UTC
314a05d Merge pull request #2023 from globberwops/feature/add-reporter-and-output-dir Add REPORTER and OUTPUT_DIR args to catch_discover_tests 23 September 2020, 20:47:21 UTC
eadf4e3 Add REPORTER and OUTPUT_* args 23 September 2020, 17:12:06 UTC
f9620d1 Docu/Show how to use CMake FetchContent (#2028) 20 September 2020, 16:09:33 UTC
00db4fb Disable __builtin_constant_p when compiling with nvcc 18 September 2020, 14:07:18 UTC
2fc83e7 fixes bug in example - undeclared identifier j was not declared in `SECTION("two")` 12 September 2020, 09:40:30 UTC
a2e5ce2 Make experimental capture work on Windows with read-write temp file behavior 10 September 2020, 18:14:18 UTC
fd9f5ac v2.13.1 07 September 2020, 10:34:55 UTC
f0dc4d9 Remove superfluous values The `0`s were needed for the expansion of parameter pack for the sake of expander. Now when we have `index++` it is no more needed. 27 August 2020, 09:15:58 UTC
284672c Support sentinel-based ranges in default stringify (#2004) 18 August 2020, 08:34:47 UTC
2b34b5c Fix typo in generators docs 03 August 2020, 21:33:32 UTC
708487d Issue 1992: Better c++17 std::byte detection This fixed buld errors for ubuntu-16 + clang and similar situations where C++17 is supported in the compiler but not the default C++ standard library. 03 August 2020, 12:38:56 UTC
6859c68 Don't apply global settings when configuring as a subproject. 01 August 2020, 17:42:30 UTC
de3a208 Update ParseAndAddCatchTests.cmake 01 August 2020, 17:40:29 UTC
229cc48 Fix CMake add test helper for CMake 3.18.0 With CMake 3.18.0 the `add_test(NAME)` handling changed. The escaped double quotes confuse the new call. Work around this upstream change. fixes: https://github.com/catchorg/Catch2/issues/1984 17 July 2020, 21:56:33 UTC
7f21cc6 v2.13.0 12 July 2020, 18:28:38 UTC
4c85248 Fixup whitespace in TAPReporter 12 July 2020, 18:27:25 UTC
b4e2237 Remove pointless CompactReporter::getPreferences override 12 July 2020, 18:06:14 UTC
40937b6 Merge pull request #1983 from s7726/patch-1 Update catch_reporter_tap.hpp 12 July 2020, 18:00:03 UTC
0d5b131 Improve documentation for --min-duration 12 July 2020, 14:27:55 UTC
ad3b905 Document GENERATE's new usage between SECTIONs 12 July 2020, 14:24:32 UTC
b1c4565 Update catch_reporter_tap.hpp TAP format requires all results to be reported. Removed extraneous preferences function (handled by parent) Incorporated fix from 3d9e7db2e0fff8fc2edcf59d24351f3937e3ac62 Simplified total printing 12 July 2020, 08:17:37 UTC
b79a83e Modify generator tracking to allow GENERATEs between SECTIONs This means that code such as ```cpp TEST_CASE() { SECTION("first") { SUCCEED(); } auto _ = GENERATE(1, 2); SECTION("second") { SUCCEED(); } } ``` will run and report 3 assertions, 1 from section "first" and 2 from section "second". This also applies for greater and potentially more confusing nesting, but fundamentally it is up to the user to avoid overly complex and confusing nestings, just as with `SECTION`s. The old behaviour of `GENERATE` as first thing in a `TEST_CASE`, `GENERATE` not followed by a `SECTION`, etc etc should be unchanged. Closes #1938 11 July 2020, 21:16:07 UTC
89fe35d Fix how testRandomOrder.py builds tag arguments 11 July 2020, 19:32:10 UTC
115d6a1 Increase tolerances in --min-duration tests The underpowered and oversubscribed CI servers are hell. 07 July 2020, 09:36:56 UTC
9157635 Fixup single_include to be consistent with last tag Closes #1975 07 July 2020, 09:32:05 UTC
6f7c191 --min-duration is overriden by -d no 06 July 2020, 18:33:08 UTC
4eb9d37 Refactor tests for duration reporting threshold 06 July 2020, 18:02:20 UTC
53d8af8 Test for --min-duration 06 July 2020, 09:35:02 UTC
46fde0c Add --min-duration option A test runner already has a --durations option to print durations. However, this isn't entirely satisfactory. When there are many tests, this produces output spam which makes it hard to find the test failure output. Nevertheless, it is helpful to be informed of tests which are unusually slow. Therefore, introduce a new option --min-duration that causes all durations above a certain threshold to be printed. This allows slow tests to be visible without mentioning every test. 06 July 2020, 09:35:02 UTC
de103db Merge pull request #1973 from echuber2/patch-1 Escaping "*" ("times") to fix Markdown presentation 06 July 2020, 09:34:22 UTC
fedc3a7 Escaping literal "*" ("times") to fix markdown 05 July 2020, 22:04:00 UTC
c299133 v2.12.4 05 July 2020, 09:51:30 UTC
09b8017 Update FUNDING file (-Patreon, +PayPal) 04 July 2020, 18:06:27 UTC
bad3c93 Fix for macOS on ARM 01 July 2020, 17:28:50 UTC
0f05c03 v2.12.3 29 June 2020, 18:50:39 UTC
ee4538c Add OverallResultsCases element to XML reporter 28 June 2020, 20:36:08 UTC
dc7a20f Rewrite the contributing documentation 27 June 2020, 15:44:08 UTC
018dc0b Replace a TODO comment in examples 26 June 2020, 18:04:05 UTC
ad1940f Add an example of using GENERATE(table()) There are some examples on issue #850 of using this feature, but they are not easily found from the documentation. Adding them here as an example makes them more findable and ensures they keep working if the API changes. 23 June 2020, 20:55:03 UTC
5399921 Add notes on compiling the examples. This took me some time to figure out so document for others. 20 June 2020, 19:41:10 UTC
e815acd Clang-format configuration added. Some notes on the configuration options chosen: * We want `AllowShortEnumsOnASingleLine` set to `false`, but that option is clang-format-11 and up, which is not out yet. * `IndentPPDirectives` is currently inconsistent, but `AfterHash` is the preferred style in new code. * `NamespaceIndentation` is a mess, but `All` is closer to the effect we want than `Inner`. * `SpacesInParentheses` set to `true` is not ideal due to it also introducing extra spaces in preprocessor expressions, but using it is much closer to the current style than not. All in all, using this setting globally would reformat pretty much every line of code in the codebase, but it is as close as possible to the bespoke style currently used. Still, it should only be used on the diffs. Closes #1182 19 June 2020, 07:49:10 UTC
e7189f1 Make scripts/updateDocumentToC.py executable. On systems where the file system has excute permissions, this script was not marked as executable in a clean git checkout and so could be run without first changing the permissions. Fixed by setting the relevant git flag. 18 June 2020, 19:28:08 UTC
1806b21 Add explicit test for shortcircuiting behaviour of combined matchers 14 June 2020, 19:48:08 UTC
288416f Devirtualize NameAndLocation query on trackers 13 June 2020, 17:26:17 UTC
cbbebb6 Fix copy paste error in 7-arg TEMPLATE_TEST_CASE_SIG implementation Closes #1954 13 June 2020, 13:46:59 UTC
fb08596 Clarify documentation about nested generators Closes #1947 13 June 2020, 09:12:12 UTC
0614a4a Hide std::exception_ptr and friends if exceptions disabled Some compilers, e.g. the Green Hills C++ compiler, react badly to the appearance of std::exception_ptr, std::current_exception, std::rethrow_exception and std::uncaught_exception(s). To allow usage of Catch2 with these compilers when exceptions are disabled, hide the usage of std::exception_ptr etc. when compiling with CATCH_CONFIG_DISABLE_EXCEPTIONS. 12 June 2020, 21:23:55 UTC
0f12995 Fix compilation of examples 01 June 2020, 19:27:58 UTC
0807fdb Replace stray tabs with spaces 01 June 2020, 17:06:51 UTC
9500ded Improved generator tracking * Successive executions of the same `GENERATE` macro (e.g. because of a for loop) no longer lead to multiple nested generators. * The same line can now contain multiple `GENERATE` macros without issues. Fixes #1913 01 June 2020, 17:06:51 UTC
6c6ebe3 fixing UB 29 May 2020, 12:56:40 UTC
b1b5cb8 v2.12.2 25 May 2020, 13:13:18 UTC
77dc8cf Really fix use of std::result_of when invoke_result is available Closes #1934 22 May 2020, 08:05:34 UTC
ddc9f4c Avoid using std::result_of when std::invoke_result is available Closes #1934 21 May 2020, 19:39:19 UTC
bed4737 Remove obsolete comment in UnorderedEquals vector matcher 18 May 2020, 12:29:50 UTC
0e9bae1 Create a BUILD file for compatibility with bazel With this change, it's much easier for bazel projects to depend on Catch. They just need to add: - In the workspace: ``` http_archive( name = "com_github_catchorg_catch2", urls = ["https://github.com/catchorg/Catch2/archive/v2.12.1.tar.gz"], strip_prefix = "Catch2-2.12.1", sha256 = "e5635c082282ea518a8dd7ee89796c8026af8ea9068cd7402fb1615deacd91c3", ) ``` Or the appropriate version/sha256. - For the tests, assuming that `test_main.cc` contains the `CATCH_CONFIG_MAIN`: ``` cc_library( name = "test_main", srcs = ["test_main.cc"], deps = ["@com_github_catchorg_catch2//:catch2"], ) ``` 17 May 2020, 11:18:22 UTC
f133277 Add status attribute to JUnit's section reporting This brings our output inline with GTest's. We do not handle skipped tests properly, but that should be currently less important than having the attribute exist with proper value for non-skipped tests. Thanks @joda-01. Closes #1899 15 May 2020, 19:00:19 UTC
f764ee3 Document that user can only provide main in TU with CONFIG_RUNNER Closes #1851 15 May 2020, 13:57:27 UTC
c190061 Fix compilation failure when using libstdc++10 (#1929) The issue is caused by deleted `std::__detail::begin` declared in `bits/iterator_concepts.h`. This would be found by ADL, and because it is deleted, compilation would fail. This change makes it so that we SFINAE on `begin(std::declval<T>())` and `end(std::declval<T>())` being well-formed. 15 May 2020, 09:30:12 UTC
b1dcdc5 Fix invalid isspace call detected by PREfast D:\vcpkg\toolsrc\include\catch2\catch.hpp(11285): warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isspace'. D:\vcpkg\toolsrc\include\catch2\catch.hpp(11288): warning C6330: 'char' passed as _Param_(1) when 'unsigned char' is required in call to 'isspace'. ISO/IEC 9899:2011: "7.4 Character handling <ctype.h>"/1 [...] In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined. This means if isspace was passed a character like ñ it could corrupt memory without the static_cast to treat it as a positive value after integral promotion (and C libraries commonly use the int index supplied as a key into a table which result in out of bounds access if the resulting int is negative). 12 May 2020, 12:07:22 UTC
f0e596e Silence clang-tidy's hicpp-vararg (alias of coreguidelines vararg) Ideally, clang-tidy would be smart that if one alias of a warning is suppressed, then the other one is suppressed as well, but as of right now, it isn't. This means that for now we have to suppress both aliases of this warning. Opened upstream issue to fix this: https://bugs.llvm.org/show_bug.cgi?id=45859 Obviously, ideally clang-tidy would also not warn that we are calling a vararg function when it is an unevaluated magic builtin, but that also is not happening right now and I opened an issue for it: https://bugs.llvm.org/show_bug.cgi?id=45860 Closes #1921 09 May 2020, 16:23:12 UTC
594cab3 Upload conan releases to catch2 remote (instead of Catch2) At some point we moved over to catch2:catchorg (notice lowercase `c`) instead of Catch2:catchorg, but we kept uploading the released packages to the upper-cased repository... Time to fix this, and then merge them again. 06 May 2020, 18:49:26 UTC
back to top