Skip to content

Commit

Permalink
Refs #21710: Rename get_matched_guids() method to matched_writers/rea…
Browse files Browse the repository at this point in the history
…ders_guids()

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
  • Loading branch information
Mario-DL committed Sep 26, 2024
1 parent 1624044 commit 9a6e632
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion include/fastdds/rtps/reader/RTPSReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ class RTPSReader
* @param[out] guids Vector to be filled with the GUIDs of the matched writers.
* @return True if the operation was successful.
*/
RTPS_DllAPI bool get_matched_guids(
RTPS_DllAPI bool matched_writers_guids(
std::vector<GUID_t>& guids) const;

/*!
Expand Down
2 changes: 1 addition & 1 deletion include/fastdds/rtps/writer/RTPSWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class RTPSWriter
* @param[out] guids Vector to be filled with the GUIDs of the matched readers.
* @return True if the operation was successful.
*/
RTPS_DllAPI bool get_matched_guids(
RTPS_DllAPI bool matched_readers_guids(
std::vector<GUID_t>& guids) const;

/**
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/reader/RTPSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ bool RTPSReader::is_sample_valid(
return true;
}

bool RTPSReader::get_matched_guids(
bool RTPSReader::matched_writers_guids(
std::vector<GUID_t>&) const
{
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/rtps/writer/RTPSWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ bool RTPSWriter::send_nts(
locator_selector.locator_selector.end(), max_blocking_time_point);
}

bool RTPSWriter::get_matched_guids(
bool RTPSWriter::matched_readers_guids(
std::vector<GUID_t>&) const
{
return false;
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox/common/RTPSBlackboxTestsReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class RTPSReaderTests : public testing::TestWithParam<communication_type>
};

/**
* Tests get_matched_guids() RTPSReader API
* Tests matched_writers_guids() RTPSReader API
*/
TEST_P(RTPSReaderTests, rtpsreader_get_matched_guids)
TEST_P(RTPSReaderTests, rtpsreader_matched_writers_guids)
{
RTPSWithRegistrationReader<HelloWorldPubSubType> reader(TEST_TOPIC_NAME);
RTPSWithRegistrationWriter<HelloWorldPubSubType> writer(TEST_TOPIC_NAME);
Expand All @@ -101,7 +101,7 @@ TEST_P(RTPSReaderTests, rtpsreader_get_matched_guids)

std::vector<GUID_t> matched_guids;
auto& native_rtps_reader = reader.get_native_reader();
ASSERT_FALSE(native_rtps_reader.get_matched_guids(matched_guids));
ASSERT_FALSE(native_rtps_reader.matched_writers_guids(matched_guids));
ASSERT_TRUE(matched_guids.empty());

writer.destroy();
Expand All @@ -123,7 +123,7 @@ TEST_P(RTPSReaderTests, rtpsreader_get_matched_guids)

reader.wait_discovery(num_matched_writers, std::chrono::seconds::zero());
ASSERT_EQ(num_matched_writers, reader.get_matched());
native_rtps_reader.get_matched_guids(matched_guids);
native_rtps_reader.matched_writers_guids(matched_guids);
ASSERT_EQ(expected_matched_guids.size(), matched_guids.size());
ASSERT_TRUE(std::is_permutation(expected_matched_guids.begin(), expected_matched_guids.end(),
matched_guids.begin()));
Expand Down
8 changes: 4 additions & 4 deletions test/blackbox/common/RTPSBlackboxTestsWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class RTPSWriterTests : public testing::TestWithParam<communication_type>
};

/**
* Tests get_matched_guids() RTPSWriter API
* Tests matched_readers_guids() RTPSWriter API
*/
TEST_P(RTPSWriterTests, rtpswriter_get_matched_guids)
TEST_P(RTPSWriterTests, rtpswriter_matched_readers_guids)
{
RTPSWithRegistrationWriter<HelloWorldPubSubType> writer(TEST_TOPIC_NAME);
RTPSWithRegistrationReader<HelloWorldPubSubType> reader(TEST_TOPIC_NAME);
Expand All @@ -101,7 +101,7 @@ TEST_P(RTPSWriterTests, rtpswriter_get_matched_guids)

std::vector<GUID_t> matched_guids;
auto& native_rtps_writer = writer.get_native_writer();
ASSERT_FALSE(native_rtps_writer.get_matched_guids(matched_guids));
ASSERT_FALSE(native_rtps_writer.matched_readers_guids(matched_guids));
ASSERT_TRUE(matched_guids.empty());

reader.destroy();
Expand All @@ -123,7 +123,7 @@ TEST_P(RTPSWriterTests, rtpswriter_get_matched_guids)

writer.wait_discovery(num_matched_readers, std::chrono::seconds::zero());
ASSERT_EQ(num_matched_readers, writer.get_matched());
native_rtps_writer.get_matched_guids(matched_guids);
native_rtps_writer.matched_readers_guids(matched_guids);
ASSERT_EQ(expected_matched_guids.size(), matched_guids.size());
ASSERT_TRUE(std::is_permutation(expected_matched_guids.begin(), expected_matched_guids.end(),
matched_guids.begin()));
Expand Down

0 comments on commit 9a6e632

Please sign in to comment.