Martin Hořeňovský
074017f5ad
Inline MessageBuilder's constructor
2021-05-14 16:00:15 +02:00
Martin Hořeňovský
0a89e7f0c4
Pass StringRef by value instead of by const-ref
2021-05-14 15:59:42 +02:00
Martin Hořeňovský
28f6698ec8
Remove unneeded interface IRunner
2021-05-13 09:14:26 +02:00
Martin Hořeňovský
b36f8daaad
Clarify bunch of default, out of line destructors
2021-05-12 23:55:46 +02:00
Martin Hořeňovský
d86cb5f95d
Add override to virtual destructor of derived class
2021-05-12 23:23:02 +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
Matteo Beniamino
baf0cd0be4
Fixed [dis]engage_platform declarations mismatch
2021-05-09 23:34:17 +02:00
Martin Hořeňovský
c0d0a50bdb
Significantly refactor fatal error handling
...
Because new glibc has changed `MINSIGSTKSZ` to be a syscall instead
of being constant, the signal posix handling needed changes, as it
used the value in constexpr context, for deciding size of an array.
It would be simple to fix it by having the handler determine the
signal handling stack size and allocate the memory every time the
handler is being installed, but that would add another allocation
and a syscall every time a test case is entered.
Instead, I split apart the idea of preparing fatal error handlers,
and engaging them, so that the memory can be allocated only once
and still be guarded by RAII.
Also turns out that Catch2's use of `MINSIGSTKSZ` was wrong, and
we should've been using `SIGSTKSZ` the whole time, which we use now.
Closes #2178
2021-05-09 23:34:15 +02:00
Pavel Kamenov
cbcab2dbcd
Add lcc to the list of unwanted compilers that mimic gcc
2021-05-09 18:12:58 +02:00
Scott Hutchinson
ea44e73961
Wrap all std::min and std::max calls in parentheses
2021-05-09 18:10:50 +02:00
Rob Boehne
d61fe3ecc3
[Issue 2154] Correct error when building with IBM's latest XLC ( #2155 )
...
* [Issue 2154] Correct error when building with IBM's latest XLC compiler with xlclang++ front-end.
On AIX, the XLC 16.1.0.1 compiler considers the call to `std::abs` ambigious, so it needs help with a static_cast to the type of the template argument.
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
2021-05-09 18:05:39 +02:00
Tom de Geus
b325c6d81e
Making target detection on Mac more robust
2021-05-09 18:05:37 +02:00
Martin Hořeňovský
d4a3cd9992
Make the static library build reproducible with supported compilers
...
This is based on bed285af07607a9da93892f8b08d36c3fd6af98d from
`v2.x` branch, but done properly for the build in v3 branch,
effectively porting #2141 to devel.
2021-05-09 18:05:34 +02:00
Sergio Losilla
cdf4748d1c
Modified hash to make it more independent of the choice of test names.
2021-05-09 18:05:14 +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ý
a5abec9cb5
Remove superfluous virtual from ExceptionTranslatorRegistry
2021-03-26 21:11:49 +01:00
Martin Hořeňovský
f1d7a10e06
Remove StringRef::isNullTerminated and StringRef::c_str
...
Both of them were fundamentally unsafe to use and shouldn't be used
at all.
2021-03-26 21:11:44 +01:00
Martin Hořeňovský
e50e10ef8f
Use std::string instead of StringRef as argument to the makeStream
...
This is done because `makeStream` was the only place using
`StringRef::c_str()`, which is an error-prone and unsafe API that
I want to remove.
2021-03-26 21:11:42 +01:00
Alexander Shaduri
2c269eb633
Fixed compilation under MinGW - use gmtime_s() instead of gmtime_r().
2021-03-23 23:46:04 +01:00
Martin Hořeňovský
551946c45b
Split out INTERNAL_CATCH_UNIQUE_NAME into its own header
...
Also small cleanup of includes of related headers.
2021-02-24 23:14:18 +01:00
Martin Hořeňovský
653764d53b
Simplify workaround for MSVC issue with XmlWriter
2021-02-21 11:19:02 +01:00
Martin Hořeňovský
e5e9afad16
Fix headers whose surrogate TUs did not compile
2021-02-19 23:22:43 +01:00
Martin Hořeňovský
477540760a
Use gmtime_r instead of gmtime when compiling for posixy platforms
2021-01-27 11:49:52 +01:00
Martin Hořeňovský
971b1fc32a
--list-* flags write to target specified by the -o flag
...
Also added tests for the default implementations of list* reporter
helpers.
Closes #2061
2021-01-26 18:36:54 +01:00
Martin Hořeňovský
6798c139a6
Extract the default listing implementation out of reporter interface
...
Also generalized the implementations to write to the provided
output stream, which will be required for the follow up changes,
where the listings should happen to the location user asked for
by specifying the `-o` flag.
2021-01-26 11:23:37 +01:00
Martin Hořeňovský
7111b2a8e2
Cleanup IStreamingReporter::listTests
2021-01-16 15:50:52 +01:00
Martin Hořeňovský
5509ceff60
Remove superfluous IConfig argument from IStreamingReporter::list*
...
The previous commit made it so that the `IConfig` is stored in
`IStreamingReporter` and thus always available.
2021-01-16 15:48:29 +01:00
Martin Hořeňovský
74f2f4ba5e
Hold reporter's IConfig instance in the interface
...
Previously, every base derived from the IStreamingReporter had
its own `IConfig const* m_config` member, so this just centralizes
the handling thereof.
Part of #2061
2021-01-16 15:27:56 +01:00
Martin Hořeňovský
4e8832fc88
Split CATCH_CONFIG_COUNTER into its own header
...
Part of #2041
2020-12-29 11:07:45 +01:00
Martin Hořeňovský
bdd1e5c613
Remove some superfluous includes
2020-12-28 21:11:54 +01:00
Martin Hořeňovský
1d269211bd
Split CATCH_CONFIG_WCHAR into its own header
...
Part of #2041
2020-12-28 20:51:49 +01:00
Roman Proskuryakov
0acb371b92
Fix Wold-style-cast error ( #2125 )
...
* Add Wold-style-cast to cmake flags
* Fix old style cast in catch_stats.hpp
* Fix old style cast in catch_stats.cpp
2020-12-28 14:00:19 +01:00
Martin Hořeňovský
965afc4b2e
Split CATCH_CONFIG_ANDROID_LOGWRITE into its own header
...
Part of #2041
2020-12-28 12:53:52 +01:00
Uriel García Rivas
552af8920d
Added AnyMatch, AllMatch and NoneMatch
2020-12-27 20:20:55 +01:00
Martin Hořeňovský
a091853f4a
Rename file catch_matchers_floating -> catch_matchers_floating_point
...
The old name was a legacy of v2 era, where all headers were stitched
into one. With v3 using separate headers, it is better when they have
proper name.
2020-12-13 18:12:20 +01:00
Martin Hořeňovský
4b51d0dd3b
Remove rest of std::shared_ptr usage in Trackers
...
Closes #2088
2020-12-05 15:19:23 +01:00
Martin Hořeňovský
6350851f9a
Return plain ptr from ITracker::findChild instead of shared_ptr
...
This is part of wider rework of trackers to avoid `std::shared_ptr`
everywhere.
Related to #2088
2020-12-04 21:37:24 +01:00
cat_mint
21c97f2fad
Use snprintf instead of sprintf ( #2111 )
2020-12-01 18:59:27 +01:00
Martin Hořeňovský
e7740316e3
Split TestFailureException into its own header
2020-11-28 11:18:54 +01:00
Martin Hořeňovský
72525a3053
Rename catch_common.hpp -> catch_source_line_info.hpp
...
Previous splitting of catch_common.hpp left it containing only one
actual thing, which is the `SourceLineInfo` type. Given that, there
is no reason to keep the old name.
Also found out that it was included in some places for no reason
(primarily Matchers).
2020-11-28 11:18:51 +01:00
Martin Hořeňovský
1982c0d5ee
Split out the StreamEndStop helper into its own header
2020-11-28 11:18:46 +01:00
Martin Hořeňovský
c3e8ae642f
Remove pointless virtual in WildcardPattern
2020-11-26 18:35:20 +01:00
Martin Hořeňovský
f36e059453
Remove superfluous <memory> include from catch_reporter_cumulative_base.hpp
2020-11-26 18:06:21 +01:00
Martin Hořeňovský
677adf8ade
Replace shared_ptrs with unique_ptrs in CumulativeReporterBase nodes
...
Closes #2089
2020-11-26 14:45:27 +01:00
Martin Hořeňovský
bfe5553416
CumulativeReporterBase doesn't use shared_ptrs for sectionStack
2020-11-26 10:21:12 +01:00
Martin Hořeňovský
c673db7a4e
Add explanatory comment to CumulativeReporterBase
2020-11-26 09:45:28 +01:00
Martin Hořeňovský
b10a19545b
CumulativeReporterBase stores TestRunNodes directly
2020-11-26 09:43:23 +01:00
Martin Hořeňovský
e5ccb79bf8
Remove pointless virtual on StreamingReporterBase::Node destructor
2020-11-25 21:57:30 +01:00
Martin Hořeňovský
3610eb81b1
Explicitly inline trivial function in CumulativeReporterBase impl
2020-11-17 21:02:11 +01:00
Martin Hořeňovský
bd1e76cc3a
Untypedef some types for clarity when refactoring
2020-11-17 21:01:35 +01:00