support TYPED_TEST_SUITE

Get rid of deprecation warning if new variant exists.
This commit is contained in:
v4hn 2021-06-03 11:45:47 +02:00
parent 1f51124ae5
commit 0e40b464ec

View File

@ -62,7 +62,11 @@ protected:
};
// set of template types to test for
using TypeInstances = ::testing::Types<int, int*, mtc::SolutionBasePtr, mtc::SolutionBaseConstPtr>;
#ifdef TYPED_TEST_SUITE
TYPED_TEST_SUITE(ValueOrPointeeLessTest, TypeInstances);
#else
TYPED_TEST_CASE(ValueOrPointeeLessTest, TypeInstances);
#endif
TYPED_TEST(ValueOrPointeeLessTest, less) {
EXPECT_TRUE(this->less(2, 3));
EXPECT_FALSE(this->less(1, 1));
@ -101,7 +105,11 @@ protected:
SCOPED_TRACE("pushAndValidate(" #cost ", " #__VA_ARGS__ ")"); \
this->pushAndValidate(cost, __VA_ARGS__); \
}
#ifdef TYPED_TEST_SUITE
TYPED_TEST_SUITE(OrderedTest, TypeInstances);
#else
TYPED_TEST_CASE(OrderedTest, TypeInstances);
#endif
TYPED_TEST(OrderedTest, sorting) {
pushAndValidate(2, { 2 });
pushAndValidate(1, { 1, 2 });