forked from catchorg/Catch2
struct -> class normalization for various interface types
This commit is contained in:
@@ -26,15 +26,15 @@ namespace Catch {
|
||||
struct AssertionReaction;
|
||||
struct SourceLineInfo;
|
||||
|
||||
struct ITransientExpression;
|
||||
struct IGeneratorTracker;
|
||||
class ITransientExpression;
|
||||
class IGeneratorTracker;
|
||||
|
||||
struct BenchmarkInfo;
|
||||
template <typename Duration = std::chrono::duration<double, std::nano>>
|
||||
struct BenchmarkStats;
|
||||
|
||||
struct IResultCapture {
|
||||
|
||||
class IResultCapture {
|
||||
public:
|
||||
virtual ~IResultCapture();
|
||||
|
||||
virtual bool sectionStarted( SectionInfo const& sectionInfo,
|
||||
|
||||
@@ -62,8 +62,8 @@ namespace Catch {
|
||||
class TestSpec;
|
||||
class IStream;
|
||||
|
||||
struct IConfig : Detail::NonCopyable {
|
||||
|
||||
class IConfig : public Detail::NonCopyable {
|
||||
public:
|
||||
virtual ~IConfig();
|
||||
|
||||
virtual bool allowThrows() const = 0;
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace Catch {
|
||||
};
|
||||
} // namespace Detail
|
||||
|
||||
struct IMutableEnumValuesRegistry {
|
||||
class IMutableEnumValuesRegistry {
|
||||
public:
|
||||
virtual ~IMutableEnumValuesRegistry(); // = default;
|
||||
|
||||
virtual Detail::EnumInfo const& registerEnum( StringRef enumName, StringRef allEnums, std::vector<int> const& values ) = 0;
|
||||
|
||||
@@ -17,17 +17,18 @@
|
||||
namespace Catch {
|
||||
using exceptionTranslateFunction = std::string(*)();
|
||||
|
||||
struct IExceptionTranslator;
|
||||
class IExceptionTranslator;
|
||||
using ExceptionTranslators = std::vector<Detail::unique_ptr<IExceptionTranslator const>>;
|
||||
|
||||
struct IExceptionTranslator {
|
||||
class IExceptionTranslator {
|
||||
public:
|
||||
virtual ~IExceptionTranslator(); // = default
|
||||
virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0;
|
||||
};
|
||||
|
||||
struct IExceptionTranslatorRegistry {
|
||||
class IExceptionTranslatorRegistry {
|
||||
public:
|
||||
virtual ~IExceptionTranslatorRegistry(); // = default
|
||||
|
||||
virtual std::string translateActiveException() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ namespace Catch {
|
||||
|
||||
} // namespace Generators
|
||||
|
||||
struct IGeneratorTracker {
|
||||
class IGeneratorTracker {
|
||||
public:
|
||||
virtual ~IGeneratorTracker(); // = default;
|
||||
virtual auto hasGenerator() const -> bool = 0;
|
||||
virtual auto getGenerator() const -> Generators::GeneratorBasePtr const& = 0;
|
||||
|
||||
@@ -16,14 +16,14 @@ namespace Catch {
|
||||
|
||||
class TestCaseHandle;
|
||||
struct TestCaseInfo;
|
||||
struct ITestCaseRegistry;
|
||||
struct IExceptionTranslatorRegistry;
|
||||
struct IExceptionTranslator;
|
||||
struct IReporterRegistry;
|
||||
struct IReporterFactory;
|
||||
struct ITagAliasRegistry;
|
||||
struct ITestInvoker;
|
||||
struct IMutableEnumValuesRegistry;
|
||||
class ITestCaseRegistry;
|
||||
class IExceptionTranslatorRegistry;
|
||||
class IExceptionTranslator;
|
||||
class IReporterRegistry;
|
||||
class IReporterFactory;
|
||||
class ITagAliasRegistry;
|
||||
class ITestInvoker;
|
||||
class IMutableEnumValuesRegistry;
|
||||
struct SourceLineInfo;
|
||||
|
||||
class StartupExceptionRegistry;
|
||||
@@ -31,7 +31,8 @@ namespace Catch {
|
||||
|
||||
using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>;
|
||||
|
||||
struct IRegistryHub {
|
||||
class IRegistryHub {
|
||||
public:
|
||||
virtual ~IRegistryHub(); // = default
|
||||
|
||||
virtual IReporterRegistry const& getReporterRegistry() const = 0;
|
||||
@@ -43,7 +44,8 @@ namespace Catch {
|
||||
virtual StartupExceptionRegistry const& getStartupExceptionRegistry() const = 0;
|
||||
};
|
||||
|
||||
struct IMutableRegistryHub {
|
||||
class IMutableRegistryHub {
|
||||
public:
|
||||
virtual ~IMutableRegistryHub(); // = default
|
||||
virtual void registerReporter( std::string const& name, IReporterFactoryPtr factory ) = 0;
|
||||
virtual void registerListener( Detail::unique_ptr<EventListenerFactory> factory ) = 0;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Catch {
|
||||
struct TagInfo;
|
||||
struct TestCaseInfo;
|
||||
class TestCaseHandle;
|
||||
struct IConfig;
|
||||
class IConfig;
|
||||
class IStream;
|
||||
enum class ColourMode : std::uint8_t;
|
||||
|
||||
|
||||
@@ -15,12 +15,13 @@
|
||||
namespace Catch {
|
||||
|
||||
struct ReporterConfig;
|
||||
struct IConfig;
|
||||
class IConfig;
|
||||
class IEventListener;
|
||||
using IEventListenerPtr = Detail::unique_ptr<IEventListener>;
|
||||
|
||||
|
||||
struct IReporterFactory {
|
||||
class IReporterFactory {
|
||||
public:
|
||||
virtual ~IReporterFactory(); // = default
|
||||
|
||||
virtual IEventListenerPtr
|
||||
|
||||
@@ -17,16 +17,17 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
struct IConfig;
|
||||
class IConfig;
|
||||
|
||||
class IEventListener;
|
||||
using IEventListenerPtr = Detail::unique_ptr<IEventListener>;
|
||||
struct IReporterFactory;
|
||||
class IReporterFactory;
|
||||
using IReporterFactoryPtr = Detail::unique_ptr<IReporterFactory>;
|
||||
struct ReporterConfig;
|
||||
class EventListenerFactory;
|
||||
|
||||
struct IReporterRegistry {
|
||||
class IReporterRegistry {
|
||||
public:
|
||||
using FactoryMap = std::map<std::string, IReporterFactoryPtr, Detail::CaseInsensitiveLess>;
|
||||
using Listeners = std::vector<Detail::unique_ptr<EventListenerFactory>>;
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ namespace Catch {
|
||||
|
||||
struct TagAlias;
|
||||
|
||||
struct ITagAliasRegistry {
|
||||
class ITagAliasRegistry {
|
||||
public:
|
||||
virtual ~ITagAliasRegistry(); // = default
|
||||
// Nullptr if not present
|
||||
virtual TagAlias const* find( std::string const& alias ) const = 0;
|
||||
|
||||
@@ -15,15 +15,17 @@ namespace Catch {
|
||||
class TestSpec;
|
||||
struct TestCaseInfo;
|
||||
|
||||
struct ITestInvoker {
|
||||
class ITestInvoker {
|
||||
public:
|
||||
virtual void invoke () const = 0;
|
||||
virtual ~ITestInvoker(); // = default
|
||||
};
|
||||
|
||||
class TestCaseHandle;
|
||||
struct IConfig;
|
||||
class IConfig;
|
||||
|
||||
struct ITestCaseRegistry {
|
||||
class ITestCaseRegistry {
|
||||
public:
|
||||
virtual ~ITestCaseRegistry(); // = default
|
||||
// TODO: this exists only for adding filenames to test cases -- let's expose this in a saner way later
|
||||
virtual std::vector<TestCaseInfo* > const& getAllInfos() const = 0;
|
||||
|
||||
Reference in New Issue
Block a user