Removed *_REGISTER_REPORTER from main path

Also simplified them to single macro: CATCH_REGISTER_REPORTER
This commit is contained in:
Martin Hořeňovský 2017-08-17 18:07:24 +02:00
parent 9a18ba042f
commit f99f511155
9 changed files with 8 additions and 12 deletions

View File

@ -115,8 +115,6 @@
#define CATCH_ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()
#define CATCH_REGISTER_REPORTER( name, reporterType ) INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType )
// "BDD-style" convenience wrappers
#define CATCH_SCENARIO( ... ) CATCH_TEST_CASE( "Scenario: " __VA_ARGS__ )
#define CATCH_SCENARIO_METHOD( className, ... ) INTERNAL_CATCH_TEST_CASE_METHOD( className, "Scenario: " __VA_ARGS__ )
@ -175,8 +173,6 @@
#define SUCCEED( ... ) INTERNAL_CATCH_MSG( "SUCCEED", Catch::ResultWas::Ok, Catch::ResultDisposition::ContinueOnFailure, __VA_ARGS__ )
#define ANON_TEST_CASE() INTERNAL_CATCH_TESTCASE()
#define REGISTER_REPORTER( name, reporterType ) INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType )
#endif
#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature )

View File

@ -54,7 +54,7 @@ namespace Catch {
};
}
#define INTERNAL_CATCH_REGISTER_REPORTER( name, reporterType ) \
#define CATCH_REGISTER_REPORTER( name, reporterType ) \
namespace{ Catch::ReporterRegistrar<reporterType> catch_internal_RegistrarFor##reporterType( name ); }
#define CATCH_REGISTER_LISTENER( listenerType ) \

View File

@ -55,7 +55,7 @@ namespace Catch {
AutomakeReporter::~AutomakeReporter() {}
#endif
INTERNAL_CATCH_REGISTER_REPORTER( "automake", AutomakeReporter)
CATCH_REGISTER_REPORTER( "automake", AutomakeReporter)
} // end namespace Catch

View File

@ -299,6 +299,6 @@ namespace Catch {
CompactReporter::~CompactReporter() {}
INTERNAL_CATCH_REGISTER_REPORTER( "compact", CompactReporter )
CATCH_REGISTER_REPORTER( "compact", CompactReporter )
} // end namespace Catch

View File

@ -634,7 +634,7 @@ namespace Catch {
bool m_headerPrinted = false;
};
INTERNAL_CATCH_REGISTER_REPORTER( "console", ConsoleReporter )
CATCH_REGISTER_REPORTER( "console", ConsoleReporter )
ConsoleReporter::~ConsoleReporter() {}

View File

@ -251,6 +251,6 @@ namespace Catch {
};
JunitReporter::~JunitReporter() {}
INTERNAL_CATCH_REGISTER_REPORTER( "junit", JunitReporter )
CATCH_REGISTER_REPORTER( "junit", JunitReporter )
} // end namespace Catch

View File

@ -248,7 +248,7 @@ namespace Catch {
TAPReporter::~TAPReporter() {}
#endif
INTERNAL_CATCH_REGISTER_REPORTER( "tap", TAPReporter )
CATCH_REGISTER_REPORTER( "tap", TAPReporter )
} // end namespace Catch

View File

@ -206,7 +206,7 @@ namespace Catch {
TeamCityReporter::~TeamCityReporter() {}
#endif
INTERNAL_CATCH_REGISTER_REPORTER( "teamcity", TeamCityReporter )
CATCH_REGISTER_REPORTER( "teamcity", TeamCityReporter )
} // end namespace Catch

View File

@ -220,6 +220,6 @@ namespace Catch {
};
XmlReporter::~XmlReporter() {}
INTERNAL_CATCH_REGISTER_REPORTER( "xml", XmlReporter )
CATCH_REGISTER_REPORTER( "xml", XmlReporter )
} // end namespace Catch