mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-23 04:55:40 +02:00
Migrated Config and IConfig to shared_ptr (from Ptr)
This commit is contained in:
@@ -21,6 +21,8 @@ namespace Catch {
|
||||
struct IGeneratorsForTest;
|
||||
struct IConfig;
|
||||
|
||||
using IConfigPtr = std::shared_ptr<IConfig const>;
|
||||
|
||||
struct IContext
|
||||
{
|
||||
virtual ~IContext();
|
||||
@@ -29,7 +31,7 @@ namespace Catch {
|
||||
virtual IRunner* getRunner() = 0;
|
||||
virtual size_t getGeneratorIndex( std::string const& fileInfo, size_t totalSize ) = 0;
|
||||
virtual bool advanceGeneratorsForCurrentTest() = 0;
|
||||
virtual Ptr<IConfig const> getConfig() const = 0;
|
||||
virtual IConfigPtr getConfig() const = 0;
|
||||
};
|
||||
|
||||
struct IMutableContext : IContext
|
||||
@@ -37,7 +39,7 @@ namespace Catch {
|
||||
virtual ~IMutableContext();
|
||||
virtual void setResultCapture( IResultCapture* resultCapture ) = 0;
|
||||
virtual void setRunner( IRunner* runner ) = 0;
|
||||
virtual void setConfig( Ptr<IConfig const> const& config ) = 0;
|
||||
virtual void setConfig( IConfigPtr const& config ) = 0;
|
||||
};
|
||||
|
||||
IContext& getCurrentContext();
|
||||
|
Reference in New Issue
Block a user