diff options
| author | William A. Kennington III <wak@google.com> | 2018-11-13 14:31:47 -0800 |
|---|---|---|
| committer | William A. Kennington III <wak@google.com> | 2019-03-29 14:18:57 -0700 |
| commit | b555c4e6ee0d6af411876c61931e0e5b71bc6d5a (patch) | |
| tree | 7bb5b77fd2dd24c37f65f4e6e357891fdee9cf14 /test/source/base.cpp | |
| parent | e04cb03ba08f61f9d07e61764fee545c55f62f35 (diff) | |
| download | sdeventplus-b555c4e6ee0d6af411876c61931e0e5b71bc6d5a.tar.gz sdeventplus-b555c4e6ee0d6af411876c61931e0e5b71bc6d5a.zip | |
source/base: Remove unused ref constructor
We don't ever use this constructor and it was effectively package
private. Remove it as we don't ever need to add references to our
sd_event_source*.
Tested:
Built and run through unit test suite.
Change-Id: I1ca9fd4ecfdef1a3fd5aa2ca214be657c1a04b94
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'test/source/base.cpp')
| -rw-r--r-- | test/source/base.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/test/source/base.cpp b/test/source/base.cpp index 2139dd0..27e5bc3 100644 --- a/test/source/base.cpp +++ b/test/source/base.cpp @@ -30,9 +30,6 @@ using UniqueEvent = std::unique_ptr<Event, std::function<void(Event*)>>; class BaseImpl : public Base { public: - BaseImpl(const Event& event, sd_event_source* source) : Base(event, source) - { - } BaseImpl(const Event& event, sd_event_source* source, std::false_type) : Base(event, source, std::false_type()) { @@ -115,25 +112,6 @@ class BaseTest : public testing::Test } }; -TEST_F(BaseTest, NewBaseRef) -{ - EXPECT_CALL(mock, sd_event_ref(expected_event)) - .WillOnce(Return(expected_event)); - EXPECT_CALL(mock, sd_event_source_ref(expected_source)) - .WillOnce(Return(expected_source)); - void* userdata; - EXPECT_CALL(mock, sd_event_source_set_userdata(expected_source, testing::_)) - .WillOnce(DoAll(SaveArg<1>(&userdata), Return(nullptr))); - BaseImpl source(*event, expected_source); - EXPECT_EQ(&source, userdata); - EXPECT_EQ(expected_source, source.get()); - EXPECT_NE(event.get(), &source.get_event()); - EXPECT_EQ(expected_event, source.get_event().get()); - EXPECT_FALSE(source.get_prepare()); - - expect_base_destruct(*event, expected_source); -} - TEST_F(BaseTest, NewBaseNoRef) { EXPECT_CALL(mock, sd_event_ref(expected_event)) |

