Skip to content

Commit 0e40b46

Browse files
committed
support TYPED_TEST_SUITE
Get rid of deprecation warning if new variant exists.
1 parent 1f51124 commit 0e40b46

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/test/test_cost_queue.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ class ValueOrPointeeLessTest : public ::testing::Test
6262
};
6363
// set of template types to test for
6464
using TypeInstances = ::testing::Types<int, int*, mtc::SolutionBasePtr, mtc::SolutionBaseConstPtr>;
65+
#ifdef TYPED_TEST_SUITE
66+
TYPED_TEST_SUITE(ValueOrPointeeLessTest, TypeInstances);
67+
#else
6568
TYPED_TEST_CASE(ValueOrPointeeLessTest, TypeInstances);
69+
#endif
6670
TYPED_TEST(ValueOrPointeeLessTest, less) {
6771
EXPECT_TRUE(this->less(2, 3));
6872
EXPECT_FALSE(this->less(1, 1));
@@ -101,7 +105,11 @@ class OrderedTest : public ::testing::Test, public ordered<T>
101105
SCOPED_TRACE("pushAndValidate(" #cost ", " #__VA_ARGS__ ")"); \
102106
this->pushAndValidate(cost, __VA_ARGS__); \
103107
}
108+
#ifdef TYPED_TEST_SUITE
109+
TYPED_TEST_SUITE(OrderedTest, TypeInstances);
110+
#else
104111
TYPED_TEST_CASE(OrderedTest, TypeInstances);
112+
#endif
105113
TYPED_TEST(OrderedTest, sorting) {
106114
pushAndValidate(2, { 2 });
107115
pushAndValidate(1, { 1, 2 });

0 commit comments

Comments
 (0)