15 #include <gtest/gtest.h>
21 TEST(TestMessages, Instantiation) {
22 [[maybe_unused]]
auto msg1 = beluga_ros::msg::ColorRGBA{};
23 [[maybe_unused]]
auto msg2 = beluga_ros::msg::LaserScan{};
24 [[maybe_unused]]
auto msg3 = beluga_ros::msg::Marker{};
25 [[maybe_unused]]
auto msg4 = beluga_ros::msg::MarkerArray{};
26 [[maybe_unused]]
auto msg5 = beluga_ros::msg::OccupancyGrid{};
27 [[maybe_unused]]
auto msg6 = beluga_ros::msg::Point{};
28 [[maybe_unused]]
auto msg7 = beluga_ros::msg::Pose{};
29 [[maybe_unused]]
auto msg8 = beluga_ros::msg::PoseArray{};
30 [[maybe_unused]]
auto msg9 = beluga_ros::msg::Transform{};
33 TEST(TestMessages, Stamping) {
34 auto message = beluga_ros::msg::PoseArray{};
36 EXPECT_EQ(
message.header.frame_id,
"some_frame");
37 EXPECT_EQ(
message.header.stamp.sec, 5);
40 TEST(TestMessages, StampingMany) {
41 auto message = beluga_ros::msg::MarkerArray{};
42 message.markers.insert(
message.markers.end(), 5U, beluga_ros::msg::Marker{});
44 for (
const auto& marker :
message.markers) {
45 EXPECT_EQ(marker.header.frame_id,
"some_frame");
46 EXPECT_EQ(marker.header.stamp.sec, 5);