Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_registry_hub.hpp
diff options
context:
space:
mode:
authorPhil Nash2015-12-04 10:19:08 +0000
committerPhil Nash2015-12-04 10:19:08 +0000
commitfdc42d0af47f58fa13a42b685bbeaf55a8347673 (patch)
tree779ff3d692eeffd33353d89ad7697a592ab5201e /include/internal/catch_registry_hub.hpp
parentd758428fe297655e558a86cc6a013fcb1bcc8c7d (diff)
parentd274fc571c3980b5ac04cbe1416cf2205e6c99f7 (diff)
downloadcatch3-1.3.0.tar.gz
Merged from develop branchv1.3.0
- now v1.3.0
Diffstat (limited to 'include/internal/catch_registry_hub.hpp')
-rw-r--r--include/internal/catch_registry_hub.hpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/internal/catch_registry_hub.hpp b/include/internal/catch_registry_hub.hpp
index 303a843a..35293bf5 100644
--- a/include/internal/catch_registry_hub.hpp
+++ b/include/internal/catch_registry_hub.hpp
@@ -26,24 +26,27 @@ namespace Catch {
public: // IRegistryHub
RegistryHub() {
}
- virtual IReporterRegistry const& getReporterRegistry() const {
+ virtual IReporterRegistry const& getReporterRegistry() const CATCH_OVERRIDE {
return m_reporterRegistry;
}
- virtual ITestCaseRegistry const& getTestCaseRegistry() const {
+ virtual ITestCaseRegistry const& getTestCaseRegistry() const CATCH_OVERRIDE {
return m_testCaseRegistry;
}
- virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() {
+ virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() CATCH_OVERRIDE {
return m_exceptionTranslatorRegistry;
}
public: // IMutableRegistryHub
- virtual void registerReporter( std::string const& name, IReporterFactory* factory ) {
+ virtual void registerReporter( std::string const& name, Ptr<IReporterFactory> const& factory ) CATCH_OVERRIDE {
m_reporterRegistry.registerReporter( name, factory );
}
- virtual void registerTest( TestCase const& testInfo ) {
+ virtual void registerListener( Ptr<IReporterFactory> const& factory ) CATCH_OVERRIDE {
+ m_reporterRegistry.registerListener( factory );
+ }
+ virtual void registerTest( TestCase const& testInfo ) CATCH_OVERRIDE {
m_testCaseRegistry.registerTest( testInfo );
}
- virtual void registerTranslator( const IExceptionTranslator* translator ) {
+ virtual void registerTranslator( const IExceptionTranslator* translator ) CATCH_OVERRIDE {
m_exceptionTranslatorRegistry.registerTranslator( translator );
}
@@ -55,7 +58,7 @@ namespace Catch {
// Single, global, instance
inline RegistryHub*& getTheRegistryHub() {
- static RegistryHub* theRegistryHub = NULL;
+ static RegistryHub* theRegistryHub = CATCH_NULL;
if( !theRegistryHub )
theRegistryHub = new RegistryHub();
return theRegistryHub;
@@ -70,7 +73,7 @@ namespace Catch {
}
void cleanUp() {
delete getTheRegistryHub();
- getTheRegistryHub() = NULL;
+ getTheRegistryHub() = CATCH_NULL;
cleanUpContext();
}
std::string translateActiveException() {