Migrated ITestCase to std::shared_ptr

This commit is contained in:
Phil Nash 2017-04-25 20:45:31 +01:00
parent 0844d6e867
commit 44cccde8b9
2 changed files with 4 additions and 3 deletions

View File

@ -16,12 +16,13 @@ namespace Catch {
class TestSpec; class TestSpec;
struct ITestCase : IShared { struct ITestCase {
virtual void invoke () const = 0; virtual void invoke () const = 0;
protected:
virtual ~ITestCase(); virtual ~ITestCase();
}; };
using ITestCasePtr = std::shared_ptr<ITestCase>;
class TestCase; class TestCase;
struct IConfig; struct IConfig;

View File

@ -71,7 +71,7 @@ namespace Catch {
bool operator < ( TestCase const& other ) const; bool operator < ( TestCase const& other ) const;
private: private:
Ptr<ITestCase> test; std::shared_ptr<ITestCase> test;
}; };
TestCase makeTestCase( ITestCase* testCase, TestCase makeTestCase( ITestCase* testCase,