Skip to content

Commit b62ed27

Browse files
Update tests for compatability with merged FPFHEstimation & FPFHEstimationOMP class
1 parent 84933c8 commit b62ed27

File tree

2 files changed

+11
-31
lines changed

2 files changed

+11
-31
lines changed

features/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ set(impl_incs
8080
"include/pcl/${SUBSYS_NAME}/impl/don.hpp"
8181
"include/pcl/${SUBSYS_NAME}/impl/feature.hpp"
8282
"include/pcl/${SUBSYS_NAME}/impl/fpfh.hpp"
83-
"include/pcl/${SUBSYS_NAME}/impl/fpfh_omp.hpp"
8483
"include/pcl/${SUBSYS_NAME}/impl/gasd.hpp"
8584
"include/pcl/${SUBSYS_NAME}/impl/gfpfh.hpp"
8685
"include/pcl/${SUBSYS_NAME}/impl/integral_image2D.hpp"

test/features/test_pfh_estimation.cpp

Lines changed: 11 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
#include <pcl/point_cloud.h>
4747
#include <pcl/features/pfh.h>
4848
#include <pcl/features/fpfh.h>
49-
#include <pcl/features/fpfh_omp.h>
5049
#include <pcl/features/vfh.h>
5150
#include <pcl/features/gfpfh.h>
5251
#include <pcl/io/pcd_io.h>
@@ -262,46 +261,28 @@ TEST (PCL, PFHEstimation)
262261
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
263262

264263
using pcl::FPFHEstimation;
265-
using pcl::FPFHEstimationOMP;
266264
using pcl::FPFHSignature33;
267265

268-
// "Placeholder" for the type specialized test fixture
269-
template<typename T>
270-
struct FPFHTest;
271-
272-
// Template specialization test for FPFHEstimation
273-
template<>
274-
struct FPFHTest<FPFHEstimation<PointT, PointT, FPFHSignature33> >
275-
: public ::testing::Test
266+
struct FPFHTest
267+
: public ::testing::TestWithParam<int>
276268
{
277269
FPFHEstimation<PointT, PointT, FPFHSignature33> fpfh;
278270
};
279271

280-
// Template specialization test for FPFHEstimationOMP
281-
template<>
282-
struct FPFHTest<FPFHEstimationOMP<PointT, PointT, FPFHSignature33> >
283-
: public ::testing::Test
284-
{
285-
// Default Constructor is defined to instantiate 4 threads
286-
FPFHTest<FPFHEstimationOMP<PointT, PointT, FPFHSignature33> > ()
287-
: fpfh (4)
288-
{}
289-
290-
FPFHEstimationOMP<PointT, PointT, FPFHSignature33> fpfh;
291-
};
292-
293-
// Types which will be instantiated
294-
using FPFHEstimatorTypes = ::testing::Types
295-
<FPFHEstimation<PointT, PointT, FPFHSignature33>,
296-
FPFHEstimationOMP<PointT, PointT, FPFHSignature33> >;
297-
TYPED_TEST_SUITE (FPFHTest, FPFHEstimatorTypes);
272+
INSTANTIATE_TEST_CASE_P(
273+
FPFHEstimationTests,
274+
FPFHTest,
275+
::testing::Values(
276+
-1, 4
277+
));
298278

299279
// This is a copy of the old FPFHEstimation test which will now
300280
// be applied to both FPFHEstimation and FPFHEstimationOMP
301-
TYPED_TEST (FPFHTest, Estimation)
281+
TEST_P (FPFHTest, Estimation)
302282
{
303283
// Create reference
304-
TypeParam& fpfh = this->fpfh;
284+
FPFHEstimation<PointT, PointT, FPFHSignature33>& fpfh = this->fpfh;
285+
fpfh.setNumberOfThreads(GetParam());
305286
fpfh.setInputNormals (cloud);
306287
EXPECT_EQ (fpfh.getInputNormals (), cloud);
307288

0 commit comments

Comments
 (0)