Commit Graph

2812 Commits

Author SHA1 Message Date
Phil Nash
2bf30e9e5a Use (locally defined) UInt64 instead of uint64_t
- typedefs long long for MSVC
- typedefs uint64_t otherwise

Should probably do finer grained compiler checking - but this should at least be better than what was there before
2017-04-11 15:06:25 +01:00
Phil Nash
b591cb9a03 Added note about thread safety in assertions
- closes #875
2017-04-11 14:25:19 +01:00
Phil Nash
714d01c07c approved tests that were correct the first time (previous approvals were erroneous) 2017-04-09 20:40:11 +01:00
Martin Hořeňovský
c6990cdf91 v1.9.1 release 2017-04-09 21:25:20 +02:00
Martin Hořeňovský
da8786b8fd Unexpected exception are no longer ignored by default
What an embarassing bug, I'll have to look into why it wasn't caught by
any of Catch's self-tests.

Fixes #885 and closes #887 (duplicate)
2017-04-09 21:20:58 +02:00
Phil Nash
5577322062 Added Nonius to open-sources users 2017-04-08 22:47:13 +01:00
Martin Hořeňovský
1b03c5ab6a v1.9.0 release 2017-04-07 22:56:36 +02:00
Phil Nash
7dd3c19027 Added NASA to commercial users list 2017-04-07 19:12:13 +01:00
Phil Nash
29d26d3179 Commented out unused argument 2017-04-07 11:36:54 +01:00
Phil Nash
ca764ec8d9 TeamCity reporter “ignores” failures in tests marked “ok to fail”
- also don’t report hidden/ not-selected tests
2017-04-07 11:15:37 +01:00
Phil Nash
250f0ee7fb Added approvals for “failed as expected” tests 2017-04-07 09:33:19 +01:00
Martin Hořeňovský
09e4830199 Added VS2017 to AppVeyor matrix 2017-04-06 11:01:49 +02:00
Martin Hořeňovský
8f85d08e9f Give up on _Pragma for gcc, force disable Wparentheses in all TUs 2017-04-05 21:37:27 +02:00
Martin Hořeňovský
3ae076ce8d Updated REQUIRE* documentation under FAST_COMPILE 2017-04-05 10:26:19 +02:00
Sergey Semushin
94425ad59b Add opt-in c++11 stream insertable check. (#877)
* Add opt-in c++11 stream insertable check.

To opt-in, define CATCH_CONFIG_CPP11_STREAM_INSERTABLE_CHECK.

Opt-in fixes #872 and should fix #757 as well.
2017-04-05 09:53:10 +02:00
Martin Hořeňovský
0354d50278 Added templated constructor to C++11 Approx
When using C++11, comparison operators are already templated to take
anything that can be explicitly converted to double, but constructor
took only doubles. This lead to warnings when an `Approx` was
constructed from floats, which was problematic for some users.

Since just adding float constructor would be a large breaking change, as
suddenly `Approx( 1 )` would become ambiguous, I added a templated
constructor that will take anything that is explicitly convertible to
double. This has the added benefit of allowing constructing `Approx`
instances from instances of strong typedefs, ie allowing
`calculated_temp == Approx( known_temp)`.

Closes #873
2017-04-04 15:19:15 +02:00
Martin Hořeňovský
cdd83c2e15 Fmt and tag fixup for #876
Github wouldn't let me push to the PR, probably because it was made from
fork of a fork...
2017-04-04 11:31:13 +02:00
dvirtz
9a07dde16d print messages when unexpected exceptions are thrown 2017-04-04 11:27:19 +02:00
Martin Hořeňovský
6e091d3991 Reset the UnexpectedException report state 2017-04-03 11:48:50 +02:00
Martin Hořeňovský
95d85fb186 Fixed up CATCH_CONFIG_FAST_COMPILE for REQUIREs
Unexpected exceptions no longer cause abort and there should be no more
potential for false negatives.

The trade-off now is that exceptions are no longer translated.
2017-04-03 11:36:55 +02:00
Martin Hořeňovský
3a3f152979 Updated documentation of CATCH_CONFIG_FAST_COMPILE 2017-03-29 21:13:51 +02:00
Martin Hořeňovský
4fe2432e05 Rework of REQUIRE* changes in CATCH_CONFIG_FAST_COMPILE
`ResultBuilder`s destructor now checks for exceptions, preventing false
negatives. The speedup should remain the same give or take a tiny bit.
2017-03-29 21:12:06 +02:00
Martin Hořeňovský
c3a41e26a7 Suppress -Wexit-time-destructors in Catch code
This is another warning that follows test macros, making it painful to
suppress without leaking outside. Luckily clang's `_Pragma`
implementation works.

Should fix #308
2017-03-29 20:30:59 +02:00
Phil Nash
4838039b65 Merge pull request #869 from mloskot/patch-1
Add nanodbc library to Catch users
2017-03-27 07:43:27 +01:00
Mateusz Łoskot
2a221b8fcd Add nanodbc library to Catch users 2017-03-26 21:26:08 +02:00
Rian Quinn
79ce6930a2 remove redundant "/"
This "/" is not needed as CMake adds this automatically
2017-03-23 21:18:07 +01:00
Martin Hořeňovský
d762a7ca6c Expanded documentation about THROWS_AS assertions 2017-03-23 21:16:52 +01:00
Martin Hořeňovský
f23b6b8b85 Don't sanitize exception type in REQUIRE_THROWS_AS
Effectively a revert of previous commit, fixing #542, where this was
added to stop linters complaining about `REQUIRE_THROWS_AS` used like
`REQUIRE_THROWS_AS(expr, std::exception);`, which would be slicing the
caught exception. Now it is user's responsibility to pass us proper
exception type.

Closes #833 which wanted to add `typename`, so that the construct works
in a template, but that would not work with MSVC and older GCC's, as
having `typename` outside of a template is allowed only from C++11
onward.
2017-03-23 21:11:21 +01:00
Martin Hořeňovský
4597b43912 Throw instead of calling exit in RegistrarForTagAliases constructor
Caries a problem vis-a-vis Windows, just like previous commit, but that
can be fixed later on.

Closes #866
2017-03-22 18:40:07 +01:00
Martin Hořeňovský
f64d914bff Throw instead of calling exit in enforceNotReservedTag
Closes #865
2017-03-22 17:53:22 +01:00
Martin Hořeňovský
d07999ddff Version struct now uses char* for holding branch name
Since the info is constant, and the only use is to write it out during
runtime, there is no need for `std::string`.
2017-03-22 17:45:36 +01:00
Kevin Ushey
e04dc5105b use inline 'libraryVersion()' function (closes #858) 2017-03-22 15:51:02 +01:00
Phil Nash
cffb031ce1 Added polymorphic_value to OSS users 2017-03-22 10:33:52 +00:00
Phil Nash
f3ec843ba6 Changed all internal forwarding macro usages to put macro name as first argument
(and ‘expression’, if any, last)
This is a first step towards allowing expression arguments to become variadic
2017-03-21 13:23:35 +00:00
Martin Hořeňovský
55ed17f97b Removed stray define 2017-03-20 10:53:32 +01:00
Martin Hořeňovský
6a502cc2f5 Renamed licence file, license should now be detected by github 2017-03-20 08:59:25 +01:00
Martin Hořeňovský
6a009fabcb Documented REQUIRE under CATCH_CONFIG_FAST_COMPILE 2017-03-17 17:02:39 +01:00
Martin Hořeňovský
7a8a0205b4 CATCH_CONFIG_FAST_COMPILE now disables trys in REQUIRE*
This seems to give about 15% speedup when compiling tests using GCC.

The tradeoff is that under certain circumstances, there is a chance for
false negative result, when the expression under test throws exception
and the test code catches it before it gets to the test runner.

Example:
``` cpp
TEST_CASE("False negative") {
try {
REQUIRE(throws() == "");
} catch (...) {}
}
```
This test case will succeed, reporting no assertions checked, instead of
failing as it would with `CATCH_CONFIG_FAST_COMPILE` disabled. However,
just removing the try-catch block inside client's code will fix this, so
it is worthwhile.

This change does not apply to CHECK* macros, because these are currently
specified as continuing on exception and thus need the local try-catch
to work as intended.
2017-03-17 13:21:40 +01:00
Mickey Rose
4dc06bdb70 Use bulk vector::insert rather than back_inserter 2017-03-15 15:19:38 +00:00
Phil Nash
08b597b3e2 Merge pull request #856 from lightmare/script-exec-perm
Set execute permission on runnable python scripts
2017-03-15 11:44:40 +00:00
Mickey Rose
46d166406d Set execute permission on runnable python scripts 2017-03-15 12:24:18 +01:00
Phil Nash
4ec8d53e91 Tag Alias registry is part of registry hub instead of it’s own singleton
- should now be cleaned up properly
2017-03-15 09:45:37 +00:00
Phil Nash
e7984e3711 Reorganised the readme/ ref docs TOC and added link to reporters docs 2017-03-15 09:08:20 +00:00
Phil Nash
90d89377ea Added docs on reporters 2017-03-15 09:07:23 +00:00
Phil Nash
0692317bc5 Added Obj-C bindings fix to release notes 2017-03-15 09:04:09 +00:00
Kevin Wojniak
e8b31108d6 Fix Catch::toString() linker error when main() is compiled as C++
Fixes #278
2017-03-14 11:54:14 -07:00
Martin Hořeňovský
95fc8d62a2 Fixed up old documentation links in release notes 2017-03-13 21:31:26 +01:00
Martin Hořeňovský
0c015aa887 v1.8.2 release 2017-03-13 21:29:30 +01:00
Phil Nash
f69f821853 Updatecd [!shouldFail] docs with extra explanatory note, 2017-03-13 19:35:17 +00:00
Phil Nash
485dbdc0e7 Added link to event listeners docs 2017-03-13 19:27:18 +00:00