Commit Graph

484 Commits

Author SHA1 Message Date
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
Joe Burzinski
0fbf4f3e15
Fix wrong namespacing of benchmarking constructor helpers 2020-02-13 16:15:50 +01:00
Martin Hořeňovský
13e01d273a
Cherry pick v2.11.0 release notes and docs 2020-02-13 15:30:46 +01:00
Martin Hořeňovský
cd7d7a1c67
Remove CATCH_CONFIG_ENABLE_BENCHMARKING compilation toggle
Now that Catch2 is a proper library, we can always build the full
library (comparatively minor slowdown) and the user can avoid
including benchmarking headers to avoid the compilation slowdown.
2020-02-06 11:36:46 +01:00
Martin Hořeňovský
bce5b364d3
Unconditionally provide <chrono> StringMakers 2020-02-03 20:53:36 +01:00
Martin Hořeňovský
ddd0e7218d
Remove the !hide special tag 2020-01-28 20:48:32 +01:00
Martin Hořeňovský
6c3a5ef625
Remove CATCH_CONFIG_DISABLE_MATCHERS
Now that the recommended distribution and usage method is proper
library, users can just avoid including the matcher headers to get
basically the same effect.
2020-01-25 09:07:36 +01:00
Martin Hořeňovský
70ef2f7f12
Update building of examples for static lib 2019-12-08 15:55:04 +01:00
Martin Hořeňovský
91ee07e08c
Moved scripts/ to tools/scripts/ 2019-12-06 11:53:31 +01:00
Martin Hořeňovský
ae10e4ef72
Sections no longer save their description
Users can still write a description for their sections, but it will
no longer be saved as part of the `SectionInfo` struct. This ability
has also been added to the documentation.

Closes #1319
2019-11-03 23:13:25 +01:00
Martin Hořeňovský
ca4c6218d4
Remove SourceLineInfo::empty() 2019-10-30 18:01:38 +01:00
Martin Hořeňovský
316a5c0572
Remove type erasure in predicate matcher
Now the type of the predicate is part of the type of the
PredicateMatcher.
2019-10-29 23:28:08 +01:00
Martin Hořeňovský
4f47d1c6c1
Hidden tests now require positive filter match to be selected
This also required some refactoring of how the pattern matching
works. This means that the concepts of include and exclude patterns
are no longer unified, with exclusion patterns working as just
negation of an inclusion patterns (which led to including hidden
tags by default, as they did not match the exclusion), but rather
both include and exclude patterns are handled separately.

The new logic is that given a filter and a test case, the test
case must match _all_ include patterns and _no_ exclude patterns
to be included by the filter. Furthermore, if the test case is
hidden, then the filter must have at least one include pattern
for the test case to be used.

Closes #1184
2019-10-29 14:07:18 +01:00
Martin Hořeňovský
2bcf1b3db6
Remove support for test case descriptions
Closes #1189
2019-10-29 14:07:18 +01:00
Martin Hořeňovský
be44cfa63b
Specialize XML reporter's --list output 2019-10-29 14:07:18 +01:00
Martin Hořeňovský
0f39438aae
Stop checking verbosities up-front 2019-10-29 14:07:18 +01:00
Martin Hořeňovský
c582e351ce
Remove --list-test-names-only
People should use verbosity modifiers with `--list-tests` instead.

Closes #1190
2019-10-29 14:07:18 +01:00
Martin Hořeňovský
d2cddfc9c5
Make --list-* exit code be 0
Previously it returned the sum of listed things because ???. This
was completely useless and in many ways actively counterproductive
because of the success/failure conventions around exit codes.

Closes #1410
2019-10-29 14:07:18 +01:00
Martin Hořeňovský
557b336125
Remove superfluous semicolon in the INFO macro
Closes #1456
2019-10-29 14:07:18 +01:00
Martin Hořeňovský
141761745a
Remove ANON_TEST_CASE
It can be fully replaced with `TEST_CASE` without any arguments,
so there is no need to keep it around.

Closes #1220
2019-10-29 14:07:18 +01:00
Martin Hořeňovský
0685216175
Mark type erasure in PredicateFunction as deprecated 2019-10-28 15:15:13 +01:00
sp-dani-garcia
51b29ced1a Add SonarQube Generic Test Data reporter
It outputs reports in the `Generic Execution Test Data` format, see
https://docs.sonarqube.org/latest/analysis/generic-test/, specifically
https://docs.sonarqube.org/latest/analysis/generic-test/#header-2

Close #1738 (this is a cherry-pick and fixup of that PR)
2019-10-27 10:02:41 +01:00
Martin Hořeňovský
9a558171d8
Merge pull request #1776 from mvd4/bugfix/enable-floating-point-ranges
Enable floating point ranges
2019-10-27 09:17:15 +01:00
Martin Hořeňovský
c5c688820c
Document that matcher combinators (&&, ||, !) do not take ownership
Closes #1781
2019-10-26 21:07:38 +02:00
Martin Hořeňovský
6a08225863
Add documentation for floating point range generator 2019-10-26 20:52:40 +02:00
Jozef Grajciar
87b745da66
v2.10.2 2019-10-24 18:41:25 +02:00
Martin Hostettler
8fb1219013 docs: command-line: Add example to specify tests by file name. 2019-10-21 23:51:33 +02:00
Martin Hořeňovský
a2c8dce85c
v2.10.1 2019-10-20 21:03:22 +02:00
Martin Hořeňovský
1e379de9d7
Fix "ldd" -> "lld" typo in docs 2019-10-20 20:57:55 +02:00
Martin Hořeňovský
407ee0af2f
Add a section on slow linking under MinGW to "Known Limitations" docs
Unless someone steps up to fix the long link times with a set of
unobtrusive changes, the recommended solution will remain "use a better
linker".

Related to #1205, #1247, and #1637

Closes #1247
Closes #1637
2019-10-20 19:52:39 +02:00
Mertz, Arne
1aa98c76ac add a note how to run selftests using multiconfig generators 2019-10-17 20:23:51 +02:00
data-man
3195c242c2 Remove JSON library from users 2019-10-17 20:20:02 +02:00
Martin Hořeňovský
7c9f92bc1c
v2.10.0 2019-10-13 23:44:18 +02:00
Martin Hořeňovský
a92a7d0229
Rewrite documentation for floating point matchers 2019-10-13 21:31:48 +02:00
Martin Hořeňovský
2cc0c71856
Add a matcher that checks exception's message
Only works for exceptions that publicly derive from `std::exception`
and the matching is done exactly, including case and whitespace.

Closes #1649
Closes #1728

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Your branch is up-to-date with 'origin/master'.
#
# Changes to be committed:
#	modified:   ../docs/matchers.md
#	modified:   ../include/internal/catch_capture_matchers.h
#	modified:   ../projects/CMakeLists.txt
#	modified:   ../projects/SelfTest/Baselines/compact.sw.approved.txt
#	modified:   ../projects/SelfTest/Baselines/console.std.approved.txt
#	modified:   ../projects/SelfTest/Baselines/console.sw.approved.txt
#	modified:   ../projects/SelfTest/Baselines/junit.sw.approved.txt
#	modified:   ../projects/SelfTest/Baselines/xml.sw.approved.txt
#	modified:   ../projects/SelfTest/UsageTests/Matchers.tests.cpp
#
# Untracked files:
#	./
#	../clang-full/
#	../clang-test/
#	../clang10-build/
#	../coverage-build/
#	../gcc-build/
#	../gcc-full/
#	../include/internal/catch_matchers_exception.cpp
#	../include/internal/catch_matchers_exception.hpp
#	../misc-build/
#	../msvc-sln/
#	../notes.txt
#	../test-install/
#
2019-10-13 20:37:07 +02:00
Martin Hořeňovský
c8db4e77c4
Add a from_range(Container) overload to the generator helpers 2019-10-09 14:51:36 +02:00
Martin Hořeňovský
319cb9e1da
Add a generator that takes an iterator pair 2019-10-06 13:55:10 +02:00
Kevin Granade
a0ebd63806
Add Cataclysm:Dark Days Ahead to project list 2019-10-05 20:18:31 -07:00
Wim Leflere
fcda35f645 update name of Value Generators in doc to match class names 2019-10-04 13:31:37 +02:00