Commit Graph

4 Commits

Author SHA1 Message Date
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ý 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ý 73159ace3d REQUIRE_THROWS_AS now catches exception by const&
Prevents some warnings caused by catching complex types by value.

Closes #542
2017-02-09 12:57:01 +01:00
Martin Hořeňovský 7db4d8d90c Added tests (single char pretty printing + op overload)
Tests for issue #809 -- Potentional operator overload ambiguity -- and
PR #646 -- Pretty print characters.
2017-02-07 13:32:48 +01:00