12
12
// See the License for the specific language governing permissions and
13
13
// limitations under the License.
14
14
15
- #include " autoware_utils/ros /uuid_helper.hpp"
15
+ #include " autoware_utils_uuid /uuid_helper.hpp"
16
16
17
17
#include < boost/uuid/uuid_generators.hpp>
18
18
@@ -24,18 +24,18 @@ TEST(UUIDHelperTest, generate_uuid)
24
24
{
25
25
// Generate two UUIDs and ensure they are all different
26
26
27
- unique_identifier_msgs::msg::UUID uuid1 = autoware_utils ::generate_uuid ();
28
- unique_identifier_msgs::msg::UUID uuid2 = autoware_utils ::generate_uuid ();
27
+ unique_identifier_msgs::msg::UUID uuid1 = autoware_utils_uuid ::generate_uuid ();
28
+ unique_identifier_msgs::msg::UUID uuid2 = autoware_utils_uuid ::generate_uuid ();
29
29
30
30
EXPECT_FALSE (uuid1 == uuid2) << " Duplicate UUID generated: "
31
- << autoware_utils ::to_hex_string (uuid2);
31
+ << autoware_utils_uuid ::to_hex_string (uuid2);
32
32
}
33
33
34
34
TEST (UUIDHelperTest, generate_default_uuid)
35
35
{
36
36
// Generate two UUIDs and ensure they are all different
37
37
38
- unique_identifier_msgs::msg::UUID default_uuid = autoware_utils ::generate_default_uuid ();
38
+ unique_identifier_msgs::msg::UUID default_uuid = autoware_utils_uuid ::generate_default_uuid ();
39
39
unique_identifier_msgs::msg::UUID zero_uuid;
40
40
std::fill (zero_uuid.uuid .begin (), zero_uuid.uuid .end (), 0x00 );
41
41
@@ -48,7 +48,7 @@ TEST(UUIDHelperTest, to_hex_string)
48
48
// Populate the UUID with some values
49
49
std::fill (uuid.uuid .begin (), uuid.uuid .end (), 0x42 );
50
50
51
- std::string hex_string = autoware_utils ::to_hex_string (uuid);
51
+ std::string hex_string = autoware_utils_uuid ::to_hex_string (uuid);
52
52
53
53
// Check if the generated hex string is correct
54
54
EXPECT_EQ (hex_string, " 42424242424242424242424242424242" );
@@ -64,14 +64,14 @@ TEST(UUIDHelperTest, to_boost_uuid)
64
64
std::fill (boost_uuid.begin (), boost_uuid.end (), 0x42 );
65
65
66
66
// Check if the conversion from ROS UUID to Boost UUID is correct
67
- EXPECT_TRUE (boost_uuid == autoware_utils ::to_boost_uuid (uuid));
67
+ EXPECT_TRUE (boost_uuid == autoware_utils_uuid ::to_boost_uuid (uuid));
68
68
}
69
69
70
70
TEST (UUIDHelperTest, to_uuid_msg)
71
71
{
72
72
boost::uuids::random_generator generator;
73
73
boost::uuids::uuid boost_uuid = generator ();
74
- unique_identifier_msgs::msg::UUID ros_uuid = autoware_utils ::to_uuid_msg (boost_uuid);
74
+ unique_identifier_msgs::msg::UUID ros_uuid = autoware_utils_uuid ::to_uuid_msg (boost_uuid);
75
75
76
76
// Check if the conversion from Boost UUID to ROS UUID is correct
77
77
EXPECT_TRUE (std::equal (boost_uuid.begin (), boost_uuid.end (), ros_uuid.uuid .begin ()));
0 commit comments