Commit Graph

3106 Commits

Author SHA1 Message Date
ptc-tgamper
0c59cc83cf catch_debugger.cpp - debugger detection is identical on Mac OS X and iOS 2019-12-23 21:26:13 +01:00
Martin Hořeňovský
e4004e0adb
Provide const overload of ObjectStorage::stored_object()
Fixes #1820
2019-12-23 21:22:32 +01:00
Joe Burzinski
6c9a255dc2 Fix forwarding in SingleValueGenerator and generator creation
Fixes #1809
2019-12-15 20:50:43 +01:00
Joe Burzinski
9a8963133f Update single header generation script to warn about unused headers 2019-11-21 16:22:04 +01:00
Joe Burzinski
cfba9dce97 Fix wrong namespacing of benchmarking constructor helpers 2019-11-21 16:22:04 +01:00
Martin Hořeňovský
a537ccae22
Suppress using-namespace lint in GENERATE* macros
Closes #1799
2019-11-16 17:39:28 +01:00
Martin Hořeňovský
e1c9d5569d
v2.11.0 2019-11-15 15:06:17 +01:00
Martin Hořeňovský
d512decaac
Mention the sonarqube reporter in release process 2019-11-15 14:59:35 +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
Martin Hořeňovský
d7b8c3ace3
Minor cleanup in the benchmarking tests 2019-11-15 11:59:35 +01:00
Martin Hořeňovský
32733e08c0
Use newer version of Python on AppVeyor 2019-11-13 20:58:15 +01:00
Martin Hořeňovský
930f49a641
Split [.foo] into [.][foo] when parsing test specs
b77cec05c0 fixed this problem for tagging tests, so that a test
case tagged with `[.foo]` would be parsed as tagged with `[.][foo]`.
This does the same for the test spec parsing.

Fixes #1798
2019-11-05 23:28:47 +01:00
Martin Hořeňovský
c409dccee5
Cleanup tests for C++20 2019-11-04 10:42:34 +01:00
Martin Hořeňovský
95bfb33167
Forbid copying ReusableStringStream
Copying a `ReusableStringStream` would lead to "double free" of
the stream, and thus it could be used in multiple places at the
same time, breaking the output.
2019-11-04 00:05:35 +01:00
Martin Hořeňovský
59d2d08c0f
Merge pull request #1794 from cericks0n/patch-1
Fix error when period of steady_clock is not nano
2019-11-03 18:22:56 +01:00
cericks0n
fa6d52e2a3
Fix error when period of steady_clock is not nano
On systems where std::chrono::steady_clock::period is not std::nano, benchmark tests fail to compile due to trying to convert analysis.samples from a vector of duration<double, clock::period> to a vector of std::chrono::duration<double, std::nano>.
2019-11-01 15:52:38 -05:00
Martin Hořeňovský
5ac348cd6e
Fix compilation error in examples 2019-10-31 16:08:37 +01:00
Martin Hořeňovský
776a4686c7
Warning fixes in examples and tests 2019-10-31 14:29:59 +01:00
Martin Hořeňovský
3136c4fb6a
Refactored XMLWriter to provide finer-grained control over formatting 2019-10-29 13:59:18 +01:00
Martin Hořeňovský
74e0e737a6
Remove useless test 2019-10-29 11:44:24 +01:00
Martin Hořeňovský
0685216175
Mark type erasure in PredicateFunction as deprecated 2019-10-28 15:15:13 +01:00
Martin Hořeňovský
fc320f6b8f
Extract FunctionReturnType to catch_meta.hpp 2019-10-28 15:15:13 +01:00
Martin Hořeňovský
5290d4bedc
Merge pull request #1791 from catchorg/dev-reorganize-warning-suppression
Rework how warning suppression in macros is done
2019-10-28 13:13:23 +01:00
Martin Hořeňovský
7ada02e21e
Avoid technically UB type punning when determining endianness 2019-10-27 22:07:10 +01:00
Martin Hořeňovský
849f2848bd
Rework how warning suppression in macros is done
Previously, each warning suppression was self-contained, with its
own pair of `SUPPRESS_X_WARNING` and `UNSUPPRESS_X_WARNING` macros.
This had the obvious advantage of being self-containing, but it
also meant that if we needed to suppress more than one warning
in a single place, then we would manipulate the compiler's warning
state multiple times, even though logically we would only need one
layer.

The new way of suppressing warnings in macros is to push compiler's
warning state with `CATCH_INTERNAL_START_WARNINGS_SUPPRESSION` macro,
then disable whatever macros we need with the
`CATCH_INTERNAL_SUPPRESS_X_WARNINGS` macro, and then return to the
previous state using `CATCH_INTERNAL_STOP_WARNINGS_SUPPRESSION`.
2019-10-27 21:07:21 +01:00
Alexander Stein
2fbd66c51c Improve JUnit failure report
The JUnit report is improved in that:
* The message shows the testing condition, not the result
* The actual message has similar output than the console one
2019-10-27 18:02:14 +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
Manuel Drews
4327baba40 Enable range generator for floating point types 2019-10-26 20:52:09 +02:00
Martin Hořeňovský
50cc14c94c
Rework StringRef interface and internals
Now it no longer tries to be this weird hybrid between an owning
and non-owning reference, and is only ever non-owning. This is also
reflected in its interface, for example `StringRef::isNullTerminated`
is now public, and `StringRef::c_str()` has the precondition that it
is true.

Overview of the changes:
* The `StringRef::m_data` member has been completely removed, as it
had no more uses.
* `StringRef::isSubstring()` has been made public and renamed to
`StringRef::isNullTerminated()`, so that the name reflects what the
method actually does.
* `StringRef::currentData()` has been renamed to `StringRef::data()`,
to be in line with common C++ containers and container-alikes.
* `StringRef::c_str()` will no longer silently make copies. It instead
has a precondition that `isNullTerminated()` is true.
* If the user needs a null-terminated string, they should use the
`std::string` conversion operator and call `c_str()` on the resulting
`std::string`.
* Some small optimizations in various places.
* Basic functionality is now `constexpr`.
2019-10-25 13:57:52 +02:00
Jozef Grajciar
87b745da66
v2.10.2 2019-10-24 18:41:25 +02:00
Martin Hořeňovský
7d0b205564
Prevent warning suppression from leaking when registering a listener 2019-10-22 00:10:01 +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ý
23c80bcc92
Provide workaround for platforms where INFINITY is double
Fixes #1782
2019-10-21 18:33:26 +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ý
4eea438b73
Update updateWandbox script to account for the new Wandbox API response 2019-10-20 20:56:20 +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
Jonathan Vander Mey
060a41ec7b Suppress false positive from clang-analyzer
Fixes issue #1230
2019-10-20 17:27:09 +02:00
Martin Hořeňovský
90825a4f7a
Add more tests for reading test specs from file
Related to #1770
2019-10-20 15:14:50 +02:00
Martin Hořeňovský
9e8ae7d470
Use scientific notation for the WithinULP matcher
This should now properly handle small numbers which would previously
output something like `[0.00000000000000019, 0.00000000000000019]`,
which does not allow user to read the numbers properly.

Closes #1760
2019-10-20 12:30:21 +02:00
amitherman95
84856844e1 Fixes #1766: Catch terminates when parsing invalid test name 2019-10-19 21:14:06 +02:00
Martin Hořeňovský
01ef7076f5
Allow in-tree builds where Catch2 is just a subproject
Closes #1773
Closes #1774
2019-10-18 18:49:44 +02:00
Jozef Grajciar
ae14a47360 TemplateTests: suppress -Wunused-template warning in template test cases
this warning was introduced by rework to support NTTPs
since we have implementation macro for NTTPs and normal template test cases
warning is going to be suppressed

Fixes #1762
2019-10-18 18:38:39 +02:00
Jozef Grajciar
f2b23db6d1 TemplateTests: fix compilation with ICC
ICC in some cases fails on trailing return type with decltype

Closes #1748
2019-10-18 12:35:09 +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ý
31906d83ec
Add parenthesis to prevent macro expansions of min/max
Closes #1772
2019-10-17 16:40:37 +02:00