Commit Graph

722 Commits

Author SHA1 Message Date
Martin Hořeňovský
05d4ec62c8
Add common ReporterBase as parent of the helper bases
This is useful as a centralized place for handling common reporter
problems like handling output streams, and soon also colour impl
handling.
2022-03-06 16:28:22 +01:00
Martin Hořeňovský
529eec97bb
Mention CMake configure options in release notes 2022-02-23 14:16:36 +01:00
Martin Hořeňovský
72f0372664
Add tests for CMake configure toggles passing to Catch2 build 2022-02-20 19:32:30 +01:00
John Beard
0c722564c3 Examples: remove references to catch_default_main
catch_default_main.hpp was removed in db32550898

The example 000-CatchMain.cpp is no longer compiled, but is still
present in the examples and is still references by other example
files. Remove the file and references to it, as they are confusing.
2022-02-20 13:10:42 +01:00
Martin Hořeňovský
7cf2f88e50
Add small missing things to release notes 2022-02-14 18:22:11 +01:00
Martin Hořeňovský
c912f62fc4
Remove Windows.h related defines 2022-02-05 16:21:06 +01:00
Martin Hořeňovský
aa3c7be434
Fix ToC in CLI documentation 2022-02-05 16:14:47 +01:00
Martin Hořeňovský
b0279e0c14
Remove mention of CATCH_CONFIG_MAIN from docs/configuration.md 2022-02-05 14:55:01 +01:00
Martin Hořeňovský
b5dbdc858d
Link to the v2-v3 migration docs from release notes 2022-01-28 23:55:27 +01:00
Simon Weis
5121660e7f Add OpenALpp as an open source library that uses Catch2 2022-01-22 21:33:19 +01:00
Martin Hořeňovský
39d3de17f3
Fix mentions of CATCH_INSTALL_HELPERS
Fixes #2347
2022-01-06 23:37:44 +01:00
Martin Hořeňovský
244680d512
Update release-process.md for v3 2022-01-03 23:30:39 +01:00
Martin Hořeňovský
57c9c935ee
Update release notes 2022-01-03 23:11:55 +01:00
Martin Hořeňovský
d3199c42c2
Redo reporter CLI and reporter-specific docs
Closes #2259
2022-01-03 20:38:13 +01:00
Martin Hořeňovský
eeee4a49af
Remove short flags from --list-tests and --list-tags 2022-01-02 21:23:29 +01:00
Martin Hořeňovský
0d1bdea69f
Remove all mentions of the removed --list-test-names-only flag 2022-01-02 21:23:26 +01:00
Martin Hořeňovský
3ab981fa21
Add documentation for the --verbosity option 2022-01-02 21:02:43 +01:00
Martin Hořeňovský
54e89e8364
Update release notes to account for recent changes 2022-01-01 23:50:12 +01:00
Martin Hořeňovský
93882f7fab Support '-' as output path for stdout 2022-01-01 14:16:12 +01:00
Martin Hořeňovský
4752545a69 Add version placeholders to the reporter docs 2022-01-01 14:16:12 +01:00
Martin Jeřábek
ccd67b293d Add support for multiple parallel reporters
This requires a bunch of different changes across the reporter
subsystem.

* We need to handle multiple reporters and their differing
  preferences in `ListeningReporter`, e.g. what to do when
  we mix reporters that capture and don't capture stdout.
* We need to change how the reporter is given output and
  how we parse reporter's output destination from CLI.
* Approval tests need to handle multireporter option
2022-01-01 14:02:23 +01:00
Martin Hořeňovský
f00b6e2019
Add more tests for various less common tag-related cases 2021-12-28 00:22:53 +01:00
Alan Jowett
cde26de803
Add buildAndTest.cmd for Windows users (#2338)
* Add buildAndTest.cmd for Windows users

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2021-12-18 23:52:35 +01:00
Martin Hořeňovský
3cc0c033e4
Allow enabling multiple warnings in one invocation 2021-12-18 20:50:05 +01:00
Martin Hořeňovský
840acedf62
Implement warning for unmatched test specs 2021-12-18 20:50:03 +01:00
Martin Hořeňovský
9f2dca5384
Exit with non-0 return code if no tests were run
A new flag, `--allow-running-no-tests` was added to override this
behaviour if exit code of 0 was desired.

This change also made `-w NoTests` obsolete, and so it has been
removed.
2021-12-18 20:50:00 +01:00
Martin Hořeňovský
602e484f02
Rename reportInvalidArguments -> reportInvalidTestSpec
This is has been what it actually does for a long time, but it
has not been renamed earlier due to API compatibility.
2021-12-18 20:49:50 +01:00
Martin Hořeňovský
08939cc8bb
Error out early if invalid test specs are provided 2021-12-18 20:49:47 +01:00
Tristan Stenner
9952f29f01 Fix link in event-listeners.md 2021-11-22 11:44:36 +01:00
Martin Hořeňovský
fabe614ba8
Rewrite own-main.md for v3 2021-11-19 15:52:32 +01:00
Martin Hořeňovský
acdb85c398
Add FAQ page to the documentation 2021-11-19 15:23:50 +01:00
Martin Hořeňovský
726fdd7f8e
Update known-limitations.md
Removed 3rd party bugs for no-longer supported compiler versions,
reworded section on parallel test execution to take into account
sharding.
2021-11-19 00:32:59 +01:00
Martin Hořeňovský
0ccb1c30c6
Rewrite event listener docs and add event documentation 2021-11-18 23:05:45 +01:00
Martin Hořeňovský
dd12ce8141
Rewrite tutorial to shorten BDD section and mention generators 2021-11-16 23:46:23 +01:00
Martin Hořeňovský
61489e863e
Fixup ToC link to 3.0.1 release notes 2021-11-16 23:46:19 +01:00
Martin Hořeňovský
2287d225e5
Mention that RangeGenerator works on half open ranges
Closes #2145
2021-11-15 23:52:26 +01:00
Martin Hořeňovský
4eb00afe69
Add allowing tests with same name to release notes 2021-11-15 23:18:55 +01:00
Martin Hořeňovský
e86f84b8ef
Mention that run == iteration in benchmarking docs 2021-11-15 23:09:18 +01:00
Martin Hořeňovský
67caef6f45
Mention STATIC_CHECK in release notes 2021-11-15 13:04:08 +01:00
Morwenn
f41d761674
Add STATIC_CHECK and STATIC_CHECK_FALSE (#2318) 2021-11-15 00:28:27 +01:00
Martin Hořeňovský
62d8913d67
Cumulative reporter base records benchmark results 2021-11-09 11:52:50 +01:00
Martin Hořeňovský
8780425385
Make reporter lookup case insensitive, registration case preserving
Previously registration was case preserving, but lookup used
lowercased reporter name, so a reporter whose name contained
upper case character could not be requested by the user.
2021-11-09 11:50:03 +01:00
Martin Hořeňovský
514206df36
Add accept-many Clara lambdas to release notes 2021-10-27 20:54:49 +02:00
Martin Hořeňovský
becab0cf74
Add test sharding to the release notes 2021-10-27 20:49:29 +02:00
Ben Dunkin
3087e19cc7 Allow test sharding for e.g. Bazel test sharding feature
This greatly simplifies running Catch2 tests in single binary
in parallel from external test runners. Instead of having to
shard the tests by tags/test names, an external test runner
can now just ask for test shard 2 (out of X), and execute that
in single process, without having to know what tests are actually
in the shard.

Note that sharding also applies to test listing, and happens after
tests were ordered according to the `--order` feature.
2021-10-27 17:24:30 +02:00
Martin Hořeňovský
bf5c58adf6
The limit on TEMPLATE* test cases is actually reachable 2021-10-21 15:52:07 +02:00
Martin Hořeňovský
36b4a71ff0
Pick release notes for 2.13.7 2021-10-10 22:23:14 +02:00
Martin Hořeňovský
ed1f343a41
Provide random-device option for --rng-seed and make it default 2021-10-08 21:35:45 +02:00
Martin Hořeňovský
426954032f
Rename Contains string matcher builder to ContainsSubstring
The problem with the old name was that it collided with the
range matcher `Contains`, and it was not really possible to
disambiguate them just with argument types.

Closes #2131
2021-09-27 21:28:33 +02:00
Martin Hořeňovský
e8e28ba401
Remove obsolete documentation page 2021-09-23 23:42:16 +02:00
Bernhard Manfred Gruber
ee1435793e add alpaka and LLAMA to Catch2 users 2021-09-23 12:39:56 +02:00
Martin Hořeňovský
e4719fb51c
Update release notes with new fixes, improvements and breaking changes 2021-09-07 22:00:57 +02:00
Martin Hořeňovský
ca8546efc6
Mention C++14 baseline in contributing documentation 2021-08-19 19:16:12 +02:00
Martin Hořeňovský
4113a12c69
Fix Wreserved-identifier for UDLs in Catch2
See #578
2021-08-19 19:15:46 +02:00
Martin Hořeňovský
88c27ffaf2
Mention CATCH_MOVE and CATCH_FORWARD in contributing docs 2021-08-16 16:22:21 +02:00
Geoffrey M Gunter
7040f03b54 Fix typo in docs/matchers.md
There were a few instances in matchers.md where header files erroneously
had a .h file extension instead of .hpp
2021-08-16 15:19:49 +02:00
Martin Hořeňovský
1554251f97
Fix typo in docs/cmake-integration.md 2021-08-11 22:57:36 +02:00
Kin Numaru
74db06199b
Rename contrib/ to extras/ in the docs
The directory has been renamed in 918aa32 but the doc was not updated
yet.
2021-08-10 10:41:16 +02:00
Martin Hořeňovský
52a3144145
Update users docs 2021-08-08 23:42:24 +02:00
Martin Hořeňovský
a62974eb6a
Update why-catch.md 2021-08-08 23:42:17 +02:00
Martin Hořeňovský
79c2daa4a0
Update tutorial docs 2021-08-03 13:53:44 +02:00
Martin Hořeňovský
1e0dc61d16
Update CMake integration documentation 2021-07-31 21:46:11 +02:00
Martin Hořeňovský
02e5951f11
Add major changes and their motivation to v2 -> v3 migration docs
Closes #2135
2021-07-29 23:19:48 +02:00
Martin Hořeňovský
1ecc79bb56
Fix superfluous uppercase C in matcher docs 2021-07-28 23:38:27 +02:00
Martin Hořeňovský
73cae40a90
Fix WithinULP matcher factory name in docs 2021-07-28 23:37:23 +02:00
Robert Andrzejuk
6c4c961207 Update migrate-v2-to-v3.md
#2135 Adding "Changes overview" to "Migrating from v2 to v3" doc
2021-07-28 23:18:50 +02:00
Martin Hořeňovský
3d1cf95b32
Fix ulp distance calculation for numbers with different signs
This is a simplification of the fix proposed in #2152, with the
critical function split out so that it can be tested directly,
without having to go through the ULP matcher.

Closes #2152
2021-07-27 21:04:41 +02:00
Vishesh Yadav
6f21a3609c Update CMake doc for automatic test registration
`FetchContent` doesn't include `contrib` directory as part of `CMAKE_MODULE_PATH`. This results into `include(Catch)` to fail. This patch just updates the documentation describing how to do include the path, so the new users don't have to figure this out themselves.

Source: https://github.com/catchorg/Catch2/issues/2103#issuecomment-730626324
2021-06-30 00:12:36 +02:00
Martin Hořeňovský
35cba5486d
Remove mention of ANON_TEST_CASE from documentation
It was removed from v3, because the standard `TEST_CASE` can now be
anonymous as well.
2021-05-10 21:49:45 +02:00
Jozef Grajciar
eb911aa995
Suppress failure of CHECKED_IF and CHECKED_ELSE (#2187)
Resolves #1390

Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2021-05-10 21:42:47 +02:00
Martin Hořeňovský
313071e8fe
Pick release notes for v2.13.6 2021-05-09 23:45:00 +02:00
Martin Hořeňovský
f9bb2668e4
Pick release notes for v2.13.5 2021-05-09 23:43:05 +02:00
Martin Hořeňovský
342dd3445c
Pick documentation changes for 2.13.4 2021-05-09 18:05:31 +02:00
Reinhold Gschweicher
48f220b68a
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
2021-05-09 18:05:25 +02:00
Julien Brianceau
e8cdfdca87
Fix typos in the code base (#2206)
Note that only documentation and comments are impacted by this change.
2021-04-07 20:43:50 +02:00
Martin Hořeňovský
4b5812e932
Remove trailing whitespace from test-cases-and-sections.md 2021-03-23 13:02:24 +01:00
Martin Hořeňovský
9f44bd57f1
Add more documentation to BDD macros 2021-03-23 13:02:07 +01:00
matthew-limbinar
6734c0aa64
Expand documentation for BDD test macros (#2179) 2021-03-23 12:20:33 +01:00
Jozef Grajciar
037ddbc75c Fix introduced in version placeholders
Resolves #2082
2021-03-13 10:26:12 +01:00
Martin Hořeňovský
6d803cba5d
Add example of negated tag selection to the CLI test spec docs
Close #2180
2021-02-25 15:54:27 +01:00
Martin Hořeňovský
c12170ff69
Extend release notes
Included some changes that weren't updated at the time of merging,
and also results of a new runtime benchmark.
2021-02-13 15:34:38 +01:00
Rohit Goswami
3eade52fc0 users: Add d-SEAMS 2021-02-04 22:53:00 +01:00
Florian Berchtold
045feff834
Update cmake-integration.md (#2115)
* Update cmake-integration.md

CMake related, mainly more modern and provide an executable to be correct

Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2020-12-28 13:41:55 +01:00
Alex Voicu
ce54ec185f
Add the HIP CPU Runtime as a Catch2 user (#2123) 2020-12-18 13:23:17 +01:00
Norbert Wenzel
be813faaa0 Fix typo 2020-12-12 15:31:20 +01:00
Emil Jarosz
b9fe8a208f
Update cmake-integration.md
The "contrib" folder was renamed to "extras", but the name wasn't updated in the documentation.
2020-11-30 13:10:26 +00:00
Martin Hořeňovský
3bd5fd6bc5
Mention GENERATE decaying inputs in release notes docs 2020-11-26 18:35:02 +01:00
Martin Hořeňovský
33bcdc6bf5
Picked release notes for v2.13.3 2020-11-02 14:42:24 +01:00
laoshanxi
ed9ef85a34
Add AppMesh to Open Source projects using Catch 2020-11-02 14:42:13 +01:00
Augustas
dc3c22f9ec
update from Hudson to Jenkins
Hudson is discontinued in 2016. Changed to Jenkins
2020-10-31 21:48:28 +02:00
Martin Hořeňovský
735f46ed6d
Link to the migration docs from main readme and docs/readme 2020-10-31 09:08:58 +01:00
Martin Hořeňovský
39aabede62
Add a short documentation for migrating from v2 to v3 2020-10-31 08:14:50 +01:00
Clare Macrae
40b9df567f Add missing cmake option to fix buildAndTest.sh
Note that the documentation was updated automatically, by running:
 ./tools/scripts/updateDocumentSnippets.py
2020-10-28 11:38:06 +01:00
Clare Macrae
c6352c3e1f Embed the script buildAndTest.sh inside the docs 2020-10-28 11:38:06 +01:00
Clare Macrae
f57689f888 Fix minor typo in docs. 2020-10-28 11:38:06 +01:00
Martin Hořeňovský
0c7f96ba63
Update documentation not to reference master branch 2020-10-21 19:59:59 +02:00
Martin Hořeňovský
b9853b4b35
Bump version to v3.0.0 preview 3 2020-10-08 15:26:30 +02:00
Martin Hořeňovský
853565bfb8
Pick release notes for v2.13.2 2020-10-08 12:51:07 +02:00
Matt Godbolt
b841650253
Add missing syntax highlighting tag 2020-10-08 11:37:31 +02:00
Martin Stump
c522e88afa
Add REPORTER and OUTPUT_* args 2020-10-08 11:35:42 +02:00
Florian Berchtold
b1df96e7e4
Docu/Show how to use CMake FetchContent (#2028) 2020-10-08 11:35:18 +02:00
kotaiadam
9e172c707e
fixes bug in example - undeclared identifier
j was not declared in `SECTION("two")`
2020-10-08 11:34:25 +02:00
Martin Hořeňovský
340ff00058
Rewrite contributing docs for v3 2020-10-06 12:36:20 +02:00
Martin Hořeňovský
d1625f30b1
Pick release notes from v2.13.1 2020-09-07 14:34:36 +02:00
mattkurz
08fb5cbab2
Fix typo in generators docs 2020-09-07 13:02:38 +02:00
Martin Hořeňovský
33ad1ee2ac
Split EventListener base from streaming_base.hpp
The base was also renamed from `TestEventListenerBase` to
`EventListenerBase`, and modified to derive directly from the
reporter interface, rather than deriving from `StreamingReporterBase`.
2020-08-29 19:09:54 +02:00
Martin Hořeňovský
6efeecc179
Cherry-pick doc updates for v2.13.0 2020-07-26 15:14:38 +02:00
Martin Hořeňovský
a004423c7f
Improve documentation for --min-duration 2020-07-26 14:06:52 +02:00
Martin Hořeňovský
4b344f11ea
Document GENERATE's new usage between SECTIONs 2020-07-26 14:06:34 +02:00
John Bytheway
80b0d6975c
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.
2020-07-26 10:47:53 +02:00
Eric Huber
36131f7ffa
Escaping literal "*" ("times") to fix markdown 2020-07-24 22:36:58 +02:00
Martin Hořeňovský
f52018205d
Cherry pick release notes for v2.12.4 2020-07-24 22:36:13 +02:00
Martin Hořeňovský
e28018c659
Cherry pick release notes for v2.12.3 2020-07-24 22:33:59 +02:00
Martin Hořeňovský
2a25a267ea
Cherry pick release notes for v2.12.2 2020-07-24 22:33:26 +02:00
Richard Ash
2840ce1e70
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.
2020-07-22 21:49:54 +02:00
Richard Ash
ed9be5a00b
Add notes on compiling the examples.
This took me some time to figure out so document for others.
2020-07-22 21:43:53 +02:00
Martin Hořeňovský
314bb7e632
Clarify documentation about nested generators
Closes #1947
2020-07-22 21:18:49 +02:00
Martin Hořeňovský
4394d3ae65
Translate exceptions by const reference instead of plain ref 2020-05-20 08:15:27 +02:00
Martin Hořeňovský
e867ce7769
Fix missing backticks on release notes
Closes #1932
2020-05-15 10:54:20 +02:00
Martin Hořeňovský
f7fbbac601
Update release notes for v3 2020-05-14 14:57:22 +02:00
Martin Hořeňovský
ddde2f5e33
Remove obsolete configuration macros from the documentation 2020-05-14 14:52:33 +02:00
Martin Hořeňovský
d5e87eabbb
Add provided generic matchers to the documentation 2020-05-14 14:48:48 +02:00
Martin Hořeňovský
04c171f91f
Update CATCH_CONFIG_WINDOWS_CRTDBG docs to reflect new distribution 2020-05-06 18:17:51 +02:00
Martin Hořeňovský
31ff89709f
Pick docs for v2.12.1 2020-05-03 07:54:07 +02:00
Martin Hořeňovský
4aefbbcd02
Pick docs for v2.12.0 2020-05-03 07:49:05 +02:00
Martin Hořeňovský
bbbc7a0d7f
Fix CATCH_CONFIG_CPP17_UNCAUGHT_EXCEPTION interaction with feature macro 2020-05-01 20:26:40 +02:00
Martin Hořeňovský
89fab65382
Update documentation for --order 2020-05-01 14:46:14 +02:00
Phoebe
46cc551b7a
Add vcpkg installation instructions (#1898)
* Add vcpkg installation instructions

* Add index
2020-05-01 09:31:41 +02:00
Mark Gillard
f34aacfe5f
Added toml++ to opensource-users.md 2020-05-01 09:31:12 +02:00
Mark Gillard
0d3e933d71
Fix alphabetical ordering of opensource-users.md 2020-05-01 09:31:03 +02:00
Martin Hořeňovský
656b15d37b
Pick doc changes for v2.11.3 2020-05-01 09:28:17 +02:00
Martin Hořeňovský
08f8a81b2c
Picking v2.11.2 docs changes 2020-04-30 21:44:16 +02:00
Julius Hülsmann
38a0dfca6d
Update tutorial.md
Fix: typo; remove trailing ","
2020-04-29 21:17:54 +02:00
Julius Hülsmann
b014d988fe
Update slow-compiles.md
Add missing "."
2020-04-29 21:17:30 +02:00
magnus.ornebring
7a0f8ff4b8
Add king as user 2020-04-29 16:55:03 +02:00
Martin Hořeňovský
4d63c36402
Update release notes with matcher changes 2020-03-29 14:57:29 +02:00
Martin Hořeňovský
ab0ca2f566
Rename some matcher-related files
The two changes are
`catch_matchers_templates` -> `catch_matchers_templated` and
`catch_matchers_generic` -> `catch_matchers_predicate`. The former
is mostly cosmetic, but the second was previously significantly
misleading, and as the library is now to be consumed by including
specific headers, this needed to be fixed.
2020-03-27 10:24:08 +01:00
Martin Hořeňovský
3a3efebd16
Add IsEmpty and SizeIs matchers for ranges/containers
`SizeIs` can accept both `size_t` and a matcher. In the first case,
it checks whether the size of the range is equal to specified size.
In the second case, it checks whether the provided matcher accepts
the size of the range.
2020-03-27 10:24:08 +01:00
Martin Hořeňovský
c2daf468bb
Standardize matcher headers to use .hpp suffix 2020-03-27 10:22:25 +01:00
Martin Hořeňovský
64d7f9b98a
New and hopefully improved documentation for matchers 2020-03-27 10:22:25 +01:00
Martin Hořeňovský
a15ffb735d
Make ListeningReporter final
In general, for Catch2 v3 we are making virtual types `final`,
unless they were explicitly designed to be derived-from.
`ListeningReporter` is definitely not designed to be derived-from.
2020-03-09 21:15:30 +01:00
Martin Hořeňovský
3bb9fcd916
Remove trailing semi in REGISTER_TEST_CASE 2020-02-21 23:10:01 +01:00
Martin Hořeňovský
cf6575576f
Start fixing up Matchers: namespaces, composition ops
This commit also forbids composing lvalues of composed matchers, as
per previous deprecation notice. I do not expect this to be contentious
in practice, because there was a bug in that usage for years, and
nobody complained.
2020-02-20 13:03:30 +01:00
Tristan Stenner
6a2c025bfc
Add command line option 'never' to --wait-for-keypress (#1866)
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2020-02-16 16:11:11 +01:00
Clare Macrae
442283ee11
Add link to list of commercial user projects 2020-02-16 16:05:18 +01:00
Clare Macrae
3f81dd753a
Fix typo in link in docs 2020-02-16 16:05:08 +01:00
Martin Hořeňovský
f8794634c2
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.
2020-02-16 16:02:31 +01:00
khyperia
3c7e737a7b
Allow configuring of benchmark warmup time 2020-02-16 15:44:23 +01:00
khyperia
e880da93bd
Make CATCH_BREAK_INTO_DEBUGGER be user-configurable 2020-02-16 15:27:21 +01:00
Martin Hořeňovský
32617f42d0
Cherry-pick release notes for v2.11.1 2020-02-16 15:11:30 +01:00