mirror of
https://github.com/moveit/moveit_task_constructor.git
synced 2025-11-04 14:49:57 +08:00
support TYPED_TEST_SUITE
Get rid of deprecation warning if new variant exists.
This commit is contained in:
parent
1f51124ae5
commit
0e40b464ec
@ -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 });
|
||||
|
||||
Loading…
Reference in New Issue
Block a user