Skip to content

Commit

Permalink
tried to cleanup the naming of the ecal unit tests a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Oct 24, 2023
1 parent 4439f91 commit ea8accb
Show file tree
Hide file tree
Showing 15 changed files with 45 additions and 50 deletions.
2 changes: 1 addition & 1 deletion ecal/service/test/src/ecal_tcp_service_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ TEST(CommunicationAndCallbacks, StressfulCommunicationMassivePayload) // NOLINT
#endif

#if 1
TEST(callback, ServerAndClientManagers) // NOLINT
TEST(Callback, ServerAndClientManagers) // NOLINT
{
for (std::uint8_t protocol_version = min_protocol_version; protocol_version <= max_protocol_version; protocol_version++)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
void ProcProtoMsg(const google::protobuf::Message& msg_, const std::string& prefix_ /* = "" */);

// google test
TEST(IO, dynproto)
TEST(DynProto, dynproto)
{
// generate a class instance of Person
pb::People::Person person;
Expand Down
10 changes: 5 additions & 5 deletions testing/contrib/ecalproto/ecal_proto_test/src/test_filters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@

using namespace eCAL::protobuf;

TEST(filter, nofilter)
TEST(Filter, nofilter)
{
NoFilter filter;
bool result = filter.Filter("abc");
EXPECT_EQ(true, result);
}

TEST(filter, include_filter_clear)
TEST(Filter, include_filter_clear)
{
SimpleIncludeFilter filter;
std::string a("a");
Expand Down Expand Up @@ -90,15 +90,15 @@ void test_regular_includes(BaseIncludeFilter& filter)
EXPECT_EQ(false, filter.Filter(adf));
}

TEST(filter, include_filter)
TEST(Filter, include_filter)
{
SimpleIncludeFilter simple_filter;
test_regular_includes(simple_filter);
ComplexIncludeFilter complex_filter;
test_regular_includes(complex_filter);
}

TEST(filter, include_filter_array_simple)
TEST(Filter, include_filter_array_simple)
{
const std::string a("a");
const std::string a1("a[1]");
Expand Down Expand Up @@ -130,7 +130,7 @@ TEST(filter, include_filter_array_simple)
EXPECT_EQ(false, filter.Filter(a2b)); // should not accept a[2].b
}

TEST(filter, include_filter_array_complex)
TEST(Filter, include_filter_array_complex)
{
const std::string a ("a" );
const std::string a1 ("a[1]" );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#define CMN_MONITORING_TIMEOUT 5000

TEST(IO, GetServices)
TEST(ClientServer, GetServices)
{
// initialize eCAL API
eCAL::Initialize(0, nullptr, "clientserver_getservices");
Expand Down
20 changes: 10 additions & 10 deletions testing/ecal/clientserver_test/src/clientserver_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace

#if ClientConnectEventTest

TEST(IO, ClientConnectEvent)
TEST(ClientServer, ClientConnectEvent)
{
// initialize eCAL API
eCAL::Initialize(0, nullptr, "clientserver base connect event callback");
Expand Down Expand Up @@ -156,7 +156,7 @@ TEST(IO, ClientConnectEvent)

#if ServerConnectEventTest

TEST(IO, ServerConnectEvent)
TEST(ClientServer, ServerConnectEvent)
{
// initialize eCAL API
eCAL::Initialize(0, nullptr, "clientserver base connect event callback");
Expand Down Expand Up @@ -218,7 +218,7 @@ TEST(IO, ServerConnectEvent)

#if ClientServerBaseCallbackTest

TEST(IO, ClientServerBaseCallback)
TEST(ClientServer, ClientServerBaseCallback)
{
const int num_services(2);
const int num_clients(3);
Expand Down Expand Up @@ -332,7 +332,7 @@ TEST(IO, ClientServerBaseCallback)

#if ClientServerBaseCallbackTimeoutTest

TEST(IO, ClientServerBaseCallbackTimeout)
TEST(ClientServer, ClientServerBaseCallbackTimeout)
{
const int num_services(2);
const int num_clients(3);
Expand Down Expand Up @@ -502,7 +502,7 @@ TEST(IO, ClientServerBaseCallbackTimeout)

#if ClientServerBaseAsyncCallbackTest

TEST(IO, ClientServerBaseAsyncCallback)
TEST(ClientServer, ClientServerBaseAsyncCallback)
{
const int calls(1);
const int sleep(100);
Expand Down Expand Up @@ -576,7 +576,7 @@ TEST(IO, ClientServerBaseAsyncCallback)

#if ClientServerBaseAsyncTest

TEST(IO, ClientServerBaseAsyncTest)
TEST(ClientServer, ClientServerBaseAsyncTest)
{
const int calls(5);

Expand Down Expand Up @@ -683,7 +683,7 @@ TEST(IO, ClientServerBaseAsyncTest)

#if ClientServerBaseBlockingTest

TEST(IO, ClientServerBaseBlocking)
TEST(ClientServer, ClientServerBaseBlocking)
{
const int num_services(2);
const int num_clients(3);
Expand Down Expand Up @@ -818,7 +818,7 @@ class MathServiceImpl : public MathService
}
};

TEST(IO, ClientServerProtoCallback)
TEST(ClientServer, ClientServerProtoCallback)
{
// initialize eCAL API
eCAL::Initialize(0, nullptr, "clientserver proto callback test");
Expand Down Expand Up @@ -907,7 +907,7 @@ class PingServiceImpl : public PingService
}
};

TEST(IO, ClientServerProtoBlocking)
TEST(ClientServer, ClientServerProtoBlocking)
{
// initialize eCAL API
eCAL::Initialize(0, nullptr, "clientserver proto blocking test");
Expand Down Expand Up @@ -959,7 +959,7 @@ TEST(IO, ClientServerProtoBlocking)

#if NestedRPCCallTest

TEST(IO, NestedRPCCall)
TEST(ClientServer, NestedRPCCall)
{
const int calls(1);
const int sleep(0);
Expand Down
3 changes: 1 addition & 2 deletions testing/ecal/io_memfile_test/src/memfile_naming_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <gtest/gtest.h>


TEST(IO, MemfileNaming)
TEST(MemFile, MemfileNaming)
{
std::chrono::steady_clock::time_point timepoint{};

Expand All @@ -37,5 +37,4 @@ TEST(IO, MemfileNaming)

EXPECT_LE(memfile_name_1.size(), 13);
EXPECT_NE(memfile_name_1, memfile_name_2);

}
6 changes: 3 additions & 3 deletions testing/ecal/io_memfile_test/src/memfile_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace eCAL
}
}

TEST(IO, MemfileReadWrite)
TEST(MemFile, MemfileReadWrite)
{
eCAL::CMemoryFile mem_file;

Expand Down Expand Up @@ -140,7 +140,7 @@ TEST(IO, MemfileReadWrite)
EXPECT_EQ(true, mem_file.Destroy(true));
}

TEST(IO, MemfilePerf)
TEST(MemFile, MemfilePerf)
{
eCAL::CMemoryFile mem_file;

Expand Down Expand Up @@ -200,7 +200,7 @@ TEST(IO, MemfilePerf)
EXPECT_EQ(true, mem_file.Destroy(true));
}

TEST(IO, MemfileConcurrency)
TEST(MemFile, MemfileConcurrency)
{
eCAL::CMemoryFile mem_file;

Expand Down
2 changes: 1 addition & 1 deletion testing/ecal/pubsub_inproc_test/src/pubsub_inproc_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void OnReceive3()
sub_clock3++;
}

TEST(INPROC, CLOCKS)
TEST(PubSubInproc, CLOCKS)
{
// initialize eCAL API
EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "inproc_clock_test"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,3 @@ TEST_F(ProtoDynSubscriberTest, SendReceive)
auto id = extract_id(*message);
ASSERT_EQ(id, 1);
}



2 changes: 1 addition & 1 deletion testing/ecal/pubsub_test/src/pubsub_acknowledge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace
}

// This test asserts that a timeouted acknowledge does not break subsequent calls
TEST(Core, TimeoutAcknowledgment)
TEST(PubSub, TimeoutAcknowledgment)
{
// initialize eCAL API
EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "TimeoutAcknowledgment", eCAL::Init::All));
Expand Down
2 changes: 1 addition & 1 deletion testing/ecal/pubsub_test/src/pubsub_gettopics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#define CMN_REGISTRATION_REFRESH 1000
#define CMN_MONITORING_TIMEOUT 5000

TEST(IO, GetTopics)
TEST(PubSub, GetTopics)
{
// initialize eCAL API
eCAL::Initialize(0, nullptr, "pubsub_gettopics");
Expand Down
2 changes: 1 addition & 1 deletion testing/ecal/pubsub_test/src/pubsub_multibuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class CBinaryPayload : public eCAL::CPayloadWriter
int clock = 0;
};

TEST(IO, MultibufferPubSub)
TEST(PubSub, MultibufferPubSub)
{
// create payload
CBinaryPayload binary_payload(PAYLOAD_SIZE);
Expand Down
4 changes: 2 additions & 2 deletions testing/ecal/pubsub_test/src/pubsub_receive_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void measure_execution_within_range(const std::string& description, std::functio
}


TEST(SUBSCRIBER, TimingSubscriberReceive)
TEST(PubSub, TimingSubscriberReceive)
{
// initialize eCAL API
EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "subscriber_receive_timing"));
Expand Down Expand Up @@ -164,7 +164,7 @@ TEST(SUBSCRIBER, TimingSubscriberReceive)


// This tests test for sporadically received empty messages which were a problem.
TEST(SUBSCRIBER, SporadicEmptyReceives)
TEST(PubSub, SporadicEmptyReceives)
{
// initialize eCAL API
EXPECT_EQ(0, eCAL::Initialize(0, nullptr, "sporadic_empty_receives"));
Expand Down
Loading

0 comments on commit ea8accb

Please sign in to comment.