19# pragma warning (disable : 4702)
22TEST_CASE(
"TeamCity passes unconditionally succeeding assertion",
"[teamcity]" ) {
27TEST_CASE(
"TeamCity reports unconditionally failing assertion",
"[teamcity]" ) {
32TEST_CASE(
"TeamCity reports failing check",
"[teamcity]" ) {
37TEST_CASE(
"TeamCity reports failing check-false",
"[teamcity]" ) {
42TEST_CASE(
"TeamCity reports failing check-that",
"[teamcity]" ) {
44 using namespace Catch;
49TEST_CASE(
"TeamCity reports unexpected exception",
"[teamcity]" ) {
51 REQUIRE( (
throw std::runtime_error(
"surprise!"),
true) );
54TEST_CASE(
"TeamCity reports undesired exception",
"[teamcity]" ) {
59TEST_CASE(
"TeamCity reports missing expected exception",
"[teamcity]" ) {
64TEST_CASE(
"TeamCity reports missing specific expected exception",
"[teamcity]" ) {
69TEST_CASE(
"TeamCity reports unexpected message in expected exception",
"[teamcity]" ) {
71 using namespace Catch;
80 :
std::runtime_error( text ) {}
98 bool match( std::runtime_error
const & arg )
const override
100 return m_text == arg.what() ;
112TEST_CASE(
"TeamCity failing check-throws-matches",
"[teamcity]" ) {
122TEST_CASE(
"TeamCity throwing exception with tag [!throws]",
"[teamcity][!throws]" ) {
129TEST_CASE(
"TeamCity failing assertion with tag [!mayfail]",
"[teamcity][!mayfail] " ) {
138TEST_CASE(
"TeamCity succeeding assertion with tag [!shouldfail]",
"[teamcity][!shouldfail]" ) {
140 SUCCEED(
"Marked [!shouldfail]" );
#define CHECK_THROWS_WITH(expr, matcher)
#define CHECK_THROWS_MATCHES(expr, exceptionType, matcher)
#define REQUIRE_NOTHROW(...)
#define REQUIRE_THAT(arg, matcher)
#define REQUIRE_FALSE(...)
#define REQUIRE_THROWS_AS(expr, exceptionType)
#define REQUIRE_THROWS(...)
MyException(char const *text)
std::string describe() const override
~MyExceptionMatcher() override
MyExceptionMatcher(char const *text)
bool match(std::runtime_error const &arg) const override