Skip to content

Commit

Permalink
iox-eclipse-iceoryx#841 Remove obsolete warning suppression due to GT…
Browse files Browse the repository at this point in the history
…est 1.8
  • Loading branch information
elBoberido committed Jan 11, 2022
1 parent 10eed47 commit c622074
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,8 @@ using LargeQueue = TestQueue<1000000>;
typedef ::testing::Types<SingleElementQueue, SmallQueue, MediumQueue, LargeQueue> TestQueues;
// typedef ::testing::Types<MediumQueue> TestQueues;

/// 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_SUITE(LockFreeQueueStressTest, TestQueues);
#pragma GCC diagnostic pop


///@brief Tests concurrent operation of one prodcuer and one consumer
/// The producer pushes a fixed number of data elements which the consumer pops and checks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,7 @@ using HalfFull3 = HalfFull<Data, Large>;
/// @endcode
typedef ::testing::Types<HalfFull2> 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_SUITE(ResizeableLockFreeQueueStressTest, TestConfigs);
#pragma GCC diagnostic pop


///@brief Tests concurrent operation of multiple producers and consumers
Expand Down
6 changes: 2 additions & 4 deletions iceoryx_hoofs/test/moduletests/test_concurrent_loffli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ using namespace ::testing;

constexpr uint32_t Size{4};
using LoFFLiTestSubjects = Types<iox::concurrent::LoFFLi>;
/// 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_SUITE(LoFFLi_test, LoFFLiTestSubjects);
#pragma GCC diagnostic pop


template <typename LoFFLiType>
class LoFFLi_test : public Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@ using TriggerQueueTestSubjects = Types<TriggerQueue<uint64_t, 1, FiFo>,
TriggerQueue<uint64_t, 10, ResizeableLockFreeQueue>,
TriggerQueue<uint64_t, 100, ResizeableLockFreeQueue>>;

/// 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_SUITE(TriggerQueue_test, TriggerQueueTestSubjects);
#pragma GCC diagnostic pop


TYPED_TEST(TriggerQueue_test, EmptyOnConstruction)
{
Expand Down
5 changes: 1 addition & 4 deletions iceoryx_hoofs/test/moduletests/test_cxx_helplets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,8 @@ class Helplets_test_isPowerOfTwo : public Helplets_test

using HelpletsIsPowerOfTwoTypes = Types<uint8_t, uint16_t, uint32_t, uint64_t, size_t>;

/// 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_SUITE(Helplets_test_isPowerOfTwo, HelpletsIsPowerOfTwoTypes);
#pragma GCC diagnostic pop


TYPED_TEST(Helplets_test_isPowerOfTwo, OneIsPowerOfTwo)
{
Expand Down
6 changes: 2 additions & 4 deletions iceoryx_hoofs/test/moduletests/test_cxx_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,9 @@ class stringTyped_test : public Test
};

using Implementations = Types<string<1>, 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_SUITE(stringTyped_test, Implementations);
#pragma GCC diagnostic pop


TEST(string_test, CapacityReturnsSpecifiedCapacity)
{
Expand Down
4 changes: 0 additions & 4 deletions iceoryx_hoofs/test/moduletests/test_index_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ TEST(LockFreeQueueTest, capacityIsConsistent)

typedef ::testing::Types<IndexQueue<1>, IndexQueue<10>, IndexQueue<1000>> TestQueues;

/// 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_SUITE(IndexQueueTest, TestQueues);
#pragma GCC diagnostic pop


TYPED_TEST(IndexQueueTest, defaultConstructedQueueIsEmpty)
Expand Down
5 changes: 1 addition & 4 deletions iceoryx_hoofs/test/moduletests/test_ipc_channel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,8 @@ const size_t IpcChannel_test<T>::MaxMsgSize = IpcChannelType::MAX_MESSAGE_SIZE;
template <typename T>
constexpr uint64_t IpcChannel_test<T>::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_SUITE(IpcChannel_test, IpcChannelTypes);
#pragma GCC diagnostic pop


TYPED_TEST(IpcChannel_test, CreateWithTooLargeMessageSizeLeadsToError)
{
Expand Down
5 changes: 1 addition & 4 deletions iceoryx_hoofs/test/moduletests/test_lockfree_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,8 @@ typedef ::testing::Types<LFFull1,
AlmostEmpty2>
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_SUITE(LockFreeQueueTest, TestConfigs);
#pragma GCC diagnostic pop


TEST(LockFreeQueueTest, capacityIsConsistent)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,8 @@ TEST(LockFreeQueueBufferTest, capacityIsCorrect)

typedef ::testing::Types<Buffer<int, 10>, Buffer<Integer, 10>> 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_SUITE(LockFreeQueueBufferTest, TestBuffers);
#pragma GCC diagnostic pop


TYPED_TEST(LockFreeQueueBufferTest, accessElements)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,8 @@ class LockFreeQueueCyclicIndexTest : public ::testing::Test

typedef ::testing::Types<CyclicIndex<1>, CyclicIndex<2>, CyclicIndex<10>, CyclicIndex<1000>> TestIndices;

/// 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_SUITE(LockFreeQueueCyclicIndexTest, TestIndices);
#pragma GCC diagnostic pop


// note that in all tests we will check whether the getCycle and getIndex methods
// behave as expected after certain operations (mainly addition),
Expand Down
4 changes: 0 additions & 4 deletions iceoryx_hoofs/test/moduletests/test_logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ class IoxLoggerLogLevel_test : public TestWithParam<iox::log::LogLevel>, public
}
};

/// 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_SUITE_P(AllLogLevel,
IoxLoggerLogLevel_test,
Values(iox::log::LogLevel::kOff,
Expand All @@ -170,7 +167,6 @@ INSTANTIATE_TEST_SUITE_P(AllLogLevel,
iox::log::LogLevel::kInfo,
iox::log::LogLevel::kDebug,
iox::log::LogLevel::kVerbose));
#pragma GCC diagnostic pop

TEST_P(IoxLoggerLogLevel_test, LogLevel)
{
Expand Down
10 changes: 2 additions & 8 deletions iceoryx_hoofs/test/moduletests/test_logstream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,8 @@ class IoxLogStreamHexBin_test : public IoxLogStream_test

using LogHexBinTypes = Types<uint8_t, int8_t, uint16_t, int16_t, uint32_t, int32_t, uint64_t, int64_t>;

/// 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_SUITE(IoxLogStreamHexBin_test, LogHexBinTypes);
#pragma GCC diagnostic pop


template <typename LogType>
void testStreamOperatorLogHex(Logger_Mock& loggerMock, LogType logValue)
Expand Down Expand Up @@ -263,11 +260,8 @@ TYPED_TEST(IoxLogStreamHexBin_test, StreamOperatorLogBin_ValueMax)
using ArithmeticTypes =
Types<bool, int8_t, int16_t, int32_t, int64_t, uint8_t, uint16_t, uint32_t, uint64_t, size_t, float, double>;

/// 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_SUITE(IoxLogStreamArithmetic_test, ArithmeticTypes);
#pragma GCC diagnostic pop


template <typename Arithmetic>
class IoxLogStreamArithmetic_test : public IoxLogStream_test
Expand Down
5 changes: 1 addition & 4 deletions iceoryx_hoofs/test/moduletests/test_relative_pointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,8 @@ class base_relative_ptr_test : public Test

typedef testing::Types<uint8_t, int8_t, double> 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_SUITE(base_relative_ptr_test, Types);
#pragma GCC diagnostic pop


TYPED_TEST(base_relative_ptr_test, ConstrTests)
{
Expand Down
5 changes: 1 addition & 4 deletions iceoryx_hoofs/test/moduletests/test_relocatable_ptr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,8 @@ class Relocatable_ptr_test : public Test

typedef ::testing::Types<int, Data, void, char*, const Data, const void> TestTypes;

/// 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_SUITE(Relocatable_ptr_typed_test, TestTypes);
#pragma GCC diagnostic pop


TYPED_TEST(Relocatable_ptr_typed_test, wrappedPointerTypeIsCorrect)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,8 @@ using IntQueue = iox::concurrent::ResizeableLockFreeQueue<uint64_t, Capacity>;

typedef ::testing::Types<IntegerQueue<1>, IntegerQueue<11>, IntQueue<10>> TestQueues;


/// 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_SUITE(ResizeableLockFreeQueueTest, TestQueues);
#pragma GCC diagnostic pop


TEST(ResizeableLockFreeQueueTest, maxCapacityIsConsistent)
{
Expand Down
4 changes: 0 additions & 4 deletions iceoryx_hoofs/test/moduletests/test_semaphore_module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,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_SUITE_P(Semaphore_test, Semaphore_test, Values(&createNamedSemaphore, &createUnnamedSemaphore));
#pragma GCC diagnostic pop

TEST_F(SemaphoreCreate_test, CreateNamedSemaphore)
{
Expand Down
4 changes: 0 additions & 4 deletions iceoryx_posh/test/moduletests/test_base_port.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ std::vector<iox::UniquePortId> uniquePortIds;
using PortDataTypes =
Types<BasePortData, PublisherPortData, SubscriberPortData, InterfacePortData, ApplicationPortData>;

/// 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_SUITE(BasePort_test, PortDataTypes);
#pragma GCC diagnostic pop

// port data factories

Expand Down
6 changes: 2 additions & 4 deletions iceoryx_posh/test/moduletests/test_popo_chunk_distributor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ using namespace iox::cxx;
using namespace iox::mepoo;

using ChunkDistributorTestSubjects = Types<ThreadSafePolicy, SingleThreadedPolicy>;
/// 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_SUITE(ChunkDistributor_test, ChunkDistributorTestSubjects);
#pragma GCC diagnostic pop


template <typename PolicyType>
class ChunkDistributor_test : public Test
Expand Down
17 changes: 5 additions & 12 deletions iceoryx_posh/test/moduletests/test_popo_chunk_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,8 @@ using ChunkQueueSubjects =
TypeDefinitions<SingleThreadedPolicy, iox::cxx::VariantQueueTypes::FiFo_SingleProducerSingleConsumer>,
TypeDefinitions<SingleThreadedPolicy, iox::cxx::VariantQueueTypes::SoFi_SingleProducerSingleConsumer>>;

/// 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_SUITE(ChunkQueue_test, ChunkQueueSubjects);
#pragma GCC diagnostic pop


template <typename TestTypes>
class ChunkQueue_test : public Test, public ChunkQueue_testBase
Expand Down Expand Up @@ -239,11 +236,9 @@ TYPED_TEST(ChunkQueue_test, AttachSecondConditionVariable)

/// @note this could be changed to a parameterized ChunkQueueSaturatingFIFO_test when there are more FIFOs available
using ChunkQueueFiFoTestSubjects = Types<ThreadSafePolicy, SingleThreadedPolicy>;
/// 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_SUITE(ChunkQueueFiFo_test, ChunkQueueFiFoTestSubjects);
#pragma GCC diagnostic pop


template <typename PolicyType>
class ChunkQueueFiFo_test : public Test, public ChunkQueue_testBase
Expand Down Expand Up @@ -301,11 +296,9 @@ TYPED_TEST(ChunkQueueFiFo_test, PushFull)

/// @note this could be changed to a parameterized ChunkQueueOverflowingFIFO_test when there are more FIFOs available
using ChunkQueueSoFiSubjects = Types<ThreadSafePolicy, SingleThreadedPolicy>;
/// 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_SUITE(ChunkQueueSoFi_test, ChunkQueueSoFiSubjects);
#pragma GCC diagnostic pop


template <typename PolicyType>
class ChunkQueueSoFi_test : public Test, public ChunkQueue_testBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@ class TomlGatewayConfigParserSuiteTest : public TestWithParam<CheckCharactersVal
};

// ======================================== Tests ======================================== //
/// 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_SUITE_P(ValidTest,
TomlGatewayConfigParserSuiteTest,
Expand All @@ -91,8 +88,6 @@ INSTANTIATE_TEST_SUITE_P(ValidTest,
CheckCharactersValidity_t{"這場考試_!*#:", true}));


#pragma GCC diagnostic pop

TEST_P(TomlGatewayConfigParserSuiteTest, CheckCharactersUsedInServiceDescription)
{
auto toml = cpptoml::make_table();
Expand Down Expand Up @@ -383,9 +378,6 @@ TEST_F(TomlGatewayConfigParserSuiteTest,
EXPECT_EQ(result.get_error(), MAXIMUM_NUMBER_OF_ENTRIES_EXCEEDED);
}

/// 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_SUITE_P(
ParseAllMalformedInputConfigFiles,
TomlGatewayConfigParserTest,
Expand All @@ -395,8 +387,6 @@ INSTANTIATE_TEST_SUITE_P(
"toml_parser_exception.toml"}));


#pragma GCC diagnostic pop

TEST_P(TomlGatewayConfigParserTest, ParseMalformedInputFileCausesError)
{
const auto parseErrorInputFile = GetParam();
Expand Down
6 changes: 2 additions & 4 deletions iceoryx_posh/test/moduletests/test_popo_typed_unique_id.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,9 @@ class TypedUniqueId_test : public Test
};

using Implementations = Types<TypedUniqueId<int>, TypedUniqueId<float>>;
/// 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_SUITE(TypedUniqueId_test, Implementations);
#pragma GCC diagnostic pop


TYPED_TEST(TypedUniqueId_test, DefaultConstructorIncrementsID)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ TEST_F(RoudiConfigTomlFileProvider_test, ParseDefaultConfigIsSuccessful)
EXPECT_FALSE(result.has_error());
}

/// 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_SUITE_P(
ParseAllMalformedInputConfigFiles,
RoudiConfigTomlFileProvider_test,
Expand All @@ -78,7 +75,7 @@ INSTANTIATE_TEST_SUITE_P(
"roudi_config_error_mempool_without_chunk_count.toml"},
ParseErrorInputFile_t{iox::roudi::RouDiConfigFileParseError::EXCEPTION_IN_PARSER,
"toml_parser_exception.toml"}));
#pragma GCC diagnostic pop


TEST_P(RoudiConfigTomlFileProvider_test, ParseMalformedInputFileCausesError)
{
Expand Down

0 comments on commit c622074

Please sign in to comment.