diff --git a/test/blackbox/common/BlackboxTestsTransportSHM.cpp b/test/blackbox/common/BlackboxTestsTransportSHM.cpp index 6b53a6598dd..e01569ca6f5 100644 --- a/test/blackbox/common/BlackboxTestsTransportSHM.cpp +++ b/test/blackbox/common/BlackboxTestsTransportSHM.cpp @@ -155,7 +155,7 @@ TEST(SHM, IgnoreNonExistentSegment) } // Check logs Log::Flush(); - EXPECT_EQ(helper_consumer->ConsumedEntries().size(), 0); + EXPECT_EQ(helper_consumer->ConsumedEntries().size(), 0u); // Clean-up Log::Reset(); // This calls to ClearConsumers, which deletes the registered consumer diff --git a/test/blackbox/common/DDSBlackboxTestsBasic.cpp b/test/blackbox/common/DDSBlackboxTestsBasic.cpp index bf626cfdb0f..4a932eb32af 100644 --- a/test/blackbox/common/DDSBlackboxTestsBasic.cpp +++ b/test/blackbox/common/DDSBlackboxTestsBasic.cpp @@ -694,7 +694,7 @@ TEST(DDSBasic, participant_ignore_local_endpoints_two_participants) EXPECT_TRUE(samples.empty()); // Wait for reception - EXPECT_EQ(reader.block_for_all(std::chrono::seconds(1)), 5); + EXPECT_EQ(reader.block_for_all(std::chrono::seconds(1)), 5u); } /** diff --git a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp index e18f9f24e8d..53e46e925db 100644 --- a/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp +++ b/test/blackbox/common/DDSBlackboxTestsContentFilter.cpp @@ -373,7 +373,7 @@ class DDSContentFilter : public testing::TestWithParam } else { - EXPECT_EQ(filter_counter.content_filter_info_count, 0); + EXPECT_EQ(filter_counter.content_filter_info_count, 0u); EXPECT_EQ(filter_counter.max_filter_signature_number, 0u); } } diff --git a/test/blackbox/common/DDSBlackboxTestsMonitorService.cpp b/test/blackbox/common/DDSBlackboxTestsMonitorService.cpp index 294969e2470..07ba4b7297a 100644 --- a/test/blackbox/common/DDSBlackboxTestsMonitorService.cpp +++ b/test/blackbox/common/DDSBlackboxTestsMonitorService.cpp @@ -1253,7 +1253,7 @@ TEST(DDSMonitorServiceTest, monitor_service_simple_proxy) writer_proxy_msg.status_kind(eprosima::fastdds::statistics::PROXY); StatisticsGUIDList guids = MSP.get_writer_guids(); - ASSERT_EQ(guids.size(), 1); + ASSERT_EQ(guids.size(), 1u); writer_proxy_msg.local_entity(guids.back()); expected_msgs.push_back(writer_proxy_msg); diff --git a/test/blackbox/common/RTPSBlackboxTestsDiscovery.cpp b/test/blackbox/common/RTPSBlackboxTestsDiscovery.cpp index 63f372aba13..84befaae27a 100644 --- a/test/blackbox/common/RTPSBlackboxTestsDiscovery.cpp +++ b/test/blackbox/common/RTPSBlackboxTestsDiscovery.cpp @@ -809,11 +809,11 @@ TEST_P(RTPSDiscovery, ContentFilterRegistrationWithoutCFP) return Iterations::DISCOVERED_READER == iteration || Iterations::WITH_ERROR == iteration; }); ASSERT_EQ(Iterations::DISCOVERED_READER, iteration); - ASSERT_EQ(0, content_filter_property.content_filtered_topic_name.size()); - ASSERT_EQ(0, content_filter_property.related_topic_name.size()); - ASSERT_EQ(0, content_filter_property.filter_class_name.size()); - ASSERT_EQ(0, content_filter_property.filter_expression.size()); - ASSERT_EQ(0, content_filter_property.expression_parameters.size()); + ASSERT_EQ(0u, content_filter_property.content_filtered_topic_name.size()); + ASSERT_EQ(0u, content_filter_property.related_topic_name.size()); + ASSERT_EQ(0u, content_filter_property.filter_class_name.size()); + ASSERT_EQ(0u, content_filter_property.filter_expression.size()); + ASSERT_EQ(0u, content_filter_property.expression_parameters.size()); } // Test second iteration: expect ReaderDiscoveryInfo::CHANGED_QOS_READER. @@ -825,11 +825,11 @@ TEST_P(RTPSDiscovery, ContentFilterRegistrationWithoutCFP) return Iterations::CHANGED_QOS_READER == iteration || Iterations::WITH_ERROR == iteration; }); ASSERT_EQ(Iterations::CHANGED_QOS_READER, iteration); - ASSERT_EQ(0, content_filter_property.content_filtered_topic_name.size()); - ASSERT_EQ(0, content_filter_property.related_topic_name.size()); - ASSERT_EQ(0, content_filter_property.filter_class_name.size()); - ASSERT_EQ(0, content_filter_property.filter_expression.size()); - ASSERT_EQ(0, content_filter_property.expression_parameters.size()); + ASSERT_EQ(0u, content_filter_property.content_filtered_topic_name.size()); + ASSERT_EQ(0u, content_filter_property.related_topic_name.size()); + ASSERT_EQ(0u, content_filter_property.filter_class_name.size()); + ASSERT_EQ(0u, content_filter_property.filter_expression.size()); + ASSERT_EQ(0u, content_filter_property.expression_parameters.size()); } } diff --git a/test/unittest/dds/subscriber/DataReaderInstanceTests.cpp b/test/unittest/dds/subscriber/DataReaderInstanceTests.cpp index ec13b244702..919e67c82e6 100644 --- a/test/unittest/dds/subscriber/DataReaderInstanceTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderInstanceTests.cpp @@ -70,7 +70,7 @@ TEST(DataReaderInstance, writer_update_its_ownership_strength) // Anything changes because it is not an "alive" writer of the instance. ASSERT_EQ(dw3_guid, instance.current_owner.first); ASSERT_EQ(14u, instance.current_owner.second); - ASSERT_EQ(3, instance.alive_writers.size()); + ASSERT_EQ(3u, instance.alive_writers.size()); } /*! diff --git a/test/unittest/dds/subscriber/DataReaderTests.cpp b/test/unittest/dds/subscriber/DataReaderTests.cpp index a7f1ee7b87a..38a272c507a 100644 --- a/test/unittest/dds/subscriber/DataReaderTests.cpp +++ b/test/unittest/dds/subscriber/DataReaderTests.cpp @@ -2136,7 +2136,7 @@ TEST_F(DataReaderTests, check_read_take_iteration) EXPECT_EQ(data_reader_->take_instance(data, infos, 1, handles[i]), ReturnCode_t::RETCODE_OK); - EXPECT_EQ(i, std::atoi(data[0].message().data())); + EXPECT_EQ(static_cast(i), std::atoi(data[0].message().data())); EXPECT_EQ(ReturnCode_t::RETCODE_OK, data_reader_->return_loan(data, infos)); } diff --git a/test/unittest/dds/subscriber/SubscriberTests.cpp b/test/unittest/dds/subscriber/SubscriberTests.cpp index 57ee694c606..886df900905 100644 --- a/test/unittest/dds/subscriber/SubscriberTests.cpp +++ b/test/unittest/dds/subscriber/SubscriberTests.cpp @@ -496,15 +496,15 @@ TEST(SubscriberTests, ChangeDefaultDataReaderQos) EXPECT_EQ(2, wqos.endpoint().entity_id); EXPECT_EQ(eprosima::fastrtps::rtps::PREALLOCATED_WITH_REALLOC_MEMORY_MODE, wqos.endpoint().history_memory_policy); // .reader_resource_limits - EXPECT_EQ(30, wqos.reader_resource_limits().matched_publisher_allocation.initial); - EXPECT_EQ(300, wqos.reader_resource_limits().matched_publisher_allocation.maximum); - EXPECT_EQ(4, wqos.reader_resource_limits().matched_publisher_allocation.increment); - EXPECT_EQ(40, wqos.reader_resource_limits().sample_infos_allocation.initial); - EXPECT_EQ(400, wqos.reader_resource_limits().sample_infos_allocation.maximum); - EXPECT_EQ(5, wqos.reader_resource_limits().sample_infos_allocation.increment); - EXPECT_EQ(50, wqos.reader_resource_limits().outstanding_reads_allocation.initial); - EXPECT_EQ(500, wqos.reader_resource_limits().outstanding_reads_allocation.maximum); - EXPECT_EQ(6, wqos.reader_resource_limits().outstanding_reads_allocation.increment); + EXPECT_EQ(30u, wqos.reader_resource_limits().matched_publisher_allocation.initial); + EXPECT_EQ(300u, wqos.reader_resource_limits().matched_publisher_allocation.maximum); + EXPECT_EQ(4u, wqos.reader_resource_limits().matched_publisher_allocation.increment); + EXPECT_EQ(40u, wqos.reader_resource_limits().sample_infos_allocation.initial); + EXPECT_EQ(400u, wqos.reader_resource_limits().sample_infos_allocation.maximum); + EXPECT_EQ(5u, wqos.reader_resource_limits().sample_infos_allocation.increment); + EXPECT_EQ(50u, wqos.reader_resource_limits().outstanding_reads_allocation.initial); + EXPECT_EQ(500u, wqos.reader_resource_limits().outstanding_reads_allocation.maximum); + EXPECT_EQ(6u, wqos.reader_resource_limits().outstanding_reads_allocation.increment); EXPECT_EQ(33, wqos.reader_resource_limits().max_samples_per_read); // .data_sharing EXPECT_EQ(eprosima::fastdds::dds::ON, wqos.data_sharing().kind()); diff --git a/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp b/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp index cd1b371351f..ae7274f243a 100644 --- a/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp +++ b/test/unittest/rtps/builtin/BuiltinDataSerializationTests.cpp @@ -97,7 +97,7 @@ void assert_is_empty_content_filter( ASSERT_EQ("", filter_property.related_topic_name.to_string()); ASSERT_EQ("", filter_property.filter_class_name.to_string()); ASSERT_EQ("", filter_property.filter_expression); - ASSERT_EQ(0, filter_property.expression_parameters.size()); + ASSERT_EQ(0u, filter_property.expression_parameters.size()); } TEST(BuiltinDataSerializationTests, ok_with_defaults) diff --git a/test/unittest/transport/TCPv4Tests.cpp b/test/unittest/transport/TCPv4Tests.cpp index c116cbc00e7..a4445c49b08 100644 --- a/test/unittest/transport/TCPv4Tests.cpp +++ b/test/unittest/transport/TCPv4Tests.cpp @@ -1511,7 +1511,7 @@ TEST_F(TCPv4Tests, secure_non_blocking_send) as communication lacks most of the discovery messages using a raw socket as participant. */ auto sender_unbound_channel_resources = senderTransportUnderTest.get_unbound_channel_resources(); - ASSERT_TRUE(sender_unbound_channel_resources.size() == 1); + ASSERT_TRUE(sender_unbound_channel_resources.size() == 1u); auto sender_channel_resource = std::static_pointer_cast(sender_unbound_channel_resources[0]); @@ -1945,7 +1945,7 @@ TEST_F(TCPv4Tests, client_announced_local_port_uniqueness) std::this_thread::sleep_for(std::chrono::milliseconds(100)); - ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2); + ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2u); } #ifndef _WIN32 @@ -2009,7 +2009,7 @@ TEST_F(TCPv4Tests, non_blocking_send) as communication lacks most of the discovery messages using a raw socket as participant. */ auto sender_unbound_channel_resources = senderTransportUnderTest.get_unbound_channel_resources(); - ASSERT_TRUE(sender_unbound_channel_resources.size() == 1); + ASSERT_TRUE(sender_unbound_channel_resources.size() == 1u); auto sender_channel_resource = std::static_pointer_cast(sender_unbound_channel_resources[0]); @@ -2138,11 +2138,11 @@ TEST_F(TCPv4Tests, opening_output_channel_with_same_locator_as_local_listening_p // If the remote address is lower than the local one, no channel must be created but it must be added to the send_resource_list ASSERT_TRUE(transportUnderTest.OpenOutputChannel(send_resource_list, lowerOutputChannelLocator)); ASSERT_FALSE(transportUnderTest.is_output_channel_open_for(lowerOutputChannelLocator)); - ASSERT_EQ(send_resource_list.size(), 1); + ASSERT_EQ(send_resource_list.size(), 1u); // If the remote address is higher than the local one, a CONNECT channel must be created and added to the send_resource_list ASSERT_TRUE(transportUnderTest.OpenOutputChannel(send_resource_list, higherOutputChannelLocator)); ASSERT_TRUE(transportUnderTest.is_output_channel_open_for(higherOutputChannelLocator)); - ASSERT_EQ(send_resource_list.size(), 2); + ASSERT_EQ(send_resource_list.size(), 2u); } void TCPv4Tests::HELPER_SetDescriptorDefaults() diff --git a/test/unittest/transport/TCPv6Tests.cpp b/test/unittest/transport/TCPv6Tests.cpp index 9f49c591a26..b86f0286031 100644 --- a/test/unittest/transport/TCPv6Tests.cpp +++ b/test/unittest/transport/TCPv6Tests.cpp @@ -196,7 +196,7 @@ TEST_F(TCPv6Tests, autofill_port) transportUnderTest_autofill.init(); EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports[0] != 0); - EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports.size() == 1); + EXPECT_TRUE(transportUnderTest_autofill.configuration()->listening_ports.size() == 1u); } static void GetIP6s( @@ -297,7 +297,7 @@ TEST_F(TCPv6Tests, client_announced_local_port_uniqueness) std::this_thread::sleep_for(std::chrono::milliseconds(100)); - ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2); + ASSERT_EQ(receiveTransportUnderTest.get_channel_resources().size(), 2u); } #ifndef _WIN32 @@ -361,7 +361,7 @@ TEST_F(TCPv6Tests, non_blocking_send) as communication lacks most of the discovery messages using a raw socket as participant. */ auto sender_unbound_channel_resources = senderTransportUnderTest.get_unbound_channel_resources(); - ASSERT_TRUE(sender_unbound_channel_resources.size() == 1); + ASSERT_TRUE(sender_unbound_channel_resources.size() == 1u); auto sender_channel_resource = std::static_pointer_cast(sender_unbound_channel_resources[0]); @@ -493,7 +493,7 @@ TEST_F(TCPv6Tests, opening_output_channel_with_same_locator_as_local_listening_p // If the remote address is higher than the local one, a CONNECT channel must be created and added to the send_resource_list ASSERT_TRUE(transportUnderTest.OpenOutputChannel(send_resource_list, higherOutputChannelLocator)); ASSERT_TRUE(transportUnderTest.is_output_channel_open_for(higherOutputChannelLocator)); - ASSERT_EQ(send_resource_list.size(), 2); + ASSERT_EQ(send_resource_list.size(), 2u); } /*