Martin Hořeňovský
898d111f72
Fix generateSingleHeader.py to properly copy utf-8
2018-08-29 12:52:29 +02:00
Martin Hořeňovský
5202993555
Fix VS2017 approvals on AppVeyor
...
Because of a change in VS toolset, missing option <UseFullPaths>
is no longer interpreted as "don't pass /FC to the compiler", but
rather as "pass /FC to the compiler". This is problematic, because
/FC not only changes how much of the path is reporter by the compiler
(e.g. in `__FILE__` macro), but it also lower cases the path.
This lower-casing of the path broke our approval tests for VS2017
about 5 months ago.
Using CMake 3.13 (not yet released) would also let us fix it, but
for now we use a vcxproj.user file that is merged with the main project
and explicitly disables `/FC`.
2018-08-28 12:58:08 +02:00
Martin Hořeňovský
f061dabbad
Add ExtraTests infrastructure
...
This means
* a new cmake option, `CATCH_BUILD_EXTRA_TESTS`, that conditionally
includes the ExtraTests subfolder
* building and running them on some of the Travis build images
* An example configuration test
In the future these should be extended to cover most of the
configuration options in Catch2, but this is a start.
2018-08-28 12:57:20 +02:00
Martin Hořeňovský
1a501fcb48
Fix examples compilation for some combinations of Clang and libstdc++
2018-08-28 10:12:53 +02:00
Martin Hořeňovský
94121a5f6d
Add a basic documentation for generators
2018-08-24 13:34:27 +02:00
Martin Hořeňovský
92e25049cf
Move all<int> to .cpp file to remove <limits> from common path
2018-08-24 13:34:03 +02:00
Martin Hořeňovský
fdcd46420e
Update baselines
2018-08-24 13:31:51 +02:00
Phil Nash
7c25dae9ea
First attempt at data generator support
...
The support is to be considered experimental, that is, the interfaces,
the first party generators and helper functions can change or be removed
at any point in time.
Related to #850
2018-08-24 13:31:51 +02:00
David Seifert
7f18282d17
Allow overriding of Python interpreter
...
* Calling `python` does not allow overriding
downstream when running tests.
2018-08-20 14:52:54 +02:00
Phil Nash
1cdaa48a0b
CAPTURE is now variadic
2018-08-19 22:40:20 +02:00
Phil Nash
1a63fad8d6
Seed the RNG in approval tests
2018-08-19 22:34:14 +02:00
Phil Nash
d6f2fd486c
Moved ReusableStringStream impl to generic singleton
2018-08-19 11:28:46 +02:00
Phil Nash
5884ec1e28
Moved registry hub to generic singleton
2018-08-19 11:13:19 +02:00
Phil Nash
eb783fc20e
Added generic singletons facility
...
<sigh> yes, I know - but we have them - may as well make them consistent and safer
2018-08-19 10:34:44 +02:00
Igor Murashkin
38248f3f2c
Add pragma ignore for -Wnon-virtual-dtor in Catch matchers
2018-08-17 17:14:56 +02:00
Martin Hořeňovský
c9de7dd12d
Optimize SourceLineInfo::operator< with short-circuiting
...
In case of 2 instances of SourceLineInfo constructed in the same
file, they will have the same `file` pointer (even at O0). Thus, we
can check if they are equal before calling potentially pointless
`strcmp`.
2018-07-23 20:46:42 +02:00
Martin Hořeňovský
52cbb507ab
Avoid copying StringRef
...
In theory the copy is cheap (couple of pointers change), but tests
are usually compiled in Debug mode/with minimal optimizations, which
means that most users will still have to pay the cost for those
function calls.
2018-07-23 14:04:43 +02:00
Martin Hořeňovský
83bfae1a50
Construct StringRef from constant strings in macros directly using UDL
...
This avoids having to call `strlen` to get the constant string's length
and thus should improve performance.
2018-07-23 14:00:45 +02:00
Martin Hořeňovský
f7f592dfc9
Introduce "C-namespaced" UDL for StringRef
2018-07-23 14:00:45 +02:00
Martin Hořeňovský
78804ea304
Replace std::string with StringRef in MessageInfo for macro capture
...
Because the macro name is compile-time constant, we do not have to
worry about lifetimes and will avoid allocation in case of missing
SSO or long macro name.
2018-07-23 14:00:44 +02:00
Martin Hořeňovský
b93284716e
Update gitattributes
2018-07-23 10:15:52 +02:00
Martin Hořeňovský
15cf3caace
v2.3.0
2018-07-23 10:12:15 +02:00
Martin Hořeňovský
12a8dfa2f2
Fix Listening reporter use of ReporterPreferences
2018-07-22 22:58:18 +02:00
Martin Hořeňovský
797d3b04df
Reinstate CATCH_BUILD_TESTING CMake option
2018-07-22 18:01:42 +02:00
Martin Hořeňovský
82b8744b8c
Direct construct empty StringRef in test macros
2018-07-22 14:13:34 +02:00
Martin Hořeňovský
ce80358306
Document Approx's UDL support
2018-07-15 17:38:57 +02:00
Henry Schreiner
283e2e6d41
Add float/int literal for Approx
2018-07-15 17:03:12 +02:00
Martin Hořeňovský
d6c7392b24
Add a new reporter customization point: reporting all assertions
...
By opting the JUnit and XML reporters into it, we no longer run
into problem where they underreport the results without `-s` flag.
Related to #1264 , #1267 , #1310
2018-07-14 20:51:02 +02:00
Martin Hořeňovský
9ee4c1db52
Allow disabling the implementation of the new output capture
...
As it turns out, some platforms do not provide things like `dup`,
or `std::tmpfile`, but they do provide streams...
Closes #1335
Related to #1311
2018-07-13 20:27:00 +02:00
Guillaume Egles
76790604f5
Properly unset tags variable.
2018-07-10 12:48:14 +02:00
Unknown
e21c6aa94d
Fix the second Multiple-file example file link
...
Previously it pointed to the first file as well.
2018-07-09 15:47:03 +02:00
Martin Hořeňovský
7a59d5027f
Link the example from CATCH_CONFIG_NOSTDOUT
documentation
2018-07-08 13:58:44 +02:00
Martin Hořeňovský
c8941cccb5
Add an example on providing streams with CATCH_CONFIG_NOSTDOUT
...
Related to #1037
Closes #1290
2018-07-08 13:38:42 +02:00
Martin Hořeňovský
5eeb6aa361
Update Approx documentation
...
Fixes #1328
2018-07-05 17:28:00 +02:00
Martin Hořeňovský
1c1b447ede
Properly guard CATCH_CONFIG_ENABLE_CHRONO_STRINGMAKER definition
2018-07-03 09:29:26 +02:00
Martin Hořeňovský
e1d81174db
Add -Wmissing-declarations to the SelfTest project
...
This required some clean-up in our test files
2018-07-02 17:36:13 +02:00
Martin Hořeňovský
4846ad59e1
Remove obsolete test
...
`REQUIRE`, `CHECK` and many other macros already support expressions
with multiple template parameters without parenthesizing.
2018-07-02 17:32:47 +02:00
Martin Hořeňovský
ff2b3c85a7
Add comment explaining why we leak -Wparentheses under g++
2018-07-02 17:28:45 +02:00
Martin Hořeňovský
b55424d3b2
Stop -Wunused-variable suppression leaking out of Catch's header
...
Previously it was leaking to suppress warnings on `SECTION`s,
but Clang's support for `_Pragma` is solid, so we can suppress
those locally.
Fixes #1317
2018-07-02 17:28:29 +02:00
Martin Hořeňovský
e69c7ce297
Add Discord badge to README
2018-07-01 20:48:21 +02:00
Martin Hořeňovský
7be8ba36c1
Install contrib when installing Catch using conan
...
Closes #1322
2018-07-01 19:04:50 +02:00
Stephen McDowell
ad120965cf
fix link to single header version catch.hpp
2018-07-01 12:37:13 +02:00
Martin Hořeňovský
f460a7d8f9
Fix documentation of CATCH_CONFIG_FAST_COMPILE
...
Related to issue #1279
2018-06-30 12:31:46 +02:00
Martin Hořeňovský
ebf89000f1
Update thread safety documentation
...
Closes #1302
2018-06-28 22:35:42 +02:00
Martin Hořeňovský
7d00cb83f1
Remove unused benchmark project
2018-06-28 10:53:25 +02:00
Martin Hořeňovský
e69afb6252
Remove removed macros from documentation
2018-06-28 09:43:10 +02:00
Phil Nash
9fb38fcc14
Restored description field in SectionInfo for now - but marked it deprecated
2018-06-25 20:18:41 +01:00
Phil Nash
0f49a600b0
Added DYNAMIC_SECTION to CATCH_CONFIG_DISABLE builds
2018-06-25 19:22:57 +01:00
Phil Nash
5c0efa1cfc
Added DYNAMIC_SECTION and implemented GIVEN/ WHEN/ THEN in terms of it
2018-06-25 19:19:21 +01:00
Phil Nash
1579744ddd
Deprecated description in SECTION (still accepts it, for now, but doesn't use it anywhere)
2018-06-25 19:04:29 +01:00