summaryrefslogtreecommitdiff
path: root/test/test-persistence.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-01 18:29:26 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-07 16:41:37 +0000
commit9923219ce7e1f791b079ecaf21cb20d0938f8d6a (patch)
treeb1bacec57623c81f19d361a23a4d6287b802199c /test/test-persistence.cpp
parentLots of test cases, few minor fixes (diff)
downloadilt-9923219ce7e1f791b079ecaf21cb20d0938f8d6a.tar.bz2
ilt-9923219ce7e1f791b079ecaf21cb20d0938f8d6a.tar.xz
ilt-9923219ce7e1f791b079ecaf21cb20d0938f8d6a.zip
Common implementation for shared and unique pointers
Diffstat (limited to 'test/test-persistence.cpp')
-rw-r--r--test/test-persistence.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test-persistence.cpp b/test/test-persistence.cpp
index 6dcb94d..523ca41 100644
--- a/test/test-persistence.cpp
+++ b/test/test-persistence.cpp
@@ -215,6 +215,14 @@ BOOST_FIXTURE_TEST_CASE(load_shared_object2, JPP)
BOOST_CHECK_EQUAL(to->ssptr.use_count(), 2);
}
+BOOST_FIXTURE_TEST_CASE(load_shared_object3, JPP)
+{
+ auto to = load_json<std::unique_ptr<SharedTestObject>>(FIXTURESDIR "json/shared_ptr3.json");
+ BOOST_CHECK(to->sptr);
+ BOOST_CHECK(to->ssptr);
+ BOOST_CHECK_NE(to->sptr, to->ssptr);
+}
+
BOOST_FIXTURE_TEST_CASE(load_shared_object_null, JPP)
{
auto to = load_json<std::unique_ptr<SharedTestObject>>(FIXTURESDIR "json/shared_ptr_null.json");