diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-02-15 16:09:22 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-02-15 16:09:22 +0000 |
commit | 9b5ccc196b48ebb19a502c0ba4a22281939169f0 (patch) | |
tree | ec4ddcec6ff60319e7aaadddf1a230f44684bc18 /searchcore/src/tests/proton/persistenceengine/persistence_handler_map | |
parent | 20f84687ed1362a7f76404e2f20a6619fca05119 (diff) |
Since we are accessing the handler while under read/writer lock, there is no reason to use a shared_ptr.
Diffstat (limited to 'searchcore/src/tests/proton/persistenceengine/persistence_handler_map')
-rw-r--r-- | searchcore/src/tests/proton/persistenceengine/persistence_handler_map/persistence_handler_map_test.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/persistenceengine/persistence_handler_map/persistence_handler_map_test.cpp b/searchcore/src/tests/proton/persistenceengine/persistence_handler_map/persistence_handler_map_test.cpp index 941628891fe..35590cc68f6 100644 --- a/searchcore/src/tests/proton/persistenceengine/persistence_handler_map/persistence_handler_map_test.cpp +++ b/searchcore/src/tests/proton/persistenceengine/persistence_handler_map/persistence_handler_map_test.cpp @@ -46,16 +46,24 @@ DummyPersistenceHandler::SP handler_c(std::make_shared<DummyPersistenceHandler>( DummyPersistenceHandler::SP handler_a_new(std::make_shared<DummyPersistenceHandler>()); + +void +assertHandler(const IPersistenceHandler::SP & lhs, const IPersistenceHandler * rhs) +{ + EXPECT_EQUAL(lhs.get(), rhs); +} + void assertHandler(const IPersistenceHandler::SP &lhs, const IPersistenceHandler::SP &rhs) { EXPECT_EQUAL(lhs.get(), rhs.get()); } +template <typename T> void -assertNullHandler(const IPersistenceHandler::SP &handler) +assertNullHandler(const T & handler) { - EXPECT_TRUE(handler.get() == nullptr); + EXPECT_TRUE(! handler); } void |