2012-08-06 21:16:53 +02: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 08:47:30 +02:00
|
|
|
#ifndef TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
|
|
|
|
#define TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
|
2012-08-06 09:33:15 +02:00
|
|
|
|
2012-08-06 21:16:53 +02:00
|
|
|
#include "catch_interfaces_reporter.h"
|
|
|
|
#include "catch_interfaces_config.h"
|
2012-08-06 09:33:15 +02:00
|
|
|
|
2012-08-06 21:16:53 +02:00
|
|
|
#include <vector>
|
2012-08-06 09:33:15 +02:00
|
|
|
|
2012-08-06 21:16:53 +02:00
|
|
|
namespace Catch {
|
2012-08-06 09:33:15 +02:00
|
|
|
|
2012-11-22 20:17:20 +01:00
|
|
|
class TestCase;
|
2012-08-06 21:16:53 +02:00
|
|
|
struct ITestCaseRegistry;
|
|
|
|
struct IExceptionTranslatorRegistry;
|
|
|
|
struct IExceptionTranslator;
|
|
|
|
|
2012-08-07 08:58:34 +02:00
|
|
|
struct IRegistryHub {
|
2012-08-13 08:46:10 +02:00
|
|
|
virtual ~IRegistryHub();
|
2012-08-06 21:16:53 +02:00
|
|
|
|
|
|
|
virtual const IReporterRegistry& getReporterRegistry() const = 0;
|
|
|
|
virtual const ITestCaseRegistry& getTestCaseRegistry() const = 0;
|
|
|
|
virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() = 0;
|
|
|
|
};
|
|
|
|
|
2012-08-07 08:58:34 +02:00
|
|
|
struct IMutableRegistryHub {
|
2012-08-13 08:46:10 +02:00
|
|
|
virtual ~IMutableRegistryHub();
|
2012-08-06 21:16:53 +02:00
|
|
|
virtual void registerReporter( const std::string& name, IReporterFactory* factory ) = 0;
|
2012-11-22 20:17:20 +01:00
|
|
|
virtual void registerTest( const TestCase& testInfo ) = 0;
|
2012-08-06 21:16:53 +02:00
|
|
|
virtual void registerTranslator( const IExceptionTranslator* translator ) = 0;
|
|
|
|
};
|
|
|
|
|
2012-08-07 08:58:34 +02:00
|
|
|
IRegistryHub& getRegistryHub();
|
|
|
|
IMutableRegistryHub& getMutableRegistryHub();
|
2012-08-06 21:16:53 +02:00
|
|
|
void cleanUp();
|
2012-10-17 09:14:22 +02:00
|
|
|
std::string translateActiveException();
|
|
|
|
|
2012-08-06 21:16:53 +02:00
|
|
|
}
|
|
|
|
|
2012-08-09 08:47:30 +02:00
|
|
|
#endif // TWOBLUECUBES_CATCH_INTERFACES_REGISTRY_HUB_H_INCLUDED
|