Skip to content

Commit

Permalink
fixed lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Clemens Mühlbacher <[email protected]>
  • Loading branch information
cmuehlbacher committed Nov 22, 2024
1 parent e5a4318 commit 4b7244a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -549,9 +549,8 @@ TEST_F(SequentialCompressionWriterTest, snapshot_writes_to_new_file_with_file_co
auto expected_closed = fs::path(tmp_dir_storage_options_.uri) /
(bag_base_dir_ + "_" + std::to_string(i) + "." + DefaultTestCompressor);
auto expected_opened = (i == 1) ?
// The last opened file shall be empty string when we do "writer->close();"
fs::path("") : fs::path(tmp_dir_storage_options_.uri) /
(bag_base_dir_ + "_" + std::to_string(i + 1));
fs::path("") : fs::path(tmp_dir_storage_options_.uri) /
(bag_base_dir_ + "_" + std::to_string(i + 1));
ASSERT_STREQ(closed_files[i].c_str(), expected_closed.string().c_str());
ASSERT_STREQ(opened_files[i].c_str(), expected_opened.string().c_str());
}
Expand Down
6 changes: 3 additions & 3 deletions rosbag2_cpp/test/rosbag2_cpp/test_sequential_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ TEST_F(SequentialWriterTest, snapshot_writes_to_new_file_with_bag_split)
// Expect a single write call when the snapshot is triggered
EXPECT_CALL(
*storage_, write(
An<const std::vector<std::shared_ptr<const rosbag2_storage::SerializedBagMessage>> &>())
An<const std::vector<std::shared_ptr<const rosbag2_storage::SerializedBagMessage>> &>())
).Times(1);

ON_CALL(
Expand Down Expand Up @@ -576,7 +576,7 @@ TEST_F(SequentialWriterTest, snapshot_writes_to_new_file_with_bag_split)
std::string rmw_format = "rmw_format";

writer_->open(storage_options_, {rmw_format, rmw_format});
writer_->create_topic({"test_topic", "test_msgs/BasicTypes", "", ""});
writer_->create_topic({"test_topic", "test_msgs/BasicTypes", "", ""});

for (const auto & message : messages) {
writer_->write(message);
Expand Down Expand Up @@ -615,7 +615,7 @@ TEST_F(SequentialWriterTest, snapshot_can_be_called_twice)
// Expect to call write method twice. Once per each snapshot.
EXPECT_CALL(
*storage_, write(
An<const std::vector<std::shared_ptr<const rosbag2_storage::SerializedBagMessage>> &>())
An<const std::vector<std::shared_ptr<const rosbag2_storage::SerializedBagMessage>> &>())
).Times(2);

ON_CALL(*storage_, get_relative_file_path).WillByDefault(
Expand Down

0 comments on commit 4b7244a

Please sign in to comment.