Skip to content

Commit

Permalink
Uncrustify
Browse files Browse the repository at this point in the history
Signed-off-by: Irene Bandera <irenebandera@eprosima.com>
  • Loading branch information
irenebm committed Jan 23, 2024
1 parent fe4dfc0 commit a16a735
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 80 deletions.
150 changes: 75 additions & 75 deletions ddsrouter_core/test/blackbox/ddsrouter_core/dds/local/DDSTestLocal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ DdsRouterConfiguration dds_test_simple_configuration(
* to Late Joiners.
*/
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
template <class MsgStruct>
template <class MsgStruct>
#else
template <class MsgStruct, class MsgStructType>
template <class MsgStruct, class MsgStructType>
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
void test_local_communication(
DdsRouterConfiguration ddsrouter_configuration,
Expand All @@ -136,7 +136,7 @@ void test_local_communication(
MsgStruct msg;

#if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13
MsgStructType type;
MsgStructType type;
#endif // if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13

std::string msg_str;
Expand All @@ -150,18 +150,18 @@ void test_local_communication(

// Create DDS Publisher in domain 0
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestPublisher<MsgStruct> publisher(msg.isKeyDefined());
TestPublisher<MsgStruct> publisher(msg.isKeyDefined());
#else
TestPublisher<MsgStruct> publisher(type.m_isGetKeyDefined);
TestPublisher<MsgStruct> publisher(type.m_isGetKeyDefined);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(publisher.init(0));

// Create DDS Subscriber in domain 1
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestSubscriber<MsgStruct> subscriber(msg.isKeyDefined(), transient_local);
TestSubscriber<MsgStruct> subscriber(msg.isKeyDefined(), transient_local);
#else
TestSubscriber<MsgStruct> subscriber(type.m_isGetKeyDefined, transient_local);
TestSubscriber<MsgStruct> subscriber(type.m_isGetKeyDefined, transient_local);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(subscriber.init(1, &msg, &samples_received));
Expand Down Expand Up @@ -227,11 +227,11 @@ void test_local_communication(
TEST(DDSTestLocal, end_to_end_local_communication)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration());
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration());
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration());
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration());
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

}
Expand All @@ -243,11 +243,11 @@ TEST(DDSTestLocal, end_to_end_local_communication)
TEST(DDSTestLocal, end_to_end_local_communication_keyed)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorldKeyed>(
test::dds_test_simple_configuration());
test::test_local_communication<HelloWorldKeyed>(
test::dds_test_simple_configuration());
#else
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
test::dds_test_simple_configuration());
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
test::dds_test_simple_configuration());
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

Expand All @@ -259,22 +259,22 @@ TEST(DDSTestLocal, end_to_end_local_communication_keyed)
TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(true));
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(true));
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(true));
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(true));
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery_keyed)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorldKeyed>(
test::dds_test_simple_configuration(true));
test::test_local_communication<HelloWorldKeyed>(
test::dds_test_simple_configuration(true));
#else
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
test::dds_test_simple_configuration(true));
test::test_local_communication<HelloWorldKeyed, HelloWorldKeyedPubSubType>(
test::dds_test_simple_configuration(true));
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

Expand All @@ -288,15 +288,15 @@ TEST(DDSTestLocal, end_to_end_local_communication_disable_dynamic_discovery_keye
TEST(DDSTestLocal, end_to_end_local_communication_high_frequency)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
1000, // wait for 1000 samples received
0); // send it without waiting from one sample to the other
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
1000, // wait for 1000 samples received
0); // send it without waiting from one sample to the other
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
1000, // wait for 1000 samples received
0); // send it without waiting from one sample to the other
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
1000, // wait for 1000 samples received
0); // send it without waiting from one sample to the other
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

Expand All @@ -310,17 +310,17 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_frequency)
TEST(DDSTestLocal, end_to_end_local_communication_high_size)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
10000); // 500K message size
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
10000); // 500K message size
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
10000); // 500K message size
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
10000); // 500K message size
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

Expand All @@ -336,17 +336,17 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_size)
TEST(DDSTestLocal, end_to_end_local_communication_high_throughput)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
500,
1,
1000); // 50K message size
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
500,
1,
1000); // 50K message size
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
500,
1,
1000); // 50K message size
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
500,
1,
1000); // 50K message size
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

Expand All @@ -357,19 +357,19 @@ TEST(DDSTestLocal, end_to_end_local_communication_high_throughput)
TEST(DDSTestLocal, end_to_end_local_communication_transient_local)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

Expand All @@ -380,19 +380,19 @@ TEST(DDSTestLocal, end_to_end_local_communication_transient_local)
TEST(DDSTestLocal, end_to_end_local_communication_transient_local_disable_dynamic_discovery)
{
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(true, true),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
test::test_local_communication<HelloWorld>(
test::dds_test_simple_configuration(true, true),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#else
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(true, true),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
test::test_local_communication<HelloWorld, HelloWorldPubSubType>(
test::dds_test_simple_configuration(true, true),
test::DEFAULT_SAMPLES_TO_RECEIVE,
test::DEFAULT_MILLISECONDS_PUBLISH_LOOP,
test::DEFAULT_MESSAGE_SIZE,
true);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void test_local_communication_key_dispose(
HelloWorldKeyed msg;

#if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13
HelloWorldKeyedPubSubType type;
HelloWorldKeyedPubSubType type;
#endif // if FASTRTPS_VERSION_MAJOR >= 2 && FASTRTPS_VERSION_MINOR >= 13

std::string msg_str;
Expand All @@ -115,18 +115,18 @@ void test_local_communication_key_dispose(

// Create DDS Publisher in domain 0
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestPublisher<HelloWorldKeyed> publisher(msg.isKeyDefined());
TestPublisher<HelloWorldKeyed> publisher(msg.isKeyDefined());
#else
TestPublisher<HelloWorldKeyed> publisher(type.m_isGetKeyDefined);
TestPublisher<HelloWorldKeyed> publisher(type.m_isGetKeyDefined);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(publisher.init(0));

// Create DDS Subscriber in domain 1
#if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13
TestSubscriber<HelloWorldKeyed> subscriber(msg.isKeyDefined());
TestSubscriber<HelloWorldKeyed> subscriber(msg.isKeyDefined());
#else
TestSubscriber<HelloWorldKeyed> subscriber(type.m_isGetKeyDefined);
TestSubscriber<HelloWorldKeyed> subscriber(type.m_isGetKeyDefined);
#endif // if FASTRTPS_VERSION_MAJOR <= 2 && FASTRTPS_VERSION_MINOR < 13

ASSERT_TRUE(subscriber.init(1, &msg, &samples_received));
Expand Down

0 comments on commit a16a735

Please sign in to comment.