From a252db02ffce7be77ae1d6837e42dbab0cdf19a0 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 4 Jan 2022 21:45:16 +0100 Subject: [PATCH] iox-#841 Replace TEST_CASE with TEST_SUITE --- .../test_lockfree_queue_stresstest.cpp | 2 +- ...t_resizeable_lockfree_queue_stresstest.cpp | 2 +- .../moduletests/test_concurrent_loffli.cpp | 2 +- .../test_concurrent_trigger_queue.cpp | 2 +- .../test/moduletests/test_cxx_helplets.cpp | 2 +- .../test/moduletests/test_cxx_string.cpp | 2 +- .../test/moduletests/test_index_queue.cpp | 2 +- .../test/moduletests/test_ipc_channel.cpp | 2 +- .../test/moduletests/test_lockfree_queue.cpp | 2 +- .../test_lockfree_queue_buffer.cpp | 2 +- .../test_lockfree_queue_cyclic_index.cpp | 2 +- .../test/moduletests/test_logger.cpp | 20 +-- .../test/moduletests/test_logstream.cpp | 4 +- .../moduletests/test_posix_signal_handler.cpp | 2 +- .../moduletests/test_relative_pointer.cpp | 2 +- .../test/moduletests/test_relocatable_ptr.cpp | 2 +- .../test_resizeable_lockfree_queue.cpp | 2 +- .../moduletests/test_semaphore_module.cpp | 2 +- .../test/moduletests/test_base_port.cpp | 2 +- .../moduletests/test_mepoo_chunk_header.cpp | 112 +++++++-------- .../moduletests/test_mepoo_chunk_settings.cpp | 132 +++++++++--------- .../test_popo_chunk_distributor.cpp | 2 +- .../moduletests/test_popo_chunk_queue.cpp | 6 +- .../test_popo_toml_gateway_config_parser.cpp | 26 ++-- .../moduletests/test_popo_typed_unique_id.cpp | 2 +- .../test_roudi_config_toml_file_provider.cpp | 4 +- 26 files changed, 171 insertions(+), 171 deletions(-) diff --git a/iceoryx_hoofs/test/integrationtests/test_lockfree_queue_stresstest.cpp b/iceoryx_hoofs/test/integrationtests/test_lockfree_queue_stresstest.cpp index 983f31179bc..56d85666aaa 100644 --- a/iceoryx_hoofs/test/integrationtests/test_lockfree_queue_stresstest.cpp +++ b/iceoryx_hoofs/test/integrationtests/test_lockfree_queue_stresstest.cpp @@ -352,7 +352,7 @@ typedef ::testing::Types TestConfigs; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(ResizeableLockFreeQueueStressTest, TestConfigs); +TYPED_TEST_SUITE(ResizeableLockFreeQueueStressTest, TestConfigs); #pragma GCC diagnostic pop diff --git a/iceoryx_hoofs/test/moduletests/test_concurrent_loffli.cpp b/iceoryx_hoofs/test/moduletests/test_concurrent_loffli.cpp index 558f86d68a8..86aa2d5d81c 100644 --- a/iceoryx_hoofs/test/moduletests/test_concurrent_loffli.cpp +++ b/iceoryx_hoofs/test/moduletests/test_concurrent_loffli.cpp @@ -31,7 +31,7 @@ using LoFFLiTestSubjects = Types; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(LoFFLi_test, LoFFLiTestSubjects); +TYPED_TEST_SUITE(LoFFLi_test, LoFFLiTestSubjects); #pragma GCC diagnostic pop template diff --git a/iceoryx_hoofs/test/moduletests/test_concurrent_trigger_queue.cpp b/iceoryx_hoofs/test/moduletests/test_concurrent_trigger_queue.cpp index 835efdaea62..544d3fc23fc 100644 --- a/iceoryx_hoofs/test/moduletests/test_concurrent_trigger_queue.cpp +++ b/iceoryx_hoofs/test/moduletests/test_concurrent_trigger_queue.cpp @@ -70,7 +70,7 @@ using TriggerQueueTestSubjects = Types, /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(TriggerQueue_test, TriggerQueueTestSubjects); +TYPED_TEST_SUITE(TriggerQueue_test, TriggerQueueTestSubjects); #pragma GCC diagnostic pop TYPED_TEST(TriggerQueue_test, EmptyOnConstruction) diff --git a/iceoryx_hoofs/test/moduletests/test_cxx_helplets.cpp b/iceoryx_hoofs/test/moduletests/test_cxx_helplets.cpp index 60da7f60ddd..9d3885ecad6 100644 --- a/iceoryx_hoofs/test/moduletests/test_cxx_helplets.cpp +++ b/iceoryx_hoofs/test/moduletests/test_cxx_helplets.cpp @@ -165,7 +165,7 @@ using HelpletsIsPowerOfTwoTypes = Types, string<15>, string<100>, string<1000>>; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(stringTyped_test, Implementations); +TYPED_TEST_SUITE(stringTyped_test, Implementations); #pragma GCC diagnostic pop TEST(string_test, CapacityReturnsSpecifiedCapacity) diff --git a/iceoryx_hoofs/test/moduletests/test_index_queue.cpp b/iceoryx_hoofs/test/moduletests/test_index_queue.cpp index 9d67567adc0..67ebbb1f649 100644 --- a/iceoryx_hoofs/test/moduletests/test_index_queue.cpp +++ b/iceoryx_hoofs/test/moduletests/test_index_queue.cpp @@ -63,7 +63,7 @@ typedef ::testing::Types, IndexQueue<10>, IndexQueue<1000>> TestQu /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(IndexQueueTest, TestQueues); +TYPED_TEST_SUITE(IndexQueueTest, TestQueues); #pragma GCC diagnostic pop diff --git a/iceoryx_hoofs/test/moduletests/test_ipc_channel.cpp b/iceoryx_hoofs/test/moduletests/test_ipc_channel.cpp index 9fea5133770..085c0de0e45 100644 --- a/iceoryx_hoofs/test/moduletests/test_ipc_channel.cpp +++ b/iceoryx_hoofs/test/moduletests/test_ipc_channel.cpp @@ -96,7 +96,7 @@ constexpr uint64_t IpcChannel_test::MaxMsgNumber; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(IpcChannel_test, IpcChannelTypes); +TYPED_TEST_SUITE(IpcChannel_test, IpcChannelTypes); #pragma GCC diagnostic pop TYPED_TEST(IpcChannel_test, CreateWithTooLargeMessageSizeLeadsToError) diff --git a/iceoryx_hoofs/test/moduletests/test_lockfree_queue.cpp b/iceoryx_hoofs/test/moduletests/test_lockfree_queue.cpp index e5c2b649623..fb9ef3179b3 100644 --- a/iceoryx_hoofs/test/moduletests/test_lockfree_queue.cpp +++ b/iceoryx_hoofs/test/moduletests/test_lockfree_queue.cpp @@ -172,7 +172,7 @@ typedef ::testing::Types, Buffer> TestBuffers; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(LockFreeQueueBufferTest, TestBuffers); +TYPED_TEST_SUITE(LockFreeQueueBufferTest, TestBuffers); #pragma GCC diagnostic pop TYPED_TEST(LockFreeQueueBufferTest, accessElements) diff --git a/iceoryx_hoofs/test/moduletests/test_lockfree_queue_cyclic_index.cpp b/iceoryx_hoofs/test/moduletests/test_lockfree_queue_cyclic_index.cpp index 494f33bba44..2401dbd136d 100644 --- a/iceoryx_hoofs/test/moduletests/test_lockfree_queue_cyclic_index.cpp +++ b/iceoryx_hoofs/test/moduletests/test_lockfree_queue_cyclic_index.cpp @@ -53,7 +53,7 @@ typedef ::testing::Types, CyclicIndex<2>, CyclicIndex<10>, Cyclic /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(LockFreeQueueCyclicIndexTest, TestIndices); +TYPED_TEST_SUITE(LockFreeQueueCyclicIndexTest, TestIndices); #pragma GCC diagnostic pop // note that in all tests we will check whether the getCycle and getIndex methods diff --git a/iceoryx_hoofs/test/moduletests/test_logger.cpp b/iceoryx_hoofs/test/moduletests/test_logger.cpp index 57fe2c55745..b048327d93e 100644 --- a/iceoryx_hoofs/test/moduletests/test_logger.cpp +++ b/iceoryx_hoofs/test/moduletests/test_logger.cpp @@ -158,18 +158,18 @@ class IoxLoggerLogLevel_test : public TestWithParam, public } }; -/// we require INSTANTIATE_TEST_CASE_P since we support gtest 1.8 for our safety targets +/// we require INSTANTIATE_TEST_SUITE_P since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -INSTANTIATE_TEST_CASE_P(AllLogLevel, - IoxLoggerLogLevel_test, - Values(iox::log::LogLevel::kOff, - iox::log::LogLevel::kFatal, - iox::log::LogLevel::kError, - iox::log::LogLevel::kWarn, - iox::log::LogLevel::kInfo, - iox::log::LogLevel::kDebug, - iox::log::LogLevel::kVerbose)); +INSTANTIATE_TEST_SUITE_P(AllLogLevel, + IoxLoggerLogLevel_test, + Values(iox::log::LogLevel::kOff, + iox::log::LogLevel::kFatal, + iox::log::LogLevel::kError, + iox::log::LogLevel::kWarn, + iox::log::LogLevel::kInfo, + iox::log::LogLevel::kDebug, + iox::log::LogLevel::kVerbose)); #pragma GCC diagnostic pop TEST_P(IoxLoggerLogLevel_test, LogLevel) diff --git a/iceoryx_hoofs/test/moduletests/test_logstream.cpp b/iceoryx_hoofs/test/moduletests/test_logstream.cpp index 33a9d88ccaf..e6ec2c916e1 100644 --- a/iceoryx_hoofs/test/moduletests/test_logstream.cpp +++ b/iceoryx_hoofs/test/moduletests/test_logstream.cpp @@ -196,7 +196,7 @@ using LogHexBinTypes = Types @@ -266,7 +266,7 @@ using ArithmeticTypes = /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(IoxLogStreamArithmetic_test, ArithmeticTypes); +TYPED_TEST_SUITE(IoxLogStreamArithmetic_test, ArithmeticTypes); #pragma GCC diagnostic pop template diff --git a/iceoryx_hoofs/test/moduletests/test_posix_signal_handler.cpp b/iceoryx_hoofs/test/moduletests/test_posix_signal_handler.cpp index 9140e7cabaf..69f46533ed2 100644 --- a/iceoryx_hoofs/test/moduletests/test_posix_signal_handler.cpp +++ b/iceoryx_hoofs/test/moduletests/test_posix_signal_handler.cpp @@ -80,7 +80,7 @@ class SignalHandler_test : public Test using Implementations = Types, SignalType, SignalType, SignalType>; -TYPED_TEST_CASE(SignalHandler_test, Implementations); +TYPED_TEST_SUITE(SignalHandler_test, Implementations); TYPED_TEST(SignalHandler_test, RegisteringSignalGuardCallbackWorks) { diff --git a/iceoryx_hoofs/test/moduletests/test_relative_pointer.cpp b/iceoryx_hoofs/test/moduletests/test_relative_pointer.cpp index 02a00775a89..85cd3f1cc68 100644 --- a/iceoryx_hoofs/test/moduletests/test_relative_pointer.cpp +++ b/iceoryx_hoofs/test/moduletests/test_relative_pointer.cpp @@ -71,7 +71,7 @@ typedef testing::Types Types; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(base_relative_ptr_test, Types); +TYPED_TEST_SUITE(base_relative_ptr_test, Types); #pragma GCC diagnostic pop TYPED_TEST(base_relative_ptr_test, ConstrTests) diff --git a/iceoryx_hoofs/test/moduletests/test_relocatable_ptr.cpp b/iceoryx_hoofs/test/moduletests/test_relocatable_ptr.cpp index 14ffffc04cd..be886225aed 100644 --- a/iceoryx_hoofs/test/moduletests/test_relocatable_ptr.cpp +++ b/iceoryx_hoofs/test/moduletests/test_relocatable_ptr.cpp @@ -188,7 +188,7 @@ typedef ::testing::Types TestTyp /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(Relocatable_ptr_typed_test, TestTypes); +TYPED_TEST_SUITE(Relocatable_ptr_typed_test, TestTypes); #pragma GCC diagnostic pop TYPED_TEST(Relocatable_ptr_typed_test, wrappedPointerTypeIsCorrect) diff --git a/iceoryx_hoofs/test/moduletests/test_resizeable_lockfree_queue.cpp b/iceoryx_hoofs/test/moduletests/test_resizeable_lockfree_queue.cpp index ce85312e2f9..b9ecfe38ec8 100644 --- a/iceoryx_hoofs/test/moduletests/test_resizeable_lockfree_queue.cpp +++ b/iceoryx_hoofs/test/moduletests/test_resizeable_lockfree_queue.cpp @@ -89,7 +89,7 @@ typedef ::testing::Types, IntegerQueue<11>, IntQueue<10>> TestQu /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(ResizeableLockFreeQueueTest, TestQueues); +TYPED_TEST_SUITE(ResizeableLockFreeQueueTest, TestQueues); #pragma GCC diagnostic pop TEST(ResizeableLockFreeQueueTest, maxCapacityIsConsistent) diff --git a/iceoryx_hoofs/test/moduletests/test_semaphore_module.cpp b/iceoryx_hoofs/test/moduletests/test_semaphore_module.cpp index 7809b131f7b..9d13f0b4534 100644 --- a/iceoryx_hoofs/test/moduletests/test_semaphore_module.cpp +++ b/iceoryx_hoofs/test/moduletests/test_semaphore_module.cpp @@ -111,7 +111,7 @@ class SemaphoreCreate_test : public Test /// we require INSTANTIATE_TEST_CASE since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -INSTANTIATE_TEST_CASE_P(Semaphore_test, Semaphore_test, Values(&createNamedSemaphore, &createUnnamedSemaphore)); +INSTANTIATE_TEST_SUITE_P(Semaphore_test, Semaphore_test, Values(&createNamedSemaphore, &createUnnamedSemaphore)); #pragma GCC diagnostic pop TEST_F(SemaphoreCreate_test, CreateNamedSemaphore) diff --git a/iceoryx_posh/test/moduletests/test_base_port.cpp b/iceoryx_posh/test/moduletests/test_base_port.cpp index 2f1f2cd1050..99e3256306c 100644 --- a/iceoryx_posh/test/moduletests/test_base_port.cpp +++ b/iceoryx_posh/test/moduletests/test_base_port.cpp @@ -52,7 +52,7 @@ using PortDataTypes = /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(BasePort_test, PortDataTypes); +TYPED_TEST_SUITE(BasePort_test, PortDataTypes); #pragma GCC diagnostic pop // port data factories diff --git a/iceoryx_posh/test/moduletests/test_mepoo_chunk_header.cpp b/iceoryx_posh/test/moduletests/test_mepoo_chunk_header.cpp index b6505f13c3a..c205c269204 100644 --- a/iceoryx_posh/test/moduletests/test_mepoo_chunk_header.cpp +++ b/iceoryx_posh/test/moduletests/test_mepoo_chunk_header.cpp @@ -412,34 +412,34 @@ class ChunkHeader_AlteringUserPayloadWithoutUserHeader : public ::testing::TestW // without a user-header, the user-payload is located right after the ChunkHeader, therefore the payload size and // alignment parameters are made dependant on the ChunkHeader -INSTANTIATE_TEST_CASE_P(ChunkHeader_test, - ChunkHeader_AlteringUserPayloadWithoutUserHeader, - ::testing::Values( - // alignment = 0 - PayloadParams{0U, 0U}, - PayloadParams{1U, 0U}, - PayloadParams{sizeof(ChunkHeader), 0U}, - PayloadParams{sizeof(ChunkHeader) * 42U, 0U}, - // alignment = 1 - PayloadParams{0U, 1U}, - PayloadParams{1U, 1U}, - PayloadParams{sizeof(ChunkHeader), 1U}, - PayloadParams{sizeof(ChunkHeader) * 42U, 1U}, - // alignment = alignof(ChunkHeader) / 2 - PayloadParams{0U, alignof(ChunkHeader) / 2}, - PayloadParams{1U, alignof(ChunkHeader) / 2}, - PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) / 2}, - PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) / 2}, - // alignment = alignof(ChunkHeader) - PayloadParams{0U, alignof(ChunkHeader)}, - PayloadParams{1U, alignof(ChunkHeader)}, - PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader)}, - PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader)}, - // alignment = alignof(ChunkHeader) * 2 - PayloadParams{0U, alignof(ChunkHeader) * 2}, - PayloadParams{1U, alignof(ChunkHeader) * 2}, - PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) * 2}, - PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) * 2})); +INSTANTIATE_TEST_SUITE_P(ChunkHeader_test, + ChunkHeader_AlteringUserPayloadWithoutUserHeader, + ::testing::Values( + // alignment = 0 + PayloadParams{0U, 0U}, + PayloadParams{1U, 0U}, + PayloadParams{sizeof(ChunkHeader), 0U}, + PayloadParams{sizeof(ChunkHeader) * 42U, 0U}, + // alignment = 1 + PayloadParams{0U, 1U}, + PayloadParams{1U, 1U}, + PayloadParams{sizeof(ChunkHeader), 1U}, + PayloadParams{sizeof(ChunkHeader) * 42U, 1U}, + // alignment = alignof(ChunkHeader) / 2 + PayloadParams{0U, alignof(ChunkHeader) / 2}, + PayloadParams{1U, alignof(ChunkHeader) / 2}, + PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) / 2}, + PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) / 2}, + // alignment = alignof(ChunkHeader) + PayloadParams{0U, alignof(ChunkHeader)}, + PayloadParams{1U, alignof(ChunkHeader)}, + PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader)}, + PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader)}, + // alignment = alignof(ChunkHeader) * 2 + PayloadParams{0U, alignof(ChunkHeader) * 2}, + PayloadParams{1U, alignof(ChunkHeader) * 2}, + PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) * 2}, + PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) * 2})); TEST_P(ChunkHeader_AlteringUserPayloadWithoutUserHeader, CheckIntegrityOfChunkHeaderWithoutUserHeader) { @@ -468,34 +468,34 @@ class ChunkHeader_AlteringUserPayloadWithUserHeader : public ::testing::TestWith // with a user-header, the user-payload is located right after the UserPayloadOffset_t, therefore the user-payload size // and alignment parameters are made dependant on the UserPayloadOffset_t -INSTANTIATE_TEST_CASE_P(ChunkHeader_test, - ChunkHeader_AlteringUserPayloadWithUserHeader, - ::testing::Values( - // alignment = 0 - PayloadParams{0U, 0U}, - PayloadParams{1U, 0U}, - PayloadParams{sizeof(UserPayloadOffset_t), 0U}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 0U}, - // alignment = 1 - PayloadParams{0U, 1U}, - PayloadParams{1U, 1U}, - PayloadParams{sizeof(UserPayloadOffset_t), 1U}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 1U}, - // alignment = alignof(UserPayloadOffset_t) / 2 - PayloadParams{0U, alignof(UserPayloadOffset_t) / 2}, - PayloadParams{1U, alignof(UserPayloadOffset_t) / 2}, - PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) / 2}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) / 2}, - // alignment = alignof(UserPayloadOffset_t) - PayloadParams{0U, alignof(UserPayloadOffset_t)}, - PayloadParams{1U, alignof(UserPayloadOffset_t)}, - PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t)}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t)}, - // alignment = alignof(UserPayloadOffset_t) * 2 - PayloadParams{0U, alignof(UserPayloadOffset_t) * 2}, - PayloadParams{1U, alignof(UserPayloadOffset_t) * 2}, - PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) * 2}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) * 2})); +INSTANTIATE_TEST_SUITE_P(ChunkHeader_test, + ChunkHeader_AlteringUserPayloadWithUserHeader, + ::testing::Values( + // alignment = 0 + PayloadParams{0U, 0U}, + PayloadParams{1U, 0U}, + PayloadParams{sizeof(UserPayloadOffset_t), 0U}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 0U}, + // alignment = 1 + PayloadParams{0U, 1U}, + PayloadParams{1U, 1U}, + PayloadParams{sizeof(UserPayloadOffset_t), 1U}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 1U}, + // alignment = alignof(UserPayloadOffset_t) / 2 + PayloadParams{0U, alignof(UserPayloadOffset_t) / 2}, + PayloadParams{1U, alignof(UserPayloadOffset_t) / 2}, + PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) / 2}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) / 2}, + // alignment = alignof(UserPayloadOffset_t) + PayloadParams{0U, alignof(UserPayloadOffset_t)}, + PayloadParams{1U, alignof(UserPayloadOffset_t)}, + PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t)}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t)}, + // alignment = alignof(UserPayloadOffset_t) * 2 + PayloadParams{0U, alignof(UserPayloadOffset_t) * 2}, + PayloadParams{1U, alignof(UserPayloadOffset_t) * 2}, + PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) * 2}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) * 2})); TEST_P(ChunkHeader_AlteringUserPayloadWithUserHeader, CheckIntegrityOfChunkHeaderWithUserHeader) { diff --git a/iceoryx_posh/test/moduletests/test_mepoo_chunk_settings.cpp b/iceoryx_posh/test/moduletests/test_mepoo_chunk_settings.cpp index ed608157273..8afd04d8bfa 100644 --- a/iceoryx_posh/test/moduletests/test_mepoo_chunk_settings.cpp +++ b/iceoryx_posh/test/moduletests/test_mepoo_chunk_settings.cpp @@ -232,39 +232,39 @@ class ChunkSettings_AlteringUserPayloadWithoutUserHeader : public ::testing::Tes // without a user-header, the user-payload is located right after the ChunkHeader, therefore the user-payload size and // alignment parameters are made dependant on the ChunkHeader -INSTANTIATE_TEST_CASE_P(ChunkSettings_test, - ChunkSettings_AlteringUserPayloadWithoutUserHeader, - ::testing::Values( - // alignment = 0 - PayloadParams{0U, 0U}, - PayloadParams{1U, 0U}, - PayloadParams{sizeof(ChunkHeader), 0U}, - PayloadParams{sizeof(ChunkHeader) * 42U, 0U}, - // alignment = 1 - PayloadParams{0U, 1U}, - PayloadParams{1U, 1U}, - PayloadParams{sizeof(ChunkHeader), 1U}, - PayloadParams{sizeof(ChunkHeader) * 42U, 1U}, - // alignment = alignof(ChunkHeader) / 2 - PayloadParams{0U, alignof(ChunkHeader) / 2}, - PayloadParams{1U, alignof(ChunkHeader) / 2}, - PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) / 2}, - PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) / 2}, - // alignment = alignof(ChunkHeader) - PayloadParams{0U, alignof(ChunkHeader)}, - PayloadParams{1U, alignof(ChunkHeader)}, - PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader)}, - PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader)}, - // alignment = alignof(ChunkHeader) * 2 - PayloadParams{0U, alignof(ChunkHeader) * 2}, - PayloadParams{1U, alignof(ChunkHeader) * 2}, - PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) * 2}, - PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) * 2}, - // alignment = PayloadParams::MAX_ALIGNMENT - PayloadParams{0U, PayloadParams::MAX_ALIGNMENT}, - PayloadParams{1U, PayloadParams::MAX_ALIGNMENT}, - PayloadParams{sizeof(ChunkHeader), PayloadParams::MAX_ALIGNMENT}, - PayloadParams{sizeof(ChunkHeader) * 42U, PayloadParams::MAX_ALIGNMENT})); +INSTANTIATE_TEST_SUITE_P(ChunkSettings_test, + ChunkSettings_AlteringUserPayloadWithoutUserHeader, + ::testing::Values( + // alignment = 0 + PayloadParams{0U, 0U}, + PayloadParams{1U, 0U}, + PayloadParams{sizeof(ChunkHeader), 0U}, + PayloadParams{sizeof(ChunkHeader) * 42U, 0U}, + // alignment = 1 + PayloadParams{0U, 1U}, + PayloadParams{1U, 1U}, + PayloadParams{sizeof(ChunkHeader), 1U}, + PayloadParams{sizeof(ChunkHeader) * 42U, 1U}, + // alignment = alignof(ChunkHeader) / 2 + PayloadParams{0U, alignof(ChunkHeader) / 2}, + PayloadParams{1U, alignof(ChunkHeader) / 2}, + PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) / 2}, + PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) / 2}, + // alignment = alignof(ChunkHeader) + PayloadParams{0U, alignof(ChunkHeader)}, + PayloadParams{1U, alignof(ChunkHeader)}, + PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader)}, + PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader)}, + // alignment = alignof(ChunkHeader) * 2 + PayloadParams{0U, alignof(ChunkHeader) * 2}, + PayloadParams{1U, alignof(ChunkHeader) * 2}, + PayloadParams{sizeof(ChunkHeader), alignof(ChunkHeader) * 2}, + PayloadParams{sizeof(ChunkHeader) * 42U, alignof(ChunkHeader) * 2}, + // alignment = PayloadParams::MAX_ALIGNMENT + PayloadParams{0U, PayloadParams::MAX_ALIGNMENT}, + PayloadParams{1U, PayloadParams::MAX_ALIGNMENT}, + PayloadParams{sizeof(ChunkHeader), PayloadParams::MAX_ALIGNMENT}, + PayloadParams{sizeof(ChunkHeader) * 42U, PayloadParams::MAX_ALIGNMENT})); TEST_P(ChunkSettings_AlteringUserPayloadWithoutUserHeader, RequiredChunkSizeIsCorrect) { @@ -301,39 +301,39 @@ class ChunkSettings_AlteringUserPayloadWithUserHeader : public ::testing::TestWi // with a user-header, the user-payload is located right after the UserPayloadOffset_t, therefore the user-payload size // and alignment parameters are made dependant on the UserPayloadOffset_t -INSTANTIATE_TEST_CASE_P(ChunkSettings_test, - ChunkSettings_AlteringUserPayloadWithUserHeader, - ::testing::Values( - // alignment = 0 - PayloadParams{0U, 0U}, - PayloadParams{1U, 0U}, - PayloadParams{sizeof(UserPayloadOffset_t), 0U}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 0U}, - // alignment = 1 - PayloadParams{0U, 1U}, - PayloadParams{1U, 1U}, - PayloadParams{sizeof(UserPayloadOffset_t), 1U}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 1U}, - // alignment = alignof(UserPayloadOffset_t) / 2 - PayloadParams{0U, alignof(UserPayloadOffset_t) / 2}, - PayloadParams{1U, alignof(UserPayloadOffset_t) / 2}, - PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) / 2}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) / 2}, - // alignment = alignof(UserPayloadOffset_t) - PayloadParams{0U, alignof(UserPayloadOffset_t)}, - PayloadParams{1U, alignof(UserPayloadOffset_t)}, - PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t)}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t)}, - // alignment = alignof(UserPayloadOffset_t) * 2 - PayloadParams{0U, alignof(UserPayloadOffset_t) * 2}, - PayloadParams{1U, alignof(UserPayloadOffset_t) * 2}, - PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) * 2}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) * 2}, - // alignment = PayloadParams::MAX_ALIGNMENT - PayloadParams{0U, PayloadParams::MAX_ALIGNMENT}, - PayloadParams{1U, PayloadParams::MAX_ALIGNMENT}, - PayloadParams{sizeof(UserPayloadOffset_t), PayloadParams::MAX_ALIGNMENT}, - PayloadParams{sizeof(UserPayloadOffset_t) * 42U, PayloadParams::MAX_ALIGNMENT})); +INSTANTIATE_TEST_SUITE_P(ChunkSettings_test, + ChunkSettings_AlteringUserPayloadWithUserHeader, + ::testing::Values( + // alignment = 0 + PayloadParams{0U, 0U}, + PayloadParams{1U, 0U}, + PayloadParams{sizeof(UserPayloadOffset_t), 0U}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 0U}, + // alignment = 1 + PayloadParams{0U, 1U}, + PayloadParams{1U, 1U}, + PayloadParams{sizeof(UserPayloadOffset_t), 1U}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, 1U}, + // alignment = alignof(UserPayloadOffset_t) / 2 + PayloadParams{0U, alignof(UserPayloadOffset_t) / 2}, + PayloadParams{1U, alignof(UserPayloadOffset_t) / 2}, + PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) / 2}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) / 2}, + // alignment = alignof(UserPayloadOffset_t) + PayloadParams{0U, alignof(UserPayloadOffset_t)}, + PayloadParams{1U, alignof(UserPayloadOffset_t)}, + PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t)}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t)}, + // alignment = alignof(UserPayloadOffset_t) * 2 + PayloadParams{0U, alignof(UserPayloadOffset_t) * 2}, + PayloadParams{1U, alignof(UserPayloadOffset_t) * 2}, + PayloadParams{sizeof(UserPayloadOffset_t), alignof(UserPayloadOffset_t) * 2}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, alignof(UserPayloadOffset_t) * 2}, + // alignment = PayloadParams::MAX_ALIGNMENT + PayloadParams{0U, PayloadParams::MAX_ALIGNMENT}, + PayloadParams{1U, PayloadParams::MAX_ALIGNMENT}, + PayloadParams{sizeof(UserPayloadOffset_t), PayloadParams::MAX_ALIGNMENT}, + PayloadParams{sizeof(UserPayloadOffset_t) * 42U, PayloadParams::MAX_ALIGNMENT})); uint32_t expectedChunkSizeWithUserHeader(const PayloadParams& userPayload, uint32_t userHeaderSize) { diff --git a/iceoryx_posh/test/moduletests/test_popo_chunk_distributor.cpp b/iceoryx_posh/test/moduletests/test_popo_chunk_distributor.cpp index b426693c6e2..4f6d9b48b67 100644 --- a/iceoryx_posh/test/moduletests/test_popo_chunk_distributor.cpp +++ b/iceoryx_posh/test/moduletests/test_popo_chunk_distributor.cpp @@ -39,7 +39,7 @@ using ChunkDistributorTestSubjects = Types diff --git a/iceoryx_posh/test/moduletests/test_popo_chunk_queue.cpp b/iceoryx_posh/test/moduletests/test_popo_chunk_queue.cpp index 46cf32922e2..ae91eec4109 100644 --- a/iceoryx_posh/test/moduletests/test_popo_chunk_queue.cpp +++ b/iceoryx_posh/test/moduletests/test_popo_chunk_queue.cpp @@ -85,7 +85,7 @@ using ChunkQueueSubjects = /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(ChunkQueue_test, ChunkQueueSubjects); +TYPED_TEST_SUITE(ChunkQueue_test, ChunkQueueSubjects); #pragma GCC diagnostic pop template @@ -242,7 +242,7 @@ using ChunkQueueFiFoTestSubjects = Types /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(ChunkQueueFiFo_test, ChunkQueueFiFoTestSubjects); +TYPED_TEST_SUITE(ChunkQueueFiFo_test, ChunkQueueFiFoTestSubjects); #pragma GCC diagnostic pop template @@ -304,7 +304,7 @@ using ChunkQueueSoFiSubjects = Types; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(ChunkQueueSoFi_test, ChunkQueueSoFiSubjects); +TYPED_TEST_SUITE(ChunkQueueSoFi_test, ChunkQueueSoFiSubjects); #pragma GCC diagnostic pop template diff --git a/iceoryx_posh/test/moduletests/test_popo_toml_gateway_config_parser.cpp b/iceoryx_posh/test/moduletests/test_popo_toml_gateway_config_parser.cpp index 90ed69fed29..9ac01b6519f 100644 --- a/iceoryx_posh/test/moduletests/test_popo_toml_gateway_config_parser.cpp +++ b/iceoryx_posh/test/moduletests/test_popo_toml_gateway_config_parser.cpp @@ -78,17 +78,17 @@ class TomlGatewayConfigParserSuiteTest : public TestWithParam, TypedUniqueId>; /// we require TYPED_TEST since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -TYPED_TEST_CASE(TypedUniqueId_test, Implementations); +TYPED_TEST_SUITE(TypedUniqueId_test, Implementations); #pragma GCC diagnostic pop TYPED_TEST(TypedUniqueId_test, DefaultConstructorIncrementsID) diff --git a/iceoryx_posh/test/moduletests/test_roudi_config_toml_file_provider.cpp b/iceoryx_posh/test/moduletests/test_roudi_config_toml_file_provider.cpp index abbfe536a2a..c9bc2f8aca4 100644 --- a/iceoryx_posh/test/moduletests/test_roudi_config_toml_file_provider.cpp +++ b/iceoryx_posh/test/moduletests/test_roudi_config_toml_file_provider.cpp @@ -54,10 +54,10 @@ TEST_F(RoudiConfigTomlFileProvider_test, ParseDefaultConfigIsSuccessful) EXPECT_FALSE(result.has_error()); } -/// we require INSTANTIATE_TEST_CASE_P since we support gtest 1.8 for our safety targets +/// we require INSTANTIATE_TEST_SUITE_P since we support gtest 1.8 for our safety targets #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" -INSTANTIATE_TEST_CASE_P( +INSTANTIATE_TEST_SUITE_P( ParseAllMalformedInputConfigFiles, RoudiConfigTomlFileProvider_test, Values(ParseErrorInputFile_t{iox::roudi::RouDiConfigFileParseError::NO_GENERAL_SECTION,