Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorPhil Nash2017-04-25 20:45:31 +0100
committerPhil Nash2017-04-25 21:56:14 +0100
commit44cccde8b96894da8bac001ca788ff6c63c8de42 (patch)
tree65afe9ee2c81cfb9e9b456f5f5d22cecac2d835c /include
parent0844d6e8677d400f1c363f2d48dc6cf74075b8d5 (diff)
downloadcatch3-44cccde8b96894da8bac001ca788ff6c63c8de42.tar.gz
Migrated ITestCase to std::shared_ptr
Diffstat (limited to 'include')
-rw-r--r--include/internal/catch_interfaces_testcase.h5
-rw-r--r--include/internal/catch_test_case_info.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/include/internal/catch_interfaces_testcase.h b/include/internal/catch_interfaces_testcase.h
index a1052b71..0c759166 100644
--- a/include/internal/catch_interfaces_testcase.h
+++ b/include/internal/catch_interfaces_testcase.h
@@ -16,12 +16,13 @@ namespace Catch {
class TestSpec;
- struct ITestCase : IShared {
+ struct ITestCase {
virtual void invoke () const = 0;
- protected:
virtual ~ITestCase();
};
+ using ITestCasePtr = std::shared_ptr<ITestCase>;
+
class TestCase;
struct IConfig;
diff --git a/include/internal/catch_test_case_info.h b/include/internal/catch_test_case_info.h
index 08519c5c..ac83cb3f 100644
--- a/include/internal/catch_test_case_info.h
+++ b/include/internal/catch_test_case_info.h
@@ -71,7 +71,7 @@ namespace Catch {
bool operator < ( TestCase const& other ) const;
private:
- Ptr<ITestCase> test;
+ std::shared_ptr<ITestCase> test;
};
TestCase makeTestCase( ITestCase* testCase,