Skip to content

Commit

Permalink
Expect an optional call to deserialize
Browse files Browse the repository at this point in the history
Signed-off-by: Jesper Smith <[email protected]>
  • Loading branch information
jespersmith committed Nov 14, 2024
1 parent f453fdf commit bff7ed4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rosbag2_cpp/test/rosbag2_cpp/test_sequential_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ TEST_F(SequentialReaderTest, read_next_uses_converters_to_convert_serialization_
EXPECT_CALL(*converter_factory_, load_deserializer(storage_serialization_format_))
.WillRepeatedly(
[](const std::string &) {
return std::make_unique<StrictMock<MockConverter>>();
auto deserializer = std::make_unique<StrictMock<MockConverter>>();
EXPECT_CALL(*deserializer, deserialize(_, _, _)).Times(AtMost(1));
return deserializer;
});
EXPECT_CALL(*converter_factory_, load_serializer(output_format))
.WillOnce(Return(ByMove(std::move(format2_converter))));
Expand Down

0 comments on commit bff7ed4

Please sign in to comment.