https://github.com/philsquared/Catch

sort by:
Revision Author Date Message Commit Date
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
89f5f84 Provide path of the cmake scripts to conan 23 April 2020, 16:11:41 UTC
2e61d38 v2.12.1 --- Fixes --- * Vector matchers now support initializer list literals better --- Improvements --- * Added support for `^` (bitwise xor) to `CHECK` and `REQUIRE` 21 April 2020, 17:30:38 UTC
5c9f09e Add support for bitwise xor to the decomposer 21 April 2020, 17:27:12 UTC
f4fc2da Fixup template type argument inference for vector matchers 21 April 2020, 17:09:45 UTC
cfb6956 v2.12.0 --- Improvements --- * Running tests in random order (`--order rand`) has been reworked significantly (#1908) * Given same seed, all platforms now produce the same order * Given same seed, the relative order of tests does not change if you select only a subset of them * Vector matchers support custom allocators (#1909) * `|` and `&` (bitwise or and bitwise and) are now supported in `CHECK` and `REQUIRE` * The resulting type must be convertible to `bool` --- Fixes --- * Fixed computation of benchmarking column widths in ConsoleReporter (#1885, #1886) * Suppressed clang-tidy's `cppcoreguidelines-pro-type-vararg` in assertions (#1901) * It was a false positive trigered by the new warning support workaround * Fixed bug in test specification parser handling of OR'd patterns using escaping (#1905) --- Miscellaneous --- * Worked around IBM XL's codegen bug (#1907) * It would emit code for _destructors_ of temporaries in an unevaluated context * Improved detection of stdlib's support for `std::uncaught_exceptions` (#1911) 21 April 2020, 14:33:15 UTC
e59fc2c Fix build with CATCH_CONFIG_DISABLE_EXCEPTIONS enabled 21 April 2020, 13:31:15 UTC
4e41714 Support bitand and bitor in REQUIRE/CHECK This means that bit-flag-like types with conversion to bool can be asserted on, like so `REQUIRE(var & Flags::AddNewline)`. 21 April 2020, 09:00:08 UTC
37cbf4a Add more tests for test spec parser Originally the tests were from #1912, but as it turned out, the issue was somewhere else. Still, the inputs provided were interesting, so they are now part of our test suite. 17 April 2020, 19:19:18 UTC
38f897c Support custom allocators in vector Matchers (#1909) 16 April 2020, 13:36:54 UTC
fa4a93e Update documentation for --order 15 April 2020, 14:20:05 UTC
6fbe5ef Use macro to determine whether std::uncaught_exceptions is available Catch assumes std::uncaught_exceptions is available whenever C++17 is available, but for macOS versions older than 10.12 this is not the case. Instead of checking the C++ version, use a macro to check whether the feature is available. 14 April 2020, 21:03:58 UTC
bad0fb5 Refactor implementation of hashed random order test sorting 14 April 2020, 14:39:48 UTC
a2fc7cf Randomize test for subset invariant random ordering of tests Also removed the iterative checking that seeds 1-100 do not create the same output, because it used too much runtime. 14 April 2020, 14:38:10 UTC
da9e3ee Add test for consistent random ordering 14 April 2020, 10:47:36 UTC
f696ab8 Change random test shuffling technique Previously a random test ordering was obtained by applying std::shuffle to the tests in declaration order. This has two problems: - It depends on the declaration order, so the order in which the tests will be run will be platform-specific. - When trying to debug accidental inter-test dependencies, it is helpful to be able to find a minimal subset of tests which exhibits the issue. However, any change to the set of tests being run will completely change the test ordering, making it difficult or impossible to reduce the set of tests being run in any reasonably efficient manner. Therefore, change the randomization approach to resolve both these issues. Generate a random value based on the user-provided RNG seed. Convert every test case to an integer by hashing a combination of that value with the test name. Sort the test cases by this integer. The test names and RNG are platform-independent, so this should be consistent across platforms. Also, removing one test does not change the integer value associated with the remaining tests, so they remain in the same order. To hash, use the FNV-1a hash, except with the basis being our randomly selected value rather than the fixed basis set in the algorithm. Cannot use std::hash, because it is important that the result be platform-independent. 14 April 2020, 10:47:36 UTC
5d32ce2 Fix bug in test spec parser handling of escaping in ORed patterns It did not clear out all of its internal state when switching from one pattern to another, so when it should've escaped `,`, it took its position from its position in the original user-provided string, rather than its position in the current pattern. Fixes #1905 12 April 2020, 16:48:52 UTC
035a062 Remove usage of __builtin_constant_p under IBM XL 10 April 2020, 18:55:23 UTC
d399a30 Suppress clang-tidy warning about vararg usage in assertion macros CATCH_INTERNAL_IGNORE_BUT_WARN() introduced with b7b346c triggers clang-tidy warning 'cppcoreguidelines-pro-type-vararg' for every usage of assertion macros like CHECK() and REQUIRE(). Silence it via NOLINT in the '#if defined(__clang__)' block only, as clang-tidy honors those. 02 April 2020, 18:45:57 UTC
b8ce814 Add vcpkg installation instructions (#1898) * Add vcpkg installation instructions * Add index 31 March 2020, 17:12:10 UTC
6260962 Added toml++ to opensource-users.md 29 March 2020, 12:21:57 UTC
b4c8967 Fix alphabetical ordering of opensource-users.md 29 March 2020, 12:21:57 UTC
7900fb3 C-header updates 28 March 2020, 17:00:42 UTC
01bdfe3 Change PARSE_CATCH_TESTS_ADD_FIXTURE_IN_TEST_NAME conditional. When no TEST_CASE_METHOD function, there is no fixture to get. 27 March 2020, 08:55:06 UTC
e5c9a58 Fixed typo in "benchmark name" column width calculation. Closes #1885. 26 March 2020, 09:31:35 UTC
255aa5f v2.11.3 19 March 2020, 12:50:19 UTC
3a33315 Fix compilation error when lambdas are used in assertions This is a partial revert of b7b346c3e5603. 19 March 2020, 12:32:45 UTC
5f94c8d v2.11.2 19 March 2020, 11:37:51 UTC
695a356 Move all scripts to Python3 19 March 2020, 11:36:30 UTC
020b655 Update wandbox script to use https endpoint and Python3 19 March 2020, 11:32:34 UTC
5561d03 Different approach to proper colouring of filters 19 March 2020, 10:08:01 UTC
3a15315 Switch back to uncolored output after printing filters After printing the list of filters, switch back from yellow to black before printing a newline to avoid the remaining output to be colored in yellow. 19 March 2020, 10:08:01 UTC
b7b346c Make warnings in assertions fire for GCC/Clang again The old code caused warnings to fire under MSVC, and Clang <3.8. I could not find a GCC version where it worked, but I assume that it did at some point. This new code causes all of MSVC, GCC, Clang, in current versions, to emit signed/unsigned comparison warning in test like this: ```cpp TEST_CASE() { int32_t i = -1; uint32_t j = 1; REQUIRE(i != j); } ``` Where previously only MSVC would emit the warning. Fixes #1880 19 March 2020, 08:45:41 UTC
9e09d79 Update tutorial.md Fix: typo; remove trailing "," 18 March 2020, 14:36:19 UTC
7048c2c Update slow-compiles.md Add missing "." 18 March 2020, 14:35:56 UTC
6f77d59 Add king as user 11 March 2020, 08:32:16 UTC
022b61f Don't cast nanoseconds to integers when writing output 08 March 2020, 11:10:44 UTC
87b5bf7 include <iterator> in catch_stats.hpp needed for std::back_inserter on some platforms 24 February 2020, 18:36:34 UTC
81d52c4 Specialize CATCH_TRAP() for iOS + thumb instruction set combo Fixes #1862 15 February 2020, 20:45:09 UTC
200b8b6 Add command line option 'never' to --wait-for-keypress (#1866) Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 15 February 2020, 19:42:57 UTC
e70fd2a Variables made const-ref. 08 February 2020, 13:27:40 UTC
36170d6 stdio.h replaced with cstdio. 08 February 2020, 13:27:40 UTC
917e92c Add link to list of commercial user projects 07 February 2020, 14:33:55 UTC
f549507 Fix typo in link in docs 07 February 2020, 14:33:35 UTC
b3b0721 Merge pull request #1854 from neheb/patch-1 catch_compiler_capabilities.h: use proper math define 03 February 2020, 10:26:31 UTC
2652bb8 Cleanup nextafter workaround 03 February 2020, 09:05:23 UTC
1715b6b Check for Windows instead of WIN32 for wmain entry point Closes #1849 03 February 2020, 08:33:42 UTC
f20a9db Fix significant bug with storing composed matchers Given that in the 2 or so years that matchers are thing nobody complained, it seems that people do not actually write this sort of code, and the possibility will be removed in v3. However, to avoid correctness bugs, we will have to support this weird code in v2. 01 February 2020, 20:06:07 UTC
273c3f8 Add missing ToC entry in release notes 01 February 2020, 19:24:53 UTC
6a3d0dc Add a test for custom debug break macros See #1846 01 February 2020, 19:18:05 UTC
ccb1f70 Make CATCH_BREAK_INTO_DEBUGGER be user-configurable 01 February 2020, 16:01:50 UTC
4a5bc0f Make CATCH_BREAK_INTO_DEBUGGER be user-configurable 01 February 2020, 11:20:40 UTC
f96e89e catch_compiler_capabilities.h: use proper math define C++11 math requires _GLIBCXX_USE_C99_MATH_TR1 to be true with gcc/clang. Also fixes an issue with uClibc-ng where __UCLIBC__ is defined in features.h but that is not included here and is thus no-op. 01 February 2020, 06:20:59 UTC
481f54b Make hidden tags behave identically (#1847) Add both `[.]` and `[!hide]` tags when registering a hidden test case, as per documentation. Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 31 January 2020, 20:44:06 UTC
2d172dc Some refactorings: - Overrides added - usages of push_back() replaced with emplace_back() - Loop variable made const-refernce - NULL replaced with nullptr - Names used in the declaration and definition unified - size() replaced with empty - Identical cases merged 25 January 2020, 08:01:04 UTC
587a20b Removed unneeded 'using uchar = unsigned char' 24 January 2020, 13:26:22 UTC
bff44f8 Merge pull request #1831 from matt77hias/master Added <random> include for std::uniform_int_distribution 14 January 2020, 13:05:50 UTC
4ea74ff Added <random> include for std::uniform_int_distribution 14 January 2020, 11:48:09 UTC
d10b9bd v2.11.1 28 December 2019, 20:24:04 UTC
55794e9 Avoid detecting Clang as having MSVC's traditional preprocessor Fixes #1806 28 December 2019, 17:57:24 UTC
fa6211b catch_debugger.h - implement break into debugger assembler instructions for iOS 23 December 2019, 20:26:13 UTC
4e90f91 catch_console_colour.cpp - adjust useColourOnPlatform for iOS 23 December 2019, 20:26:13 UTC
0c59cc8 catch_debugger.cpp - debugger detection is identical on Mac OS X and iOS 23 December 2019, 20:26:13 UTC
e4004e0 Provide const overload of ObjectStorage::stored_object() Fixes #1820 23 December 2019, 20:22:32 UTC
6c9a255 Fix forwarding in SingleValueGenerator and generator creation Fixes #1809 15 December 2019, 19:50:43 UTC
9a89631 Update single header generation script to warn about unused headers 21 November 2019, 15:22:04 UTC
cfba9dc Fix wrong namespacing of benchmarking constructor helpers 21 November 2019, 15:22:04 UTC
a537cca Suppress using-namespace lint in GENERATE* macros Closes #1799 16 November 2019, 16:39:28 UTC
e1c9d55 v2.11.0 15 November 2019, 14:06:17 UTC
d512dec Mention the sonarqube reporter in release process 15 November 2019, 13:59:35 UTC
back to top