https://github.com/philsquared/Catch

sort by:
Revision Author Date Message Commit Date
605a347 v3.0.1 17 May 2022, 20:13:36 UTC
abb669d Extend project call for Catch2 This provides some extra metadata for CPack and related tools. 17 May 2022, 20:12:44 UTC
dcafc60 Only reseed the internal RNG when a test is first entered This fixes multiple issues with random generators, with the most important one being that multiple nested generators could return values from the same sequence, due to internal implementation details of `GENERATE`, and how they interact with test case paths. The cost of doing this is that given this simple `TEST_CASE`, ```cpp TEST_CASE("foo") { auto i = GENERATE(take(10, random(0, 100)); SECTION("A") { auto j = GENERATE(take(10, random(0, 100)); } SECTION("B") { auto k = GENERATE(take(10, random(0, 100)); } } ``` `k` will have different values between running the test as a whole, e.g. with `./tests "foo"`, and running only the "B" section with `./tests "foo" -c "B"`. I consider this an acceptable cost, because the only alternative would be very messy to implement, and add a lot of brittle and complex code for relatively little benefit. If this calculation changes, we will need to instead walk the current tracker tree whenever a random generator is being constructed, check for random generators on the path to root, and take a seed from them. 17 May 2022, 19:49:26 UTC
7a2a6c6 Make Random*Generators be seedable This is a necessary step to fix issue with combining multiple random generators in one test case, with different section nesting. 17 May 2022, 15:57:21 UTC
359cd61 Rename global rng() to sharedRng() 17 May 2022, 13:43:23 UTC
9c72b30 Reseed global rng instance unconditionally 17 May 2022, 10:35:34 UTC
6044f02 Don't reseed std::srand when resetting rng state We no longer use `std::rand` anywhere, so there is no point, and it might even interfere with our users use of `std::(s)rand`. 17 May 2022, 09:54:19 UTC
5d7883b Remove leftover comment in tests 16 May 2022, 19:50:52 UTC
04a54b0 Fix release automation script 16 May 2022, 16:39:01 UTC
48f3226 Add support for retrieving generator's element as string 16 May 2022, 14:34:06 UTC
af8b54e Generators now keep track of the index of current element This might become potentially useful in the future, when we want to provide the ability to forward jump generators, to be able to simply reproduce specific input to a test. I am not yet sure how it would work, but the basic idea is that it could be similar to the `-c` switch for selecting specific `SECTION` in a test case. 16 May 2022, 09:56:21 UTC
07bec74 Use better instruction for CATCH_TRAP on ARM Macs The old instruction would cause the debugger to be stuck at the triggering source line forever, while the new one should have the expected semantics, where the debugger can then single-step, continue. or generally do things, afterwards. Closes #2422 15 May 2022, 21:22:00 UTC
316025a Properly handle startup reporter registration errors 15 May 2022, 08:35:12 UTC
33aeb60 Add check for registering multiple reporters under same name 15 May 2022, 07:54:27 UTC
fc3d11b Add Wfloat-equal to default-enabled warnings This is kinda messy, because there is no good way to signal to the compiler that some code uses direct comparison of floating point numbers intentionally, so instead we have to use diagnostic pragmas. We also have to over-suppress the test files, because Clang (and possibly GCC) still issue warnings from template instantiation even if the instantion site is under warning suppression, so the template definition has to be under warning suppression as well. Closes #2406 14 May 2022, 13:47:20 UTC
1ef65d6 Tiny fixup in Misc.tests.cpp 11 May 2022, 20:56:30 UTC
ed6b38b Specialize XML reporter's listener listing 10 May 2022, 18:58:02 UTC
5a49285 Add --list-listeners option 10 May 2022, 18:57:59 UTC
ae475a3 Optional support for listener descriptions 10 May 2022, 18:57:53 UTC
d60fbe4 Slight improvement for reporter test 10 May 2022, 18:57:50 UTC
a733b58 Replace C++23-deprecated aligned_storage_t 09 May 2022, 22:07:22 UTC
d9b0a38 Report Catch2's version in the xml reporter output 03 May 2022, 17:46:35 UTC
40c8909 Rename useColourOnPlatform => useImplementationForStream 03 May 2022, 17:04:43 UTC
91ea25e Fix use of u8-literal that would break in C++20 03 May 2022, 11:54:07 UTC
e2d07d3 Add -Wmissing-prototypes to common warnings 03 May 2022, 11:54:05 UTC
d2cb934 Add -Wmissing-variable-declarations to common warnings 03 May 2022, 11:54:03 UTC
7752229 Add -Wsuggest-destructor-override to enabled warnings 03 May 2022, 11:54:02 UTC
722c197 Enable a bunch of extra warnings 03 May 2022, 11:54:00 UTC
198808a Misc cleanups from exploring Clang warnings 03 May 2022, 11:53:55 UTC
198713e Cleanup of unused functions The cleanup also found out that custom translation for std-derived exceptions test wasn't running properly, and fixed that. We cannot enable the warning globally, because the tests contain some functions that are unused by design -- e.g. when checking stringification priority of StringMaker vs range fallback and so on. 02 May 2022, 19:32:24 UTC
b84067e Clean up .gitignore 01 May 2022, 21:10:37 UTC
332de39 Remove some useless casts 28 April 2022, 12:56:33 UTC
c410e25 Add some extra warnings 28 April 2022, 12:56:31 UTC
4c1cf4a Sorted and removed duplicates from the compiler warning list The duplicates were '-Wreturn-std-move' and '-Wunreachable-code'. 28 April 2022, 09:06:53 UTC
745cc82 Remove some old commented out CMake code 28 April 2022, 08:53:03 UTC
07dfb4b Update PARENT_SCOPE cmake module path with path to extras/ This allows projects including us directly to do e.g. `include(Catch)` and get access to the test autoregistration CMake scripts. Note that this inclusion can be done directly through `add_subdirectory`, or indirectly via `FetchContent`. Closes #1805 Closes #2026 Closes #2130 28 April 2022, 08:52:16 UTC
5e86ead Exclude doxygen docs from documentation install step We might want to keep them in at some point, but currently the doxygen docs are very incomplete and unfinished. 27 April 2022, 12:57:59 UTC
9dc2296 Document the stability guarantees of '--order rand' option 25 April 2022, 19:45:50 UTC
db57a49 Fixup ToC in command-line.md 25 April 2022, 19:39:48 UTC
4817783 Add version placeholder to the example doc in contributing.md 25 April 2022, 19:36:03 UTC
ee3bbec Improve include guard docs in contributing.md 25 April 2022, 19:33:05 UTC
431dcf3 Document Catch2's API/ABI stability policies 25 April 2022, 16:58:50 UTC
e882cb8 Document the new --skip-benchmarks flag 25 April 2022, 16:36:40 UTC
c2bc321 Add pipeline running tests under Valgrind to GitHub Action 24 April 2022, 11:34:50 UTC
ea9029c Fix pkg list name in CMake config workflow 24 April 2022, 11:34:36 UTC
c65e5b6 Add 'uses-python' label to tests using Python 24 April 2022, 11:31:28 UTC
880285b Tiny cleanup in catch_clara.cpp 24 April 2022, 11:31:25 UTC
07cdef2 Fix uninit memory in Clara tests 24 April 2022, 11:31:19 UTC
5baa29b Add test for %debug stream name 23 April 2022, 21:34:27 UTC
291b35b Added --skip-benchmarks command-line option. (#2408) Closes #2392 Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 23 April 2022, 21:14:49 UTC
f526ff0 Bump version to v3.0.0 preview 5 20 April 2022, 21:46:07 UTC
17a04f8 Always report rng seed from builtin reporters Not all reporters use a format that supports this, so TeamCity and Automake reporters still do not report it. The console reporter now reports it even on successful runs, where before it only reported the rng seed in the header, which was showed either for failed run, or for run with `-s`. CLoses #2065 19 April 2022, 08:32:13 UTC
90e6905 Remove no longer used CATCH_USE_VALGRIND cmake option 18 April 2022, 10:14:21 UTC
6bdc7e1 Remove unused function in Clara 17 April 2022, 21:30:40 UTC
7b93a20 Rename catch_stream -> catch_reusable_string_stream After everything else was split out, this name much reflects the actual contents of the file(s). 16 April 2022, 14:34:08 UTC
98bb638 Split out IStream out of catch_stream.hpp 16 April 2022, 14:33:57 UTC
05e85c5 Split out Catch::cout/cerr/clog into their own file 16 April 2022, 14:33:50 UTC
b520257 Split REMOVE_PARENS from catch_preprocessor.hpp This way, some headers can include just the new header, which transitively decreases the total include size of test_macros.hpp. 15 April 2022, 15:14:28 UTC
574d042 Push catch_preprocessor include down from test_macros header 15 April 2022, 14:40:06 UTC
c742ea9 Some IWYU include cleanups 14 April 2022, 15:16:01 UTC
a243cba Introduce type to handle reporter specs with defaults filled-in 13 April 2022, 13:02:25 UTC
79d1e82 Store IStream instance owning ptrs in reporter instances This ended up being a surprisingly large refactoring, motivated by removing a `const_cast` from `Config`'s handling of reporter streams, forced by previous commit. 13 April 2022, 13:00:50 UTC
4f09f11 Make IStream::stream non-const This way it makes much more sense from logically-const point of view, and also means that concrete implementations don't have to always have a `mutable` keyword on the stream member. 13 April 2022, 12:59:39 UTC
9934b7d Remove pointless mutable from ScopedElement's XmlWriter ptr 12 April 2022, 20:31:51 UTC
7a89916 Remove superfluous default argument from XMLWriter's constructor 12 April 2022, 20:28:40 UTC
61f8031 Use parent constructor where applicable in reporters 12 April 2022, 20:27:12 UTC
d698776 Remove unused RDBufStream type 12 April 2022, 20:22:04 UTC
f25236f Small cleanup for pluralise 11 April 2022, 18:37:54 UTC
8cdaebe struct -> class normalization for various interface types 11 April 2022, 16:32:35 UTC
1a56ba8 struct -> class normalization for matchers 11 April 2022, 11:06:54 UTC
9abe49e struct -> class normalization for reporters 11 April 2022, 10:58:58 UTC
195a6ac Use StringRefs for operation name in StringMatcherBase 11 April 2022, 08:58:45 UTC
be948f1 Add COST property to the CMakeConfig tests 10 April 2022, 19:55:52 UTC
4e006a9 Rename IStreamingReporterPtr => IEventListenerPtr This reflects the renaming of the reporter/listener base class. 10 April 2022, 19:50:51 UTC
73d8fb5 Update release-notes.md 10 April 2022, 19:43:28 UTC
0a33405 Mention Bazel support in release notes 09 April 2022, 18:55:13 UTC
cb551b4 Add default reporter for Bazel integration (#2399) When the added Bazel configuration flag is enabled, a default JUnit reporter will be added if the XML envrioment variable is defined. Fix include paths for generated config header. Enable Bazel config by default when building with Bazel. Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com> 08 April 2022, 16:01:59 UTC
4b78157 Remove Config::openStream function It has become completely vestigial, as it only ever passed-through the argument down to a different function, and being private member function, it didn't even introduce a useful compilation firewall. 07 April 2022, 10:50:20 UTC
46b3f7e Document magic %-prefixed streams 07 April 2022, 10:50:18 UTC
f9f4e58 Add missing version placeholder to --colour-mode cli option docs 07 April 2022, 10:50:14 UTC
d5bfce4 Rename config::colourMode to config::defaultConfigMode This describes the actual intention much better. 07 April 2022, 10:50:13 UTC
c43947e Fix CLI hints for colour and reporter options 07 April 2022, 10:50:10 UTC
423e1d2 Integrate the new reporter specs into Catch2 This means that the CLI interface now uses the new key-value oriented reporter spec, the common reporter base creates the colour implementation based on the reporter-specific configuration, and it also stores the custom configuration options for each reporter instance. Closes #339 as it allows per-reporter forcing of ansi colour codes. 07 April 2022, 10:50:08 UTC
3c06bcb Fix reporter parser spec to use the right key for colour-mode 06 April 2022, 19:41:45 UTC
a51fd07 Add helper for parsing the new reporter specs The new reporter spec generalizes key-value options that can be passed to the reporter, looking like this `reporterName[::key=value]*`. A key can be either Catch2-recognized, which currently means either `out` or `colour`, or reporter-specific which is anything prefixed with `X`, e.g. `Xfoo`. 05 April 2022, 13:45:54 UTC
8ac8649 Cleanup ColourMode parsing in CLI 05 April 2022, 11:42:21 UTC
d750da1 Split out colour mode string parsing into its own function 05 April 2022, 11:42:06 UTC
c045733 Add splitReporterSpec helper 05 April 2022, 10:57:33 UTC
9fea3d2 Add missing include to catch_optional.hpp 05 April 2022, 10:55:30 UTC
797c3e7 Refactor tests 31 March 2022, 20:30:38 UTC
6206db5 Fix missing licence headers 31 March 2022, 18:04:08 UTC
78e33ce Added TestCaseInfoHasher and tests. (#2394) Test case hashing includes tags and class name As the hasher involves more code now, it was split out into its own file and it got its own set of tests. Closes #2304 31 March 2022, 14:46:41 UTC
1a8a793 Refactor colour handling to prepare for per-reporter colour modes This includes always compiling the ANSI and None colour implementations, as they don't need to touch any platform specific APIs, and removing their respective compile-time configuration options. Because the Win32 colour implementation requires Win32-specific APIs, it is still hidden behind a compile-time toggle, `CATCH_CONFIG_COLOUR_WIN32` (renamed from `..._COLOUR_WINDOWS`). The commandline options for colours were also changed. The option now uses different name, and allows to select between different implementations, rather than changing whether the compiled-in colour implementation is used through "yes/no/default" options. 28 March 2022, 11:10:13 UTC
a4e4e82 Always indent test names at 2 spaces with default listing This makes the output slightly more parsable in cases where using the xml output from xml reporter is impractical, e.g. from CMake scripts. 24 March 2022, 15:03:46 UTC
6227ca3 Add tests for ColourGuard 24 March 2022, 15:02:56 UTC
081a1e9 ColourGuard is no longer constructed engaged Forcing it to be engaged explicitly, either via `op<<`, or by `ColourGuard::engage`, fixes an issue with multiple `ColourGuard`s being constructed in a single expression. Because the construction of the `ColourGuard` instances can happen in arbitrary order, colours would be applied in arbitrary order too. However, a chain of `op<<`s has strict call orders, fixing this issue. 24 March 2022, 15:02:54 UTC
4d8acaf Rename isStdout => isConsole and add doccomment 24 March 2022, 15:02:51 UTC
cf6dd93 Add test for `FatalConditionHandler` and stack unwinding Signed-off-by: Kochetkov, Yuriy <yuriyx.kochetkov@intel.com> 24 March 2022, 14:49:02 UTC
2ce64d1 Fix disengage failure logs for FatalConditionHandlerGuard FatalConditionHandlerGuard is used within RunContext::invokeActiveTestCase(). The intent of this guard is to avoid binary crash without failed test being reported. Still in case FatalConditionHandlerGuard destructor being called during stack unwinding AND finds unexpected top-level filter for SEH unhandled exception, the binary may still crash. As result of such crash the original exception details are being hidden. As the Catch2 provides only `CATCH_CATCH_ANON` macro, with no access to exception details by design, looks like the best way to handle issue is to: - state requirements explicitly by `noexcept` specifier - use `Catch::cerr()` to print out possible issue notification Signed-off-by: Kochetkov, Yuriy <yuriyx.kochetkov@intel.com> 24 March 2022, 14:49:02 UTC
7882f73 Remove unnecessary casts May break the logic in case of WinAPI changes with no warnings Signed-off-by: Kochetkov, Yuriy <yuriyx.kochetkov@intel.com> 24 March 2022, 14:49:02 UTC
back to top