2012-08-06 15:16:53 -04:00
|
|
|
/*
|
|
|
|
* Created by Phil on 5/8/2012.
|
|
|
|
* Copyright 2012 Two Blue Cubes Ltd. All rights reserved.
|
|
|
|
*
|
|
|
|
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
|
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
*/
|
2012-08-09 02:47:30 -04:00
|
|
|
#ifndef TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
|
|
|
|
#define TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
|
2012-08-06 03:33:15 -04:00
|
|
|
|
2012-08-06 15:16:53 -04:00
|
|
|
#include "catch_interfaces_reporter.h"
|
|
|
|
#include "catch_interfaces_config.h"
|
2012-08-06 03:33:15 -04:00
|
|
|
|
2012-08-06 15:16:53 -04:00
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
#include <stdlib.h>
|
2012-08-06 03:33:15 -04:00
|
|
|
|
2012-08-06 15:16:53 -04:00
|
|
|
namespace Catch {
|
2012-08-06 03:33:15 -04:00
|
|
|
|
2012-08-06 15:16:53 -04:00
|
|
|
class TestCaseInfo;
|
|
|
|
struct IResultCapture;
|
|
|
|
struct ITestCaseRegistry;
|
|
|
|
struct IExceptionTranslatorRegistry;
|
|
|
|
struct IExceptionTranslator;
|
|
|
|
|
2012-08-07 02:58:34 -04:00
|
|
|
struct IRegistryHub {
|
|
|
|
virtual ~IRegistryHub(){}
|
2012-08-06 15:16:53 -04:00
|
|
|
|
|
|
|
virtual const IReporterRegistry& getReporterRegistry() const = 0;
|
|
|
|
virtual const ITestCaseRegistry& getTestCaseRegistry() const = 0;
|
|
|
|
virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() = 0;
|
|
|
|
};
|
|
|
|
|
2012-08-07 02:58:34 -04:00
|
|
|
struct IMutableRegistryHub {
|
|
|
|
virtual ~IMutableRegistryHub(){}
|
2012-08-06 15:16:53 -04:00
|
|
|
virtual void registerReporter( const std::string& name, IReporterFactory* factory ) = 0;
|
|
|
|
virtual void registerTest( const TestCaseInfo& testInfo ) = 0;
|
|
|
|
virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;
|
|
|
|
};
|
|
|
|
|
2012-08-07 02:58:34 -04:00
|
|
|
IRegistryHub& getRegistryHub();
|
|
|
|
IMutableRegistryHub& getMutableRegistryHub();
|
2012-08-06 15:16:53 -04:00
|
|
|
void cleanUp();
|
|
|
|
}
|
|
|
|
|
2012-08-09 02:47:30 -04:00
|
|
|
#endif // TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
|