@@ -31,14 +31,14 @@ namespace rtps {
31
31
using namespace testing ;
32
32
33
33
void max_allowed_payload_size (
34
- uint32_t max_message_size)
34
+ uint32_t max_message_size)
35
35
{
36
36
uint32_t domain_id = 0 ;
37
37
uint32_t initial_reserved_caches = 10 ;
38
38
std::string max_message_size_str = std::to_string (max_message_size);
39
39
40
40
RTPSParticipantAttributes p_attr;
41
- p_attr.properties .properties ().emplace_back (" fastdds.max_message_size" , max_message_size_str);
41
+ p_attr.properties .properties ().emplace_back (" fastdds.max_message_size" , max_message_size_str);
42
42
RTPSParticipant* participant = RTPSDomain::createParticipant (
43
43
domain_id, true , p_attr);
44
44
@@ -58,15 +58,16 @@ void max_allowed_payload_size(
58
58
BaseWriter* bwriter = BaseWriter::downcast (writer);
59
59
60
60
auto result = bwriter->get_max_allowed_payload_size ();
61
- std::cout << " For max_message_size: " << max_message_size << " the max allowed payload size is: " << result << std::endl;
61
+ std::cout << " For max_message_size: " << max_message_size << " the max allowed payload size is: " << result <<
62
+ std::endl;
62
63
63
64
ASSERT_LE (result, max_message_size);
64
65
}
65
66
66
67
/* *
67
68
* This test checks the get_max_allowed_payload_size() method of the BaseWriter.
68
69
* The method is called within a loop with different values of max_message_size.
69
- * The test checks that the max_payload_size is always less than max_message_size,
70
+ * The test checks that the max_payload_size is always less than max_message_size,
70
71
* in other case it means an overflow has occurred.
71
72
*/
72
73
TEST (BaseWriterTests, calculate_max_payload_size_overflow)
0 commit comments