Skip to content

Commit

Permalink
Refs #21183: Mark DataReaderHistoryTests type support mocked methods …
Browse files Browse the repository at this point in the history
…as override

Signed-off-by: eduponz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Jun 20, 2024
1 parent fb78961 commit bf46800
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions test/unittest/dds/subscriber/DataReaderHistoryTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,41 @@ class TestType : public TopicDataType
{
public:

MOCK_METHOD2(serialize, bool(
MOCK_METHOD(bool, serialize, (
const void* const data,
eprosima::fastdds::rtps::SerializedPayload_t* payload));
eprosima::fastdds::rtps::SerializedPayload_t* payload),
(override));

MOCK_METHOD3(serialize, bool(
MOCK_METHOD(bool, serialize, (
const void* const data,
eprosima::fastdds::rtps::SerializedPayload_t* payload,
DataRepresentationId_t data_representation));
DataRepresentationId_t data_representation),
(override));

MOCK_METHOD2(deserialize, bool(
MOCK_METHOD(bool, deserialize, (
eprosima::fastdds::rtps::SerializedPayload_t* payload,
void* data));
void* data),
(override));

MOCK_METHOD2(getSerializedSizeProvider, std::function<uint32_t()> (
const void* const data, DataRepresentationId_t data_representation));
MOCK_METHOD(std::function<uint32_t()>, getSerializedSizeProvider, (
const void* const data, DataRepresentationId_t data_representation),
(override));

MOCK_METHOD1(getSerializedSizeProvider, std::function<uint32_t()> (
const void* const data));
MOCK_METHOD(std::function<uint32_t()>, getSerializedSizeProvider, (
const void* const data),
(override));

MOCK_METHOD0(createData, void* ());
MOCK_METHOD(void*, createData, (), (override));

MOCK_METHOD1(deleteData, void(
void* data));
MOCK_METHOD(void, deleteData, (
void* data),
(override));

MOCK_METHOD3(getKey, bool(
MOCK_METHOD(bool, getKey, (
const void* const data,
eprosima::fastdds::dds::InstanceHandle_t* ihandle,
bool));
bool),
(override));
};

/*!
Expand Down

0 comments on commit bf46800

Please sign in to comment.