Commit Graph

180 Commits

Author SHA1 Message Date
Martin Hořeňovský
62fd660583
v2.13.9 2022-04-12 22:38:17 +02:00
John Beard
ff151d2833
Fix: CAPTURE not variadic when disabled (#2378)
Closes: #2316
2022-03-04 15:29:22 +01:00
Martin Hořeňovský
216713a406
v2.13.8 2022-01-03 21:21:39 +01:00
Bernhard Manfred Gruber
e9e4117016 Remove double-underscores in macros
Such identifiers are reserved by the C++ standard.
Fixes part of #578.
2021-12-16 14:34:04 +01:00
Martin Hořeňovský
c4e3767e26
v2.13.7 2021-07-28 20:30:51 +02:00
Martin Hořeňovský
5c88067bd3
v2.13.6 2021-04-16 20:14:58 +02:00
Martin Hořeňovský
42e368dd0a
v2.13.5 2021-04-10 23:48:32 +02:00
Martin Hořeňovský
de6fe184a9
v2.13.4 2020-12-29 15:03:40 +01:00
Martin Hořeňovský
ff349a50bf
v2.13.3 2020-10-31 18:21:23 +01:00
Martin Hořeňovský
87074da73e
v2.13.2 2020-10-07 11:43:02 +02:00
Martin Hořeňovský
fd9f5ac661
v2.13.1 2020-09-07 12:34:55 +02:00
Martin Hořeňovský
7f21cc6c55
v2.13.0 2020-07-12 20:28:38 +02:00
Martin Hořeňovský
c299133a31
v2.12.4 2020-07-05 11:51:30 +02:00
Martin Hořeňovský
0f05c034c2
v2.12.3 2020-06-29 20:50:39 +02:00
Martin Hořeňovský
b1b5cb8122
v2.12.2 2020-05-25 15:13:18 +02:00
Martin Hořeňovský
2e61d38c7c
v2.12.1
--- Fixes ---
* Vector matchers now support initializer list literals better

--- Improvements ---
* Added support for `^` (bitwise xor) to `CHECK` and `REQUIRE`
2020-04-21 19:30:38 +02:00
Martin Hořeňovský
cfb6956698
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)
2020-04-21 16:33:15 +02:00
Martin Hořeňovský
255aa5f2af
v2.11.3 2020-03-19 13:50:19 +01:00
Martin Hořeňovský
5f94c8dafb
v2.11.2 2020-03-19 12:37:51 +01:00
Martin Hořeňovský
d10b9bd02e
v2.11.1 2019-12-28 21:24:04 +01:00
Martin Hořeňovský
e1c9d5569d
v2.11.0 2019-11-15 15:06:17 +01:00
Martin Hořeňovský
f23f96883a
Ensure the full benchmarking support is present in the single header
Fixes #1800
2019-11-15 11:59:43 +01:00
Jozef Grajciar
87b745da66
v2.10.2 2019-10-24 18:41:25 +02:00
Martin Hořeňovský
a2c8dce85c
v2.10.1 2019-10-20 21:03:22 +02:00
Martin Hořeňovský
7c9f92bc1c
v2.10.0 2019-10-13 23:44:18 +02:00
Martin Hořeňovský
2c869e17e4
v2.9.2 2019-08-08 14:05:24 +02:00
Martin Hořeňovský
2f631bb808
v2.9.1 2019-06-17 12:02:14 +02:00
Martin Hořeňovský
25cc09dcec
Fix benchmarking in stand-alone files 2019-06-17 11:58:40 +02:00
Martin Hořeňovský
f9dce28e7d
v2.9.0 2019-06-16 10:42:59 +02:00
Jozef Grajciar
f2cfc2b852 TEMPLATE_LIST_TEST_CASE implementation
Closes #1627
2019-06-15 15:40:39 +02:00
Martin Hořeňovský
e340ab8db6
Various improvements to the benchmarking support
* Units from <ratio> are no longer redeclared in our own namespace
* The default clock is `steady_clock`, not `high_resolution_clock`,
because, as HH says "high_resolution_clock is useless. If you want
measure the passing of time, use steady_clock. If you want user
friendly time, use system_clock".
* Benchmarking support is opt-in, not opt-out, to avoid the large
(~10%) compile time penalty.
* Benchmarking-related options in CLI are always present, to decrease
the amount of code that is only compiled conditionally and making
the whole shebang more maintainble.
2019-06-06 21:28:56 +02:00
Joachim Meyer
ce2560ca95 Integrate Nonius benchmark into Catch2
Changes done to Nonius:
* Moved things into "Catch::Benchmark" namespace
* Benchmarks were integrated with `TEST_CASE`/`SECTION`/`GENERATE` macros
* Removed Nonius's parameters for benchmarks, Generators should be used instead
* Added relevant methods to the reporter interface (default-implemented, to avoid
breaking existing 3rd party reporters)
* Async processing is guarded with `_REENTRANT` macro for GCC/Clang, used by default
on MSVC
* Added a macro `CATCH_CONFIG_DISABLE_BENCHMARKING` that removes all traces of
benchmarking from Catch
2019-06-06 19:33:37 +02:00
Martin Hořeňovský
00347f1e79
v2.8.0 2019-05-26 22:47:00 +02:00
Jozef Grajciar
0c43f98fa2 Nttp support
Closes #1531
2019-05-23 21:03:47 +02:00
Joel Bradshaw
6b5b72651d Add UNSCOPED_INFO to prefix/disabled sections 2019-04-24 12:56:39 -07:00
Martin Hořeňovský
7c37501b07
v2.7.2 2019-04-22 23:15:59 +02:00
JoeyGrajciar
79417b9afc Revert "draft of nttp support"
This reverts commit 0c39409da7.
2019-04-18 11:35:33 +02:00
Jozef Grajciar
0c39409da7 draft of nttp support
added _SIG macros
2019-04-17 21:41:19 +02:00
Martin Hořeňovský
b9dd1936e5
v2.7.1 2019-04-08 13:38:00 +02:00
Martin Hořeňovský
d633072794
v2.7.0 2019-03-07 21:44:57 +01:00
Omer Ozarslan
99575b45db Add unscoped info functionality
This adds UNSCOPED_INFO macro, creating a log message that is stored
until the end of next assertion or the end of test case, whichever comes
first. These messages are not scoped locally, unlike messages created by
INFO macro.
2019-03-06 22:04:35 +01:00
Martin Hořeňovský
693647c43f
Add ChunkGenerator
This generator collects values from the underlying generator until it
has a specified amount of them, and then returns them in one "chunk".
In case the underlying generator does not have enough elements for
a specific chunk, the left-over elements are discarded.

Closes #1538
2019-02-23 20:28:58 +01:00
Martin Hořeňovský
269303d9d9
Introduce random number (Integral and Float) generators 2019-02-20 00:09:15 +01:00
Martin Hořeňovský
dbbab8727c
v2.6.1 2019-02-12 19:58:12 +01:00
Darren Gilroy
9ccea82d7f Catch: resolve inconsistency in CATCH_REQUIRE_THROWS
The REQUIRE_THROWS and CATCH_REQUIRE_THROWS macros have
a subtle inconsistency in their implementation which can
cause a warning if [-Wunused-value] is used.

This commit changes CATCH_REQUIRE_THROWS so it has the
same implementation as REQUIRE_THROWS

It looks like REQUIRE_THROWS was change in commit
fae0fa4ec but not CATCH_REQUIRE_THROWS.

Similar changes for CATCH_CHECK_THROWS
2019-02-09 17:42:53 +01:00
Martin Hořeňovský
d75e9b3c0f
v2.6.0 2019-01-31 22:32:55 +01:00
Jozef Grajciar
21a1cd5683 Template tests: added TEMPLATE_PRODUCT_TEST_CASE
support for generating test cases based on multiple template template
types combined with template arguments for each of the template template
types specified

e.g.
```
TEMPLATE_PRODUCT_TEST_CASE("template product","[template]",
			   (std::tuple, std::pair, std::map),
			   ((int,float),(char,double),(int,char)))
```
will effectively create 9 test cases with types:
std::tuple<int,float>
std::tuple<char,double>
std::tuple<int,char>
std::pair<int,float>
std::pair<char, double>
std::pair<int,char>
std::map<int,float>
std::map<char,double>
std::map<int,char>

Tested type is accessible in test case body as TestType
Unique name is created by appending ` - <index>` to test name
since preprocessor has some limitations in recursions

Closes #1454
2018-12-10 08:22:09 +01:00
Martin Hořeňovský
6ccd467094
v2.5.0 2018-11-26 20:50:38 +01:00
Jozef Grajciar
2d906a92cb Add support for templated tests
This adds support for templated tests and test methods via
`TEMPLATE_TEST_CASE` and `TEMPLATE_TEST_CASE_METHOD` macros. These
work mostly just like their regular counterparts*, but take an
unlimited** number of types as their last arguments.

* Unlike the plain `TEST_CASE*` macros, the `TEMPLATE*` variants
require a tag string.

** In practice there is limit of about 300 types.
2018-11-16 21:21:23 +01:00
Martin Hořeňovský
03d122a35c v2.4.2 2018-10-26 21:14:16 +02:00