Skip to content

Commit

Permalink
Renames in the get_service_info tests
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Orlov <michael.orlov@apex.ai>
  • Loading branch information
MichaelOrlov committed Nov 7, 2023
1 parent 01a48c3 commit ef4c2c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
8 changes: 4 additions & 4 deletions rosbag2_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@ if(BUILD_TESTING)
)
endif()

ament_add_gmock(test_rosbag2_info_get_service_info
test/rosbag2_tests/test_rosbag2_info_get_service_info.cpp
ament_add_gmock(test_rosbag2_cpp_get_service_info
test/rosbag2_tests/test_rosbag2_cpp_get_service_info.cpp
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
if(TARGET test_rosbag2_info_get_service_info)
target_link_libraries(test_rosbag2_info_get_service_info
if(TARGET test_rosbag2_cpp_get_service_info)
target_link_libraries(test_rosbag2_cpp_get_service_info
rosbag2_cpp::rosbag2_cpp
rosbag2_storage::rosbag2_storage
rosbag2_test_common::rosbag2_test_common
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class SequentialWriterForTest : public rosbag2_cpp::writers::SequentialWriter
}
};

class GetServiceInfoTest : public rosbag2_test_common::ParametrizedTemporaryDirectoryFixture
class Rosbag2CPPGetServiceInfoTest
: public rosbag2_test_common::ParametrizedTemporaryDirectoryFixture
{
public:
void SetUp() override
Expand Down Expand Up @@ -146,7 +147,7 @@ class GetServiceInfoTest : public rosbag2_test_common::ParametrizedTemporaryDire
std::atomic_bool exit_from_node_spinner_{false};
};

TEST_P(GetServiceInfoTest, only_topics_bag_test) {
TEST_P(Rosbag2CPPGetServiceInfoTest, get_service_info_for_bag_with_topics_only) {
const std::string storage_id = GetParam();
const auto bag_path_str = get_bag_path_str();
{
Expand All @@ -169,7 +170,7 @@ TEST_P(GetServiceInfoTest, only_topics_bag_test) {
EXPECT_TRUE(ret_service_infos.empty());
}

TEST_P(GetServiceInfoTest, only_services_bag_test) {
TEST_P(Rosbag2CPPGetServiceInfoTest, get_service_info_for_bag_with_services_only) {
const std::string storage_id = GetParam();
const std::string bag_path_str = get_bag_path_str();

Expand Down Expand Up @@ -236,7 +237,7 @@ TEST_P(GetServiceInfoTest, only_services_bag_test) {
EXPECT_EQ(ret_service_infos[0]->serialization_format, "cdr");
}

TEST_P(GetServiceInfoTest, topics_and_services_bag_test) {
TEST_P(Rosbag2CPPGetServiceInfoTest, get_service_info_for_bag_with_topics_and_services) {
const std::string storage_id = GetParam();
const std::string bag_path_str = get_bag_path_str();

Expand Down Expand Up @@ -331,6 +332,6 @@ TEST_P(GetServiceInfoTest, topics_and_services_bag_test) {

INSTANTIATE_TEST_SUITE_P(
TestInfoGetServiceInfo,
GetServiceInfoTest,
Rosbag2CPPGetServiceInfoTest,
::testing::ValuesIn(rosbag2_test_common::kTestedStorageIDs)
);

0 comments on commit ef4c2c4

Please sign in to comment.